@InterfaceAudience.Private public class KVSerializer<K,V> extends Object implements IKVSerializer
Modifier and Type | Field and Description |
---|---|
static int |
KV_HEAD_LENGTH |
Constructor and Description |
---|
KVSerializer(Class<K> kclass,
Class<V> vclass) |
Modifier and Type | Method and Description |
---|---|
int |
deserializeKV(DataInputStream in,
SizedWritable<?> key,
SizedWritable<?> value) |
int |
serializeKV(DataOutputStream out,
SizedWritable<?> key,
SizedWritable<?> value) |
int |
serializePartitionKV(DataOutputStream out,
int partitionId,
SizedWritable<?> key,
SizedWritable<?> value) |
void |
updateLength(SizedWritable<?> key,
SizedWritable<?> value)
update the length field of SizedWritable
|
public static final int KV_HEAD_LENGTH
public KVSerializer(Class<K> kclass, Class<V> vclass) throws IOException
IOException
public void updateLength(SizedWritable<?> key, SizedWritable<?> value) throws IOException
IKVSerializer
updateLength
in interface IKVSerializer
IOException
public int serializeKV(DataOutputStream out, SizedWritable<?> key, SizedWritable<?> value) throws IOException
serializeKV
in interface IKVSerializer
IOException
public int serializePartitionKV(DataOutputStream out, int partitionId, SizedWritable<?> key, SizedWritable<?> value) throws IOException
serializePartitionKV
in interface IKVSerializer
IOException
public int deserializeKV(DataInputStream in, SizedWritable<?> key, SizedWritable<?> value) throws IOException
deserializeKV
in interface IKVSerializer
IOException
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.