Class P2PEdgeMultipleLongInputFormat.P2PEdgeReader
- java.lang.Object
-
- org.apache.giraph.conf.DefaultImmutableClassesGiraphConfigurable<I,V,E>
-
- org.apache.giraph.worker.WorkerAggregatorDelegator<I,org.apache.hadoop.io.Writable,E>
-
- org.apache.giraph.io.EdgeReader<I,E>
-
- org.apache.giraph.io.formats.TextEdgeInputFormat.TextEdgeReader
-
- org.apache.giraph.io.formats.TextEdgeInputFormat.TextEdgeReaderFromEachLineProcessed<String[]>
-
- com.alibaba.graphscope.example.giraph.format.P2PEdgeMultipleLongInputFormat.P2PEdgeReader
-
- All Implemented Interfaces:
org.apache.giraph.aggregators.AggregatorUsage,org.apache.giraph.conf.GiraphConfigurationSettable<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Writable,MultipleLongWritable>,org.apache.giraph.conf.ImmutableClassesGiraphConfigurable<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Writable,MultipleLongWritable>,org.apache.giraph.worker.WorkerAggregatorUsage,org.apache.giraph.worker.WorkerBroadcastUsage,org.apache.giraph.worker.WorkerGlobalCommUsage,org.apache.giraph.worker.WorkerReduceUsage
- Enclosing class:
- P2PEdgeMultipleLongInputFormat
public class P2PEdgeMultipleLongInputFormat.P2PEdgeReader extends TextEdgeInputFormat.TextEdgeReaderFromEachLineProcessed<String[]>
-
-
Constructor Summary
Constructors Constructor Description P2PEdgeReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.hadoop.io.LongWritablegetSourceVertexId(String[] line)Reads source vertex id from the preprocessed line.protected org.apache.hadoop.io.LongWritablegetTargetVertexId(String[] line)Reads target vertex id from the preprocessed line.protected MultipleLongWritablegetValue(String[] line)Reads edge value from the preprocessed line.protected String[]preprocessLine(org.apache.hadoop.io.Text line)Preprocess the line so other methods can easily read necessary information for creating edge-
Methods inherited from class org.apache.giraph.io.formats.TextEdgeInputFormat.TextEdgeReaderFromEachLineProcessed
getCurrentEdge, getCurrentSourceId, nextEdge
-
Methods inherited from class org.apache.giraph.io.formats.TextEdgeInputFormat.TextEdgeReader
close, createLineRecordReader, getContext, getProgress, getRecordReader, initialize
-
Methods inherited from class org.apache.giraph.worker.WorkerAggregatorDelegator
aggregate, getAggregatedValue, getBroadcast, reduce, reduceMerge, setAggregatorManager
-
-
-
-
Method Detail
-
preprocessLine
protected String[] preprocessLine(org.apache.hadoop.io.Text line) throws IOException
Preprocess the line so other methods can easily read necessary information for creating edge- Specified by:
preprocessLinein classTextEdgeInputFormat.TextEdgeReaderFromEachLineProcessed<String[]>- Parameters:
line- the current line to be read- Returns:
- the preprocessed object
- Throws:
IOException- exception that can be thrown while reading
-
getTargetVertexId
protected org.apache.hadoop.io.LongWritable getTargetVertexId(String[] line) throws IOException
Reads target vertex id from the preprocessed line.- Specified by:
getTargetVertexIdin classTextEdgeInputFormat.TextEdgeReaderFromEachLineProcessed<String[]>- Parameters:
line- the object obtained by preprocessing the line- Returns:
- the target vertex id
- Throws:
IOException- exception that can be thrown while reading
-
getSourceVertexId
protected org.apache.hadoop.io.LongWritable getSourceVertexId(String[] line) throws IOException
Reads source vertex id from the preprocessed line.- Specified by:
getSourceVertexIdin classTextEdgeInputFormat.TextEdgeReaderFromEachLineProcessed<String[]>- Parameters:
line- the object obtained by preprocessing the line- Returns:
- the source vertex id
- Throws:
IOException- exception that can be thrown while reading
-
getValue
protected MultipleLongWritable getValue(String[] line) throws IOException
Reads edge value from the preprocessed line.- Specified by:
getValuein classTextEdgeInputFormat.TextEdgeReaderFromEachLineProcessed<String[]>- Parameters:
line- the object obtained by preprocessing the line- Returns:
- the edge value
- Throws:
IOException- exception that can be thrown while reading
-
-