org.apache.hadoop.hbase.io
Class HbaseMapWritable<K,V>
java.lang.Object
org.apache.hadoop.hbase.io.HbaseMapWritable<K,V>
- Type Parameters:
K
- key TODO: Parameter K is never used, could be removed.V
- value Expects a Writable or byte [].
- All Implemented Interfaces:
- Map<byte[],V>, SortedMap<byte[],V>, org.apache.hadoop.conf.Configurable, CodeToClassAndBack, org.apache.hadoop.io.Writable
public class HbaseMapWritable<K,V>
- extends Object
- implements SortedMap<byte[],V>, org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.Writable, CodeToClassAndBack
A Writable Map.
Like 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.
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
instance
protected SortedMap<byte[],V> instance
HbaseMapWritable
public HbaseMapWritable()
- The default contructor where a TreeMap is used
HbaseMapWritable
public HbaseMapWritable(SortedMap<byte[],V> map)
- Contructor where another SortedMap can be used
- Parameters:
map
- the SortedMap to be used
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConf
in interface org.apache.hadoop.conf.Configurable
- Returns:
- the conf
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Specified by:
setConf
in interface org.apache.hadoop.conf.Configurable
- Parameters:
conf
- the conf to set
clear
public void clear()
- Specified by:
clear
in interface Map<byte[],V>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map<byte[],V>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interface Map<byte[],V>
entrySet
public Set<Map.Entry<byte[],V>> entrySet()
- Specified by:
entrySet
in interface Map<byte[],V>
- Specified by:
entrySet
in interface SortedMap<byte[],V>
get
public V get(Object key)
- Specified by:
get
in interface Map<byte[],V>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<byte[],V>
keySet
public Set<byte[]> keySet()
- Specified by:
keySet
in interface Map<byte[],V>
- Specified by:
keySet
in interface SortedMap<byte[],V>
size
public int size()
- Specified by:
size
in interface Map<byte[],V>
values
public Collection<V> values()
- Specified by:
values
in interface Map<byte[],V>
- Specified by:
values
in interface SortedMap<byte[],V>
putAll
public void putAll(Map<? extends byte[],? extends V> m)
- Specified by:
putAll
in interface Map<byte[],V>
remove
public V remove(Object key)
- Specified by:
remove
in interface Map<byte[],V>
put
public V put(byte[] key,
V value)
- Specified by:
put
in interface Map<byte[],V>
comparator
public Comparator<? super byte[]> comparator()
- Specified by:
comparator
in interface SortedMap<byte[],V>
firstKey
public byte[] firstKey()
- Specified by:
firstKey
in interface SortedMap<byte[],V>
headMap
public SortedMap<byte[],V> headMap(byte[] toKey)
- Specified by:
headMap
in interface SortedMap<byte[],V>
lastKey
public byte[] lastKey()
- Specified by:
lastKey
in interface SortedMap<byte[],V>
subMap
public SortedMap<byte[],V> subMap(byte[] fromKey,
byte[] toKey)
- Specified by:
subMap
in interface SortedMap<byte[],V>
tailMap
public SortedMap<byte[],V> tailMap(byte[] fromKey)
- Specified by:
tailMap
in interface SortedMap<byte[],V>
getClass
protected Class<?> getClass(byte id)
- Returns:
- the Class class for the specified id
getId
protected byte getId(Class<?> clazz)
- Returns:
- the id for the specified Class
toString
public String toString()
- Overrides:
toString
in class Object
- See Also:
Object.toString()
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.