public abstract class Int2ValKVPartition<V extends Value> extends KVPartition
Constructor and Description |
---|
Int2ValKVPartition() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the partition.
|
<any> |
getKVMap()
Get the Int2ObjectOpenHashMap
|
int |
getNumWriteBytes()
Get the number of bytes of encoded data
|
V |
getVal(int key)
Get the associated value of the key
|
java.lang.Class<V> |
getVClass()
Get the class of the values
|
void |
initialize(java.lang.Class<V> vClass)
Initialization
|
ValStatus |
putKeyVal(int key,
V val,
ValCombiner<V> combiner)
Put the new key-value pair to the partition.
|
void |
read(java.io.DataInput in)
Read this from DataInput
|
V |
removeVal(int key)
Removes this key and the associated value
from this function if it is present.
|
void |
write(java.io.DataOutput out)
Write this to DataOutput
|
create, encode, forClass, free, getNumEnocdeBytes, newInstance, release
public void initialize(java.lang.Class<V> vClass)
public ValStatus putKeyVal(int key, V val, ValCombiner<V> combiner)
key
- the new keyval
- the new valuecombiner
- the combinerpublic V removeVal(int key)
key
- the keypublic V getVal(int key)
key
- the keypublic <any> getKVMap()
public java.lang.Class<V> getVClass()
public void clear()
public int getNumWriteBytes()
getNumWriteBytes
in class Writable
public void write(java.io.DataOutput out) throws java.io.IOException