public class PseudoRandomEdgeInputFormat extends EdgeInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable>
EdgeInputFormat
generates pseudo-random edges on the fly.
As with PseudoRandomVertexInputFormat
, the user specifies the
number of vertices and the number of edges per vertex.Constructor and Description |
---|
PseudoRandomEdgeInputFormat() |
Modifier and Type | Method and Description |
---|---|
void |
checkInputSpecs(org.apache.hadoop.conf.Configuration conf)
Check that input is valid.
|
EdgeReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable> |
createEdgeReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Create an edge reader for a given split.
|
List<org.apache.hadoop.mapreduce.InputSplit> |
getSplits(org.apache.hadoop.mapreduce.JobContext context,
int minSplitCountHint)
Get the list of input splits for the format.
|
readInputSplit, writeInputSplit
getConf, setConf
public void checkInputSpecs(org.apache.hadoop.conf.Configuration conf)
GiraphInputFormat
checkInputSpecs
in class GiraphInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.DoubleWritable>
conf
- Configurationpublic final List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext context, int minSplitCountHint) throws IOException, InterruptedException
GiraphInputFormat
getSplits
in class GiraphInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.DoubleWritable>
context
- The job contextminSplitCountHint
- Minimum number of splits to create (hint)IOException
InterruptedException
public EdgeReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable> createEdgeReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
EdgeInputFormat
EdgeReader.initialize(InputSplit, TaskAttemptContext)
before
the split is used.createEdgeReader
in class EdgeInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable>
split
- the split to be readcontext
- the information about the taskIOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.