I - Vertex idV - Vertex valueE - Edge valuepublic abstract class HCatalogVertexOutputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends VertexOutputFormat<I,V,E>
HCatalogVertexOutputFormat.HCatalogVertexWriter by extending
HCatalogVertexOutputFormat.SingleRowHCatalogVertexWriter or HCatalogVertexOutputFormat.MultiRowHCatalogVertexWriter
depending on how you want to fit your vertices into the output table.
The desired database and table name to store to can be specified via
HCatOutputFormat.setOutput(org.apache.hadoop.mapreduce.Job,
org.apache.hcatalog.mapreduce.OutputJobInfo)
as you setup your vertex output format with
GiraphConfiguration
setVertexOutputFormatClass(Class)}. You must create the output table.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HCatalogVertexOutputFormat.HCatalogVertexWriter<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
Abstract class that users should
subclass based on their specific vertex
output.
|
static class |
HCatalogVertexOutputFormat.MultiRowHCatalogVertexWriter<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
HCatalogVertexWriter to write each vertex in multiple rows.
|
protected static class |
HCatalogVertexOutputFormat.SingleRowHCatalogVertexWriter<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
HCatalogVertexWriter to write each vertex in each row.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hcatalog.mapreduce.HCatOutputFormat |
hCatOutputFormat
hcat output format
|
| Constructor and Description |
|---|
HCatalogVertexOutputFormat() |
| 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 HCatalogVertexOutputFormat.HCatalogVertexWriter<I,V,E> |
createVertexWriter()
create vertex writer.
|
VertexWriter<I,V,E> |
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.
|
getConf, setConfprotected org.apache.hcatalog.mapreduce.HCatOutputFormat hCatOutputFormat
public final void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)
throws IOException,
InterruptedException
VertexOutputFormatThis 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 VertexOutputFormat<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 final org.apache.hadoop.mapreduce.OutputCommitter getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
VertexOutputFormatgetOutputCommitter 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 task contextIOExceptionInterruptedExceptionprotected abstract HCatalogVertexOutputFormat.HCatalogVertexWriter<I,V,E> createVertexWriter()
public final VertexWriter<I,V,E> 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 taskIOExceptionInterruptedExceptionCopyright © 2011-2019 The Apache Software Foundation. All Rights Reserved.