org.apache.hadoop.hbase.io
Class RowResult

java.lang.Object
  extended by org.apache.hadoop.hbase.io.RowResult
All Implemented Interfaces:
Comparable, Map<byte[],Cell>, SortedMap<byte[],Cell>, org.apache.hadoop.io.Writable

public class RowResult
extends Object
implements org.apache.hadoop.io.Writable, SortedMap<byte[],Cell>, Comparable

Holds row name and then a map of columns to cells.


Nested Class Summary
 class RowResult.Entry
          Row entry.
 
Constructor Summary
RowResult()
          default constructor for writable
RowResult(byte[] row, HbaseMapWritable<byte[],Cell> m)
          Create a RowResult from a row and Cell map
 
Method Summary
 void clear()
           
 Comparator<? super byte[]> comparator()
           
 int compareTo(Object o)
          Comparing this RowResult with another one by comparing the row in it.
 boolean containsKey(Object key)
           
 boolean containsKey(String key)
           
 boolean containsValue(Object value)
           
 Set<Map.Entry<byte[],Cell>> entrySet()
           
 byte[] firstKey()
           
 Cell get(byte[] column)
          Get the Cell that corresponds to column
 Cell get(Object key)
           
 Cell get(String key)
          Get the Cell that corresponds to column, using a String key
 byte[] getRow()
          Get the row for this RowResult
 SortedMap<byte[],Cell> headMap(byte[] toKey)
           
 boolean isEmpty()
           
 Set<byte[]> keySet()
           
 byte[] lastKey()
           
 Cell put(byte[] key, Cell value)
           
 void putAll(Map map)
           
 void readFields(DataInput in)
           
 Cell remove(Object key)
           
 int size()
           
 SortedMap<byte[],Cell> subMap(byte[] fromKey, byte[] toKey)
           
 SortedMap<byte[],Cell> tailMap(byte[] fromKey)
           
 String toString()
           
 Collection<Cell> values()
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

RowResult

public RowResult()
default constructor for writable


RowResult

public RowResult(byte[] row,
                 HbaseMapWritable<byte[],Cell> m)
Create a RowResult from a row and Cell map

Parameters:
row -
m -
Method Detail

getRow

public byte[] getRow()
Get the row for this RowResult

Returns:
the row

put

public Cell put(byte[] key,
                Cell value)
Specified by:
put in interface Map<byte[],Cell>

putAll

public void putAll(Map map)
Specified by:
putAll in interface Map<byte[],Cell>

get

public Cell get(Object key)
Specified by:
get in interface Map<byte[],Cell>

remove

public Cell remove(Object key)
Specified by:
remove in interface Map<byte[],Cell>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<byte[],Cell>

containsKey

public boolean containsKey(String key)

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<byte[],Cell>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<byte[],Cell>

size

public int size()
Specified by:
size in interface Map<byte[],Cell>

clear

public void clear()
Specified by:
clear in interface Map<byte[],Cell>

keySet

public Set<byte[]> keySet()
Specified by:
keySet in interface Map<byte[],Cell>
Specified by:
keySet in interface SortedMap<byte[],Cell>

entrySet

public Set<Map.Entry<byte[],Cell>> entrySet()
Specified by:
entrySet in interface Map<byte[],Cell>
Specified by:
entrySet in interface SortedMap<byte[],Cell>

values

public Collection<Cell> values()
Specified by:
values in interface Map<byte[],Cell>
Specified by:
values in interface SortedMap<byte[],Cell>

get

public Cell get(byte[] column)
Get the Cell that corresponds to column

Parameters:
column -
Returns:
the Cell

get

public Cell get(String key)
Get the Cell that corresponds to column, using a String key

Parameters:
key -
Returns:
the Cell

comparator

public Comparator<? super byte[]> comparator()
Specified by:
comparator in interface SortedMap<byte[],Cell>

firstKey

public byte[] firstKey()
Specified by:
firstKey in interface SortedMap<byte[],Cell>

headMap

public SortedMap<byte[],Cell> headMap(byte[] toKey)
Specified by:
headMap in interface SortedMap<byte[],Cell>

lastKey

public byte[] lastKey()
Specified by:
lastKey in interface SortedMap<byte[],Cell>

subMap

public SortedMap<byte[],Cell> subMap(byte[] fromKey,
                                     byte[] toKey)
Specified by:
subMap in interface SortedMap<byte[],Cell>

tailMap

public SortedMap<byte[],Cell> tailMap(byte[] fromKey)
Specified by:
tailMap in interface SortedMap<byte[],Cell>

toString

public String toString()
Overrides:
toString in class Object

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

compareTo

public int compareTo(Object o)
Comparing this RowResult with another one by comparing the row in it.

Specified by:
compareTo in interface Comparable
Parameters:
o - the RowResult Object to compare to
Returns:
the compare number


Copyright © 2008 The Apache Software Foundation