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 | Class and Description |
---|---|
static class |
CrunchOutputs.OutputConfig<K,V> |
Modifier and Type | Field and Description |
---|---|
static String |
CRUNCH_DISABLE_OUTPUT_COUNTERS |
static String |
CRUNCH_OUTPUTS |
Constructor and Description |
---|
CrunchOutputs(org.apache.hadoop.conf.Configuration conf) |
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) |
static void |
checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext jc) |
void |
close() |
static Map<String,CrunchOutputs.OutputConfig> |
getNamedOutputs(org.apache.hadoop.conf.Configuration conf) |
static org.apache.hadoop.mapreduce.OutputCommitter |
getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext tac) |
void |
write(String namedOutput,
K key,
V value) |
public static final String CRUNCH_OUTPUTS
public static final String CRUNCH_DISABLE_OUTPUT_COUNTERS
public CrunchOutputs(org.apache.hadoop.mapreduce.TaskInputOutputContext<?,?,K,V> context)
context
- the TaskInputOutputContext objectpublic CrunchOutputs(org.apache.hadoop.conf.Configuration conf)
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 static void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext jc) throws IOException, InterruptedException
IOException
InterruptedException
public static org.apache.hadoop.mapreduce.OutputCommitter getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext tac) throws IOException, InterruptedException
IOException
InterruptedException
public static Map<String,CrunchOutputs.OutputConfig> getNamedOutputs(org.apache.hadoop.conf.Configuration conf)
public void write(String namedOutput, K key, V value) throws IOException, InterruptedException
IOException
InterruptedException
public void close() throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2016 The Apache Software Foundation. All rights reserved.