本文整理汇总了Java中org.apache.giraph.io.VertexReader类的典型用法代码示例。如果您正苦于以下问题:Java VertexReader类的具体用法?Java VertexReader怎么用?Java VertexReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VertexReader类属于org.apache.giraph.io包,在下文中一共展示了VertexReader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader<I, V, E> createVertexReader(InputSplit split,
TaskAttemptContext context) throws IOException {
HiveVertexReader<I, V, E> reader = new HiveVertexReader<I, V, E>();
reader.setTableSchema(getTableSchema());
RecordReader<WritableComparable, HiveReadableRecord> baseReader;
try {
baseReader = hiveInputFormat.createRecordReader(split, context);
} catch (InterruptedException e) {
throw new IOException("Could not create vertex reader", e);
}
reader.setHiveRecordReader(baseReader);
return new VertexReaderWrapper<I, V, E>(reader);
}
示例2: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public final VertexReader<I, V, E>
createVertexReader(final InputSplit split,
final TaskAttemptContext context)
throws IOException {
try {
HCatalogVertexReader reader = createVertexReader();
reader.initialize(hCatInputFormat.
createVertexRecordReader(split, context));
return reader;
} catch (InterruptedException e) {
throw new IllegalStateException(
"createVertexReader: " +
"Interrupted creating reader.", e);
}
}
示例3: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader<I, V, E> createVertexReader(InputSplit split,
TaskAttemptContext context) throws IOException {
HiveVertexReader<I, V, E> reader = new HiveVertexReader<I, V, E>();
reader.setTableSchema(hiveInputFormat.getTableSchema(getConf()));
RecordReader<WritableComparable, HiveReadableRecord> baseReader;
try {
baseReader = hiveInputFormat.createRecordReader(split, context);
} catch (InterruptedException e) {
throw new IOException("Could not create vertex reader", e);
}
reader.setHiveRecordReader(baseReader);
return new VertexReaderWrapper<I, V, E>(reader);
}
示例4: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader createVertexReader(final InputSplit split, final TaskAttemptContext context) throws IOException {
try {
final GiraphVertexReader reader = new GiraphVertexReader();
reader.initialize(split, context);
return reader;
} catch (final InterruptedException e) {
throw new IOException(e.getMessage(), e);
}
}
示例5: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
/**
* Creates a new VertexReader
* @param split the split to be read
* @param context the information about the task
* @return VertexReader for LinkRank
* @throws IOException
*/
public VertexReader<Text, DoubleWritable, NullWritable>
createVertexReader(InputSplit split,
TaskAttemptContext context) throws IOException {
return new NutchTableEdgeVertexReader(split, context);
}
示例6: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
/**
* Creates a new VertexReader
* @param split the split to be read
* @param context the information about the task
* @return VertexReader for LinkRank
* @throws java.io.IOException
*/
public VertexReader<Text, DoubleWritable, NullWritable>
createVertexReader(InputSplit split,
TaskAttemptContext context) throws IOException {
return new NutchTableEdgeVertexReader(split, context);
}
示例7: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
public VertexReader<Text, Text, Text>
createVertexReader(InputSplit split, TaskAttemptContext context)
throws IOException {
try {
return new AccumuloEdgeVertexReader(
accumuloInputFormat.createRecordReader(split, context)) {
};
} catch (InterruptedException e) {
throw new IOException(e);
}
}
示例8: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader<LongWritable, DoubleWritable,
FloatWritable> createVertexReader(InputSplit split,
TaskAttemptContext context)
throws IOException {
return new SimpleVertexReader();
}
示例9: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader<LongWritable, DoubleWritable,
FloatWritable> createVertexReader(InputSplit split,
TaskAttemptContext context)
throws IOException {
return new SimplePageRankVertexReader();
}
示例10: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader<I, V, E> createVertexReader(InputSplit split,
TaskAttemptContext context) throws IOException {
final VertexReader<I, V, E> vertexReader =
originalInputFormat.createVertexReader(split,
HadoopUtils.makeTaskAttemptContext(getConf(), context));
return new WrappedVertexReader<I, V, E>(vertexReader, getConf());
}
示例11: WrappedVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
/**
* Constructor
*
* @param baseVertexReader VertexReader to delegate all the methods to
* @param conf Configuration
*/
public WrappedVertexReader(VertexReader<I, V, E> baseVertexReader,
ImmutableClassesGiraphConfiguration<I, V, E> conf) {
this.baseVertexReader = baseVertexReader;
super.setConf(conf);
baseVertexReader.setConf(conf);
}
示例12: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader<Text, RyaTypeWritable, RyaStatementWritable> createVertexReader(InputSplit split, TaskAttemptContext context) throws IOException {
return new RyaVertexReader((RyaStatementRecordReader) ryaInputFormat.createRecordReader(split, context),
rdfTableLayout, tripleContext,
context.getConfiguration());
}
示例13: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader<LongWritable, IntWritable, FloatWritable>
createVertexReader(InputSplit split, TaskAttemptContext context)
throws IOException {
return new SimpleSuperstepVertexReader();
}
示例14: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader<I, V, E> createVertexReader(InputSplit inputSplit,
TaskAttemptContext context) throws IOException {
return new InMemoryVertexReader();
}
示例15: createVertexReader
import org.apache.giraph.io.VertexReader; //导入依赖的package包/类
@Override
public VertexReader<IntWritable, FloatWritable, NullWritable>
createVertexReader(InputSplit split,
TaskAttemptContext context) throws IOException {
return new PseudoRandomVertexReader();
}