This project has retired. For details please refer to its Attic page.
FormatBundle (Apache Crunch 0.6.0 API)

org.apache.crunch.io
Class FormatBundle<K>

java.lang.Object
  extended by org.apache.crunch.io.FormatBundle<K>
All Implemented Interfaces:
Serializable

public class FormatBundle<K>
extends Object
implements Serializable

A combination of an InputFormat or OutputFormat and any extra configuration information that format class needs to run.

The FormatBundle allow us to let different formats act as if they are the only format that exists in a particular MapReduce job, even when we have multiple types of inputs and outputs within a single job.

See Also:
Serialized Form

Method Summary
 org.apache.hadoop.conf.Configuration configure(org.apache.hadoop.conf.Configuration conf)
           
 boolean equals(Object other)
           
static
<T extends org.apache.hadoop.mapreduce.InputFormat<?,?>>
FormatBundle<T>
forInput(Class<T> inputFormatClass)
           
static
<T extends org.apache.hadoop.mapreduce.OutputFormat<?,?>>
FormatBundle<T>
forOutput(Class<T> inputFormatClass)
           
static
<T> FormatBundle<T>
fromSerialized(String serialized, Class<T> clazz)
           
 Class<K> getFormatClass()
           
 String getName()
           
 int hashCode()
           
 String serialize()
           
 FormatBundle<K> set(String key, String value)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fromSerialized

public static <T> FormatBundle<T> fromSerialized(String serialized,
                                                 Class<T> clazz)

forInput

public static <T extends org.apache.hadoop.mapreduce.InputFormat<?,?>> FormatBundle<T> forInput(Class<T> inputFormatClass)

forOutput

public static <T extends org.apache.hadoop.mapreduce.OutputFormat<?,?>> FormatBundle<T> forOutput(Class<T> inputFormatClass)

set

public FormatBundle<K> set(String key,
                           String value)

getFormatClass

public Class<K> getFormatClass()

configure

public org.apache.hadoop.conf.Configuration configure(org.apache.hadoop.conf.Configuration conf)

serialize

public String serialize()

getName

public String getName()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object


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