org.apache.hadoop.hbase.io
Class HbaseMapWritable<K,V>
java.lang.Object
org.apache.hadoop.hbase.io.HbaseMapWritable<K,V>
- Type Parameters:
K
- keyV
- value
- All Implemented Interfaces:
- Map<byte[],V>, SortedMap<byte[],V>, org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.Writable
public class HbaseMapWritable<K,V>
- extends Object
- implements SortedMap<byte[],V>, org.apache.hadoop.io.Writable, org.apache.hadoop.conf.Configurable
A Writable Map.
Like MapWritable
but dumb. It will fail
if passed a Writable it has not already been told about. Its also been
primed with hbase Writables. Keys are always byte arrays. Thats other
difference from MapWritable.
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
HbaseMapWritable
public HbaseMapWritable()
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>
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>
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>
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
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 © 2008 The Apache Software Foundation