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
Modifier and TypeClassDescriptionstatic class
Converts AvroWrappers into their wrapped Avro data.static class
Converts BooleanWritables into Booleans.static class
Converts BytesWritables into ByteBuffers.static class
Converts ByteWritables into GenericFixed of size 1.static class
Converts DoubleWritables into Doubles.static class
Converts FloatWritables into Floats.static class
Converts IntWritables into Ints.static class
Converts LongWritables into Longs.static class
Converts NullWritables into Nulls.static class
Converts Text into CharSequences. -
Constructor Summary
ConstructorDescriptionCreates a newAvroDatumConverterFactory
instance. -
Method Summary
Modifier and TypeMethodDescription<IN,
OUT> AvroDatumConverter <IN, OUT> Creates a converter that turns objects of typeinputClass
into Avro data.Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
-
Constructor Details
-
AvroDatumConverterFactory
Creates a newAvroDatumConverterFactory
instance.- Parameters:
conf
- The job configuration.
-
-
Method Details
-
create
Creates a converter that turns objects of typeinputClass
into Avro data.- Parameters:
inputClass
- The type of input data to convert.- Returns:
- A converter that turns objects of type
inputClass
into Avro data.
-