I
- Vertex idV
- Vertex dataE
- Edge datapublic class WrappedEdgeOutputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends EdgeOutputFormat<I,V,E>
EdgeOutputFormat
to make sure proper configuration
parameters are passed around, that user can set parameters in
configuration and they will be available in other methods related to this
format.Constructor and Description |
---|
WrappedEdgeOutputFormat(EdgeOutputFormat<I,V,E> edgeOutputFormat)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)
Check for validity of the output-specification for the job.
|
EdgeWriter<I,V,E> |
createEdgeWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Create an edge 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.
|
void |
postWriting(org.apache.hadoop.mapreduce.TaskAttemptContext context)
This method will be called after all writers are closed
|
void |
preWriting(org.apache.hadoop.mapreduce.TaskAttemptContext context)
This method will be called before creating any writers
|
getConf, setConf
public WrappedEdgeOutputFormat(EdgeOutputFormat<I,V,E> edgeOutputFormat)
edgeOutputFormat
- Edge output format to wrappublic EdgeWriter<I,V,E> createEdgeWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
EdgeOutputFormat
EdgeWriter.initialize(TaskAttemptContext)
before
the split is used.createEdgeWriter
in class EdgeOutputFormat<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 taskIOException
InterruptedException
public void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context) throws IOException, InterruptedException
OutputFormat
This 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 attemptedInterruptedException
public org.apache.hadoop.mapreduce.OutputCommitter getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
OutputFormat
getOutputCommitter
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 contextIOException
InterruptedException
public void preWriting(org.apache.hadoop.mapreduce.TaskAttemptContext context)
OutputFormat
preWriting
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 contextpublic void postWriting(org.apache.hadoop.mapreduce.TaskAttemptContext context)
OutputFormat
postWriting
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 contextCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.