org.apache.avro.hadoop.io
Class AvroDatumConverterFactory

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.avro.hadoop.io.AvroDatumConverterFactory
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable

public class AvroDatumConverterFactory
extends org.apache.hadoop.conf.Configured

Constructs converters that turn objects (usually from the output of a MR job) into Avro data that can be serialized.

Currently, only the following types have implemented converters:


Nested Class Summary
static class AvroDatumConverterFactory.AvroWrapperConverter
          Converts AvroWrappers into their wrapped Avro data.
static class AvroDatumConverterFactory.BooleanWritableConverter
          Converts BooleanWritables into Booleans.
static class AvroDatumConverterFactory.BytesWritableConverter
          Converts BytesWritables into ByteBuffers.
static class AvroDatumConverterFactory.ByteWritableConverter
          Converts ByteWritables into GenericFixed of size 1.
static class AvroDatumConverterFactory.DoubleWritableConverter
          Converts DoubleWritables into Doubles.
static class AvroDatumConverterFactory.FloatWritableConverter
          Converts FloatWritables into Floats.
static class AvroDatumConverterFactory.IntWritableConverter
          Converts IntWritables into Ints.
static class AvroDatumConverterFactory.LongWritableConverter
          Converts LongWritables into Longs.
static class AvroDatumConverterFactory.NullWritableConverter
          Converts NullWritables into Nulls.
static class AvroDatumConverterFactory.TextConverter
          Converts Text into CharSequences.
 
Constructor Summary
AvroDatumConverterFactory(org.apache.hadoop.conf.Configuration conf)
          Creates a new AvroDatumConverterFactory instance.
 
Method Summary
<IN,OUT> AvroDatumConverter<IN,OUT>
create(Class<IN> inputClass)
          Creates a converter that turns objects of type inputClass into Avro data.
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroDatumConverterFactory

public AvroDatumConverterFactory(org.apache.hadoop.conf.Configuration conf)
Creates a new AvroDatumConverterFactory instance.

Parameters:
conf - The job configuration.
Method Detail

create

public <IN,OUT> AvroDatumConverter<IN,OUT> create(Class<IN> inputClass)
Creates a converter that turns objects of type inputClass into Avro data.

Parameters:
inputClass - The type of input data to convert.
Returns:
A converter that turns objects of type inputClass into Avro data.


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