org.apache.hadoop.hbase.io
Class HbaseMapWritable

java.lang.Object
  extended by org.apache.hadoop.hbase.io.HbaseMapWritable
All Implemented Interfaces:
Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>, org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.Writable

public class HbaseMapWritable
extends Object
implements Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>, 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
HbaseMapWritable()
          Default constructor.
 
Method Summary
 void clear()
          
 boolean containsKey(Object key)
          
 boolean containsValue(Object value)
          
 Set<Map.Entry<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>> entrySet()
          
 org.apache.hadoop.io.Writable get(Object key)
          
protected  Class<?> getClass(byte id)
           
 org.apache.hadoop.conf.Configuration getConf()
           
protected  byte getId(Class<?> clazz)
           
 boolean isEmpty()
          
 Set<org.apache.hadoop.io.Writable> keySet()
          
 org.apache.hadoop.io.Writable put(org.apache.hadoop.io.Writable key, org.apache.hadoop.io.Writable value)
          
 void putAll(Map<? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable> t)
          
 void readFields(DataInput in)
           
 org.apache.hadoop.io.Writable remove(Object key)
          
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 int size()
          
 Collection<org.apache.hadoop.io.Writable> values()
          
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

HbaseMapWritable

public HbaseMapWritable()
Default constructor.

Method Detail

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<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

containsKey

public boolean containsKey(Object key)

Specified by:
containsKey in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

containsValue

public boolean containsValue(Object value)

Specified by:
containsValue in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

entrySet

public Set<Map.Entry<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>> entrySet()

Specified by:
entrySet in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

get

public org.apache.hadoop.io.Writable get(Object key)

Specified by:
get in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

keySet

public Set<org.apache.hadoop.io.Writable> keySet()

Specified by:
keySet in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

put

public org.apache.hadoop.io.Writable put(org.apache.hadoop.io.Writable key,
                                         org.apache.hadoop.io.Writable value)

Specified by:
put in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

putAll

public void putAll(Map<? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable> t)

Specified by:
putAll in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

remove

public org.apache.hadoop.io.Writable remove(Object key)

Specified by:
remove in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

size

public int size()

Specified by:
size in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

values

public Collection<org.apache.hadoop.io.Writable> values()

Specified by:
values in interface Map<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>

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

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