Class DefaultSerializer
java.lang.Object
org.apache.hadoop.mapred.nativetask.serde.DefaultSerializer
- All Implemented Interfaces:
INativeSerializer<org.apache.hadoop.io.Writable>
- Direct Known Subclasses:
BoolWritableSerializer,ByteWritableSerializer,DoubleWritableSerializer,FloatWritableSerializer,IntWritableSerializer,LongWritableSerializer,NullWritableSerializer,VIntWritableSerializer,VLongWritableSerializer
@Public
@Evolving
public class DefaultSerializer
extends Object
implements INativeSerializer<org.apache.hadoop.io.Writable>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(DataInput in, int length, org.apache.hadoop.io.Writable w) intgetLength(org.apache.hadoop.io.Writable w) get length of data to be serialized.voidserialize(org.apache.hadoop.io.Writable w, DataOutput out)
-
Constructor Details
-
DefaultSerializer
public DefaultSerializer()
-
-
Method Details
-
getLength
Description copied from interface:INativeSerializerget length of data to be serialized. If the data length is already known (like IntWritable) and could immediately be returned from this method, it is good chance to implement customized NativeSerializer for efficiency- Specified by:
getLengthin interfaceINativeSerializer<org.apache.hadoop.io.Writable>- Throws:
IOException
-
serialize
- Specified by:
serializein interfaceINativeSerializer<org.apache.hadoop.io.Writable>- Throws:
IOException
-
deserialize
public void deserialize(DataInput in, int length, org.apache.hadoop.io.Writable w) throws IOException - Specified by:
deserializein interfaceINativeSerializer<org.apache.hadoop.io.Writable>- Throws:
IOException
-