I - Vertex id typeV - Vertex value typeE - Edge value typeOK - Output key data type for a sequence fileOV - Output value data type for a sequence filepublic abstract class SequenceFileVertexOutputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,OK extends org.apache.hadoop.io.Writable,OV extends org.apache.hadoop.io.Writable> extends VertexOutputFormat<I,V,E>
| Constructor and Description |
|---|
SequenceFileVertexOutputFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)
Check for validity of the output-specification for the job.
|
protected abstract OK |
convertToSequenceFileKey(I vertexId)
Converts a vertex identifier into a sequence file key.
|
protected abstract OV |
convertToSequenceFileValue(V vertexValue)
Converts a vertex value into a sequence file value.
|
VertexWriter |
createVertexWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Create a vertex writer for a given split.
|
org.apache.hadoop.mapreduce.OutputCommitter |
getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Get the output committer for this output format.
|
postWriting, preWritinggetConf, setConfpublic void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)
throws IOException,
InterruptedException
OutputFormatThis is to validate the output specification for the job when it is a job is submitted. Typically checks that it does not already exist, throwing an exception when it already exists, so that output is not overwritten.
checkOutputSpecs in class OutputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>context - information about the jobIOException - when output should not be attemptedInterruptedExceptionpublic org.apache.hadoop.mapreduce.OutputCommitter getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
OutputFormatgetOutputCommitter in class OutputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>context - the task contextIOExceptionInterruptedExceptionpublic VertexWriter createVertexWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
VertexOutputFormatVertexWriter.initialize(TaskAttemptContext) before
the split is used.createVertexWriter in class VertexOutputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>context - the information about the taskIOExceptionInterruptedExceptionprotected abstract OK convertToSequenceFileKey(I vertexId)
vertexId - Vertex identifier.Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.