Class LiveJournalEdgeInputFormat.LiveJournalEdgeReader
- 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.LiveJournalEdgeInputFormat.LiveJournalEdgeReader
-
- All Implemented Interfaces:
org.apache.giraph.aggregators.AggregatorUsage
,org.apache.giraph.conf.GiraphConfigurationSettable<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.LongWritable>
,org.apache.giraph.conf.ImmutableClassesGiraphConfigurable<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.LongWritable>
,org.apache.giraph.worker.WorkerAggregatorUsage
,org.apache.giraph.worker.WorkerBroadcastUsage
,org.apache.giraph.worker.WorkerGlobalCommUsage
,org.apache.giraph.worker.WorkerReduceUsage
- Enclosing class:
- LiveJournalEdgeInputFormat
public class LiveJournalEdgeInputFormat.LiveJournalEdgeReader extends TextEdgeInputFormat.TextEdgeReaderFromEachLineProcessed<String[]>
-
-
Constructor Summary
Constructors Constructor Description LiveJournalEdgeReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.hadoop.io.LongWritable
getSourceVertexId(String[] line)
Reads source vertex id from the preprocessed line.protected org.apache.hadoop.io.LongWritable
getTargetVertexId(String[] line)
Reads target vertex id from the preprocessed line.protected org.apache.hadoop.io.LongWritable
getValue(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:
preprocessLine
in 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:
getTargetVertexId
in 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:
getSourceVertexId
in 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 org.apache.hadoop.io.LongWritable getValue(String[] line) throws IOException
Reads edge value from the preprocessed line.- Specified by:
getValue
in 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
-
-