K
- V
- value Expects a Writable or byte [].public class HbaseMapWritable<K,V> extends Object implements SortedMap<byte[],V>, org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.Writable, CodeToClassAndBack
MapWritable
but dumb. It will fail
if passed a value type that it has not already been told about. Its been
primed with hbase Writables and byte []. Keys are always byte arrays.CodeToClassAndBack.InternalStaticLoader
Modifier and Type | Field and Description |
---|---|
protected SortedMap<byte[],V> |
instance |
CLASS_TO_CODE, classList, CODE_TO_CLASS, sl
Constructor and Description |
---|
HbaseMapWritable()
The default contructor where a TreeMap is used
|
HbaseMapWritable(SortedMap<byte[],V> map)
Contructor where another SortedMap can be used
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
Comparator<? super byte[]> |
comparator() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<byte[],V>> |
entrySet() |
byte[] |
firstKey() |
V |
get(Object key) |
protected Class<?> |
getClass(byte id) |
org.apache.hadoop.conf.Configuration |
getConf() |
protected byte |
getId(Class<?> clazz) |
SortedMap<byte[],V> |
headMap(byte[] toKey) |
boolean |
isEmpty() |
Set<byte[]> |
keySet() |
byte[] |
lastKey() |
V |
put(byte[] key,
V value) |
void |
putAll(Map<? extends byte[],? extends V> m) |
void |
readFields(DataInput in) |
V |
remove(Object key) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
int |
size() |
SortedMap<byte[],V> |
subMap(byte[] fromKey,
byte[] toKey) |
SortedMap<byte[],V> |
tailMap(byte[] fromKey) |
String |
toString() |
Collection<V> |
values() |
void |
write(DataOutput out) |
public HbaseMapWritable()
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
conf
- the conf to setpublic boolean containsKey(Object key)
containsKey
in interface Map<byte[],V>
public boolean containsValue(Object value)
containsValue
in interface Map<byte[],V>
public Set<byte[]> keySet()
public Collection<V> values()
public Comparator<? super byte[]> comparator()
comparator
in interface SortedMap<byte[],V>
protected Class<?> getClass(byte id)
protected byte getId(Class<?> clazz)
public String toString()
toString
in class Object
Object.toString()
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.