org.apache.hadoop.hbase
Class HTable.ClientScanner

java.lang.Object
  extended by org.apache.hadoop.hbase.HTable.ClientScanner
All Implemented Interfaces:
Closeable, Iterable<Map.Entry<HStoreKey,SortedMap<org.apache.hadoop.io.Text,byte[]>>>, HScannerInterface
Enclosing class:
HTable

protected class HTable.ClientScanner
extends Object
implements HScannerInterface

Implements the scanner interface for the HBase client. If there are multiple regions in a table, this scanner will iterate through them all.


Constructor Summary
protected HTable.ClientScanner(org.apache.hadoop.io.Text[] columns, org.apache.hadoop.io.Text startRow, long timestamp, RowFilterInterface filter)
           
 
Method Summary
 void close()
          Closes a scanner and releases any resources it has allocated
 Iterator<Map.Entry<HStoreKey,SortedMap<org.apache.hadoop.io.Text,byte[]>>> iterator()
          
 boolean next(HStoreKey key, SortedMap<org.apache.hadoop.io.Text,byte[]> results)
          Grab the next row's worth of values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTable.ClientScanner

protected HTable.ClientScanner(org.apache.hadoop.io.Text[] columns,
                               org.apache.hadoop.io.Text startRow,
                               long timestamp,
                               RowFilterInterface filter)
                        throws IOException
Throws:
IOException
Method Detail

next

public boolean next(HStoreKey key,
                    SortedMap<org.apache.hadoop.io.Text,byte[]> results)
             throws IOException
Grab the next row's worth of values. The scanner will return the most recent data value for each row that is not newer than the target time passed when the scanner was created.

Specified by:
next in interface HScannerInterface
Parameters:
key - will contain the row and timestamp upon return
results - will contain an entry for each column family member and its value
Returns:
true if data was returned
Throws:
IOException

close

public void close()
           throws IOException
Closes a scanner and releases any resources it has allocated

Specified by:
close in interface Closeable
Specified by:
close in interface HScannerInterface
Throws:
IOException

iterator

public Iterator<Map.Entry<HStoreKey,SortedMap<org.apache.hadoop.io.Text,byte[]>>> iterator()

Specified by:
iterator in interface Iterable<Map.Entry<HStoreKey,SortedMap<org.apache.hadoop.io.Text,byte[]>>>


Copyright © 2008 The Apache Software Foundation