public class GoraOutputFormat<K,T extends Persistent>
extends org.apache.hadoop.mapreduce.OutputFormat<K,T>
OutputFormat for Hadoop jobs that want to store the job outputs
to a Gora store.
Hadoop jobs can be either configured through static
setOutput() methods, or if the job is not map-only from GoraReducer.
GoraReducer| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_STORE_CLASS |
static String |
OUTPUT_KEY_CLASS |
static String |
OUTPUT_VALUE_CLASS |
| Constructor and Description |
|---|
GoraOutputFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context) |
org.apache.hadoop.mapreduce.OutputCommitter |
getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context) |
org.apache.hadoop.mapreduce.RecordWriter<K,T> |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) |
static <K,V extends Persistent> |
setOutput(org.apache.hadoop.mapreduce.Job job,
Class<? extends DataStore> dataStoreClass,
Class<K> keyClass,
Class<V> persistentClass,
boolean reuseObjects)
Sets the output parameters for the job
|
static <K,V extends Persistent> |
setOutput(org.apache.hadoop.mapreduce.Job job,
DataStore<K,V> dataStore,
boolean reuseObjects)
Sets the output parameters for the job
|
public static final String DATA_STORE_CLASS
public static final String OUTPUT_KEY_CLASS
public static final String OUTPUT_VALUE_CLASS
public void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)
throws IOException,
InterruptedException
checkOutputSpecs in class org.apache.hadoop.mapreduce.OutputFormat<K,T extends Persistent>IOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.OutputCommitter getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
getOutputCommitter in class org.apache.hadoop.mapreduce.OutputFormat<K,T extends Persistent>IOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.RecordWriter<K,T> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
getRecordWriter in class org.apache.hadoop.mapreduce.OutputFormat<K,T extends Persistent>IOExceptionInterruptedExceptionpublic static <K,V extends Persistent> void setOutput(org.apache.hadoop.mapreduce.Job job, DataStore<K,V> dataStore, boolean reuseObjects)
job - the job to set the properties fordataStore - the datastore as the outputreuseObjects - whether to reuse objects in serializationpublic static <K,V extends Persistent> void setOutput(org.apache.hadoop.mapreduce.Job job, Class<? extends DataStore> dataStoreClass, Class<K> keyClass, Class<V> persistentClass, boolean reuseObjects)
job - the job to set the properties fordataStoreClass - the datastore classkeyClass - output key classpersistentClass - output value classreuseObjects - whether to reuse objects in serializationCopyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.