Package org.apache.avro.hadoop.io
Class AvroDatumConverterFactory
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.avro.hadoop.io.AvroDatumConverterFactory
- All Implemented Interfaces:
Configurable
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:
- AvroKey
- AvroValue
- BooleanWritable
- BytesWritable
- ByteWritable
- DoubleWritable
- FloatWritable
- IntWritable
- LongWritable
- NullWritable
- Text
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConverts AvroWrappers into their wrapped Avro data.static classConverts BooleanWritables into Booleans.static classConverts BytesWritables into ByteBuffers.static classConverts ByteWritables into GenericFixed of size 1.static classConverts DoubleWritables into Doubles.static classConverts FloatWritables into Floats.static classConverts IntWritables into Ints.static classConverts LongWritables into Longs.static classConverts NullWritables into Nulls.static classConverts Text into CharSequences. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newAvroDatumConverterFactoryinstance. -
Method Summary
Modifier and TypeMethodDescription<IN,OUT> AvroDatumConverter <IN, OUT> Creates a converter that turns objects of typeinputClassinto Avro data.Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
-
Constructor Details
-
AvroDatumConverterFactory
Creates a newAvroDatumConverterFactoryinstance.- Parameters:
conf- The job configuration.
-
-
Method Details
-
create
Creates a converter that turns objects of typeinputClassinto Avro data.- Parameters:
inputClass- The type of input data to convert.- Returns:
- A converter that turns objects of type
inputClassinto Avro data.
-