Class BytesWritableSerializer
java.lang.Object
org.apache.hadoop.mapred.nativetask.serde.BytesWritableSerializer
- All Implemented Interfaces:
INativeComparable,INativeSerializer<org.apache.hadoop.io.BytesWritable>
@Private
public class BytesWritableSerializer
extends Object
implements INativeComparable, INativeSerializer<org.apache.hadoop.io.BytesWritable>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(DataInput in, int length, org.apache.hadoop.io.BytesWritable w) intgetLength(org.apache.hadoop.io.BytesWritable w) get length of data to be serialized.voidserialize(org.apache.hadoop.io.BytesWritable w, DataOutput out)
-
Constructor Details
-
BytesWritableSerializer
public BytesWritableSerializer()
-
-
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.BytesWritable>- Throws:
IOException
-
serialize
- Specified by:
serializein interfaceINativeSerializer<org.apache.hadoop.io.BytesWritable>- Throws:
IOException
-
deserialize
public void deserialize(DataInput in, int length, org.apache.hadoop.io.BytesWritable w) throws IOException - Specified by:
deserializein interfaceINativeSerializer<org.apache.hadoop.io.BytesWritable>- Throws:
IOException
-