public class Int2LongKVPartition extends KVPartition
Constructor and Description |
---|
Int2LongKVPartition() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the partition.
|
Int2LongOpenHashMap |
getKVMap()
Get the Int2LongOpenHashMap
|
int |
getNumWriteBytes()
Get the number of bytes of encoded data
|
long |
getVal(int key)
Get the associated value of the key
|
void |
initialize()
Initialization
|
boolean |
isEmpty()
Indicates if the partition is empty or not
|
ValStatus |
putKeyVal(int key,
long val,
TypeLongCombiner combiner)
Put the new key-value pair to the partition.
|
void |
read(java.io.DataInput in)
Read this from DataInput
|
int |
size()
Get the number of key-value pairs
|
void |
write(java.io.DataOutput out)
Write this to DataOutput
|
create, encode, forClass, free, getNumEnocdeBytes, newInstance, release
public void initialize()
public ValStatus putKeyVal(int key, long val, TypeLongCombiner combiner)
key
- the new keyval
- the new valuecombiner
- the combinerpublic long getVal(int key)
key
- the keypublic Int2LongOpenHashMap getKVMap()
public int size()
public boolean isEmpty()
public int getNumWriteBytes()
getNumWriteBytes
in class Writable
public void write(java.io.DataOutput out) throws java.io.IOException