org.apache.hadoop.hbase.client
Class HTable.ClientScanner

java.lang.Object
  extended by org.apache.hadoop.hbase.client.HTable.ClientScanner
All Implemented Interfaces:
Closeable, Iterable<RowResult>, Scanner
Enclosing class:
HTable

protected class HTable.ClientScanner
extends Object
implements Scanner

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


Field Summary
protected  RowFilterInterface filter
           
protected  long scanTime
           
 
Constructor Summary
protected HTable.ClientScanner(byte[][] columns, byte[] startRow, long timestamp, RowFilterInterface filter)
           
protected HTable.ClientScanner(org.apache.hadoop.io.Text[] columns, org.apache.hadoop.io.Text startRow, long timestamp, RowFilterInterface filter)
           
 
Method Summary
 void close()
          Closes the scanner and releases any resources it has allocated
protected  byte[][] getColumns()
           
protected  RowFilterInterface getFilter()
           
protected  ScannerCallable getScannerCallable(byte[] localStartKey)
           
protected  long getTimestamp()
           
 Iterator<RowResult> iterator()
          
 RowResult next()
          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
 

Field Detail

scanTime

protected long scanTime

filter

protected RowFilterInterface filter
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

HTable.ClientScanner

protected HTable.ClientScanner(byte[][] columns,
                               byte[] startRow,
                               long timestamp,
                               RowFilterInterface filter)
                        throws IOException
Throws:
IOException
Method Detail

getColumns

protected byte[][] getColumns()

getTimestamp

protected long getTimestamp()

getFilter

protected RowFilterInterface getFilter()

getScannerCallable

protected ScannerCallable getScannerCallable(byte[] localStartKey)

next

public RowResult next()
               throws IOException
Grab the next row's worth of values. The scanner will return a RowResult that contains both the row's key and a map of byte[] column names to Cell value objects. The data returned will only contain 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 Scanner
Returns:
RowResult object if there is another row, null if the scanner is exhausted.
Throws:
IOException

close

public void close()
Closes the scanner and releases any resources it has allocated

Specified by:
close in interface Closeable
Specified by:
close in interface Scanner

iterator

public Iterator<RowResult> iterator()

Specified by:
iterator in interface Iterable<RowResult>


Copyright © 2008 The Apache Software Foundation