public class CrunchOutputs<K,V> extends Object
CrunchInputs
for handling multiple OutputFormat
instances
writing to multiple files within a single MapReduce job.Modifier and Type | Field and Description |
---|---|
static String |
CRUNCH_OUTPUTS |
Constructor and Description |
---|
CrunchOutputs(org.apache.hadoop.mapreduce.TaskInputOutputContext<?,?,K,V> context)
Creates and initializes multiple outputs support,
it should be instantiated in the Mapper/Reducer setup method.
|
Modifier and Type | Method and Description |
---|---|
static void |
addNamedOutput(org.apache.hadoop.mapreduce.Job job,
String name,
Class<? extends org.apache.hadoop.mapreduce.OutputFormat> outputFormatClass,
Class keyClass,
Class valueClass) |
static void |
addNamedOutput(org.apache.hadoop.mapreduce.Job job,
String name,
FormatBundle<? extends org.apache.hadoop.mapreduce.OutputFormat> outputBundle,
Class keyClass,
Class valueClass) |
void |
close() |
void |
write(String namedOutput,
K key,
V value) |
public static final String CRUNCH_OUTPUTS
public static void addNamedOutput(org.apache.hadoop.mapreduce.Job job, String name, Class<? extends org.apache.hadoop.mapreduce.OutputFormat> outputFormatClass, Class keyClass, Class valueClass)
public static void addNamedOutput(org.apache.hadoop.mapreduce.Job job, String name, FormatBundle<? extends org.apache.hadoop.mapreduce.OutputFormat> outputBundle, Class keyClass, Class valueClass)
public void write(String namedOutput, K key, V value) throws IOException, InterruptedException
IOException
InterruptedException
public void close() throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.