This project has retired. For details please refer to its Attic page.
GoraOutputFormat (Apache Gora 0.2 API)

org.apache.gora.mapreduce
Class GoraOutputFormat<K,T extends Persistent>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.OutputFormat<K,T>
      extended by org.apache.gora.mapreduce.GoraOutputFormat<K,T>

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.

See Also:
GoraReducer

Field Summary
static String DATA_STORE_CLASS
           
static String OUTPUT_KEY_CLASS
           
static String OUTPUT_VALUE_CLASS
           
 
Constructor Summary
GoraOutputFormat()
           
 
Method Summary
 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>
void
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>
void
setOutput(org.apache.hadoop.mapreduce.Job job, DataStore<K,V> dataStore, boolean reuseObjects)
          Sets the output parameters for the job
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_STORE_CLASS

public static final String DATA_STORE_CLASS
See Also:
Constant Field Values

OUTPUT_KEY_CLASS

public static final String OUTPUT_KEY_CLASS
See Also:
Constant Field Values

OUTPUT_VALUE_CLASS

public static final String OUTPUT_VALUE_CLASS
See Also:
Constant Field Values
Constructor Detail

GoraOutputFormat

public GoraOutputFormat()
Method Detail

checkOutputSpecs

public void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)
                      throws IOException,
                             InterruptedException
Specified by:
checkOutputSpecs in class org.apache.hadoop.mapreduce.OutputFormat<K,T extends Persistent>
Throws:
IOException
InterruptedException

getOutputCommitter

public org.apache.hadoop.mapreduce.OutputCommitter getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                               throws IOException,
                                                                      InterruptedException
Specified by:
getOutputCommitter in class org.apache.hadoop.mapreduce.OutputFormat<K,T extends Persistent>
Throws:
IOException
InterruptedException

getRecordWriter

public org.apache.hadoop.mapreduce.RecordWriter<K,T> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                                                 throws IOException,
                                                                                        InterruptedException
Specified by:
getRecordWriter in class org.apache.hadoop.mapreduce.OutputFormat<K,T extends Persistent>
Throws:
IOException
InterruptedException

setOutput

public static <K,V extends Persistent> void setOutput(org.apache.hadoop.mapreduce.Job job,
                                                      DataStore<K,V> dataStore,
                                                      boolean reuseObjects)
Sets the output parameters for the job

Parameters:
job - the job to set the properties for
dataStore - the datastore as the output
reuseObjects - whether to reuse objects in serialization

setOutput

public 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)
Sets the output parameters for the job

Parameters:
job - the job to set the properties for
dataStoreClass - the datastore class
keyClass - output key class
persistentClass - output value class
reuseObjects - whether to reuse objects in serialization


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.