• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ReverseEdgeDuplicator类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.apache.giraph.io.ReverseEdgeDuplicator的典型用法代码示例。如果您正苦于以下问题:Java ReverseEdgeDuplicator类的具体用法?Java ReverseEdgeDuplicator怎么用?Java ReverseEdgeDuplicator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ReverseEdgeDuplicator类属于org.apache.giraph.io包,在下文中一共展示了ReverseEdgeDuplicator类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createEdgeReader

点赞 2

import org.apache.giraph.io.ReverseEdgeDuplicator; //导入依赖的package包/类
@Override
public EdgeReader<IntWritable, IntWritable> createEdgeReader(
		InputSplit split, TaskAttemptContext context) throws IOException {
	String duplicator = this.getConf().get("io.edge.reverse.duplicator");
	boolean useDuplicator =  (null != duplicator) ? Boolean.parseBoolean(duplicator) : false;
	EdgeReader<IntWritable,IntWritable> reader = (useDuplicator) ? new ReverseEdgeDuplicator<IntWritable, IntWritable>(new SBEdgeReader()) : new SBEdgeReader();
	return reader;
}
 

开发者ID:Sotera,
项目名称:high-betweenness-set-extraction,
代码行数:9,
代码来源:HBSEEdgeInputFormat.java

示例2: createEdgeReader

点赞 2

import org.apache.giraph.io.ReverseEdgeDuplicator; //导入依赖的package包/类
@Override
public EdgeReader<IntWritable, NullWritable> createEdgeReader(
    InputSplit split, TaskAttemptContext context) throws IOException {
  EdgeReader<IntWritable, NullWritable> edgeReader =
      super.createEdgeReader(split, context);
  edgeReader.setConf(getConf());
  return new ReverseEdgeDuplicator<IntWritable, NullWritable>(edgeReader);
}
 

开发者ID:renato2099,
项目名称:giraph-gora,
代码行数:9,
代码来源:IntNullReverseTextEdgeInputFormat.java

示例3: createEdgeReader

点赞 1

import org.apache.giraph.io.ReverseEdgeDuplicator; //导入依赖的package包/类
/**
 * The create edge reader first determines if we should reverse each edge; some data sets are undirected graphs
 * and need the input format to reverse their connected nature.
 *
 * Calls the abstract method getEdgeReader() which will give us the appropriate EdgeReader for the subclass.
 * @param split
 * @param context
 * @return
 * @throws IOException
 */
public EdgeReader<Text, Text> createEdgeReader(InputSplit split, TaskAttemptContext context) throws IOException {
    String duplicator = getConf().get(IO_EDGE_REVERSE_DUPLICATOR, IO_EDGE_REVERSE_DUPLICATOR_DEFAULT);
    boolean useDuplicator = Boolean.parseBoolean(duplicator);
    EdgeReader<Text, Text> reader = useDuplicator ? new ReverseEdgeDuplicator<Text, Text>(new DGATextEdgeValueReader()) : new DGATextEdgeValueReader();
    return reader;
}
 

开发者ID:Sotera,
项目名称:distributed-graph-analytics,
代码行数:17,
代码来源:DGATextEdgeValueInputFormat.java

示例4: createEdgeReader

点赞 1

import org.apache.giraph.io.ReverseEdgeDuplicator; //导入依赖的package包/类
/**
 * The create edge reader first determines if we should reverse each edge; some data sets are undirected graphs
 * and need the input format to reverse their connected nature.
 *
 * Calls the abstract method getEdgeReader() which will give us the appropriate EdgeReader for the subclass.
 * @param split
 * @param context
 * @return
 * @throws IOException
 */
public EdgeReader<Text, LongWritable> createEdgeReader(InputSplit split, TaskAttemptContext context) throws IOException {
    String duplicator = getConf().get(IO_EDGE_REVERSE_DUPLICATOR, IO_EDGE_REVERSE_DUPLICATOR_DEFAULT);
    boolean useDuplicator = Boolean.parseBoolean(duplicator);
    EdgeReader<Text, LongWritable> reader = useDuplicator ? new ReverseEdgeDuplicator<Text, LongWritable>(new DGALongEdgeValueReader()) : new DGALongEdgeValueReader();
    return reader;
}
 

开发者ID:Sotera,
项目名称:distributed-graph-analytics,
代码行数:17,
代码来源:DGALongEdgeValueInputFormat.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)