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<Result>, ResultScanner
Direct Known Subclasses:
TransactionalTable.TransactionalClientScanner
Enclosing class:
HTable

protected class HTable.ClientScanner
extends Object
implements ResultScanner

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(Scan scan)
           
 
Method Summary
 void close()
          Closes the scanner and releases any resources it has allocated
protected  Scan getScan()
           
protected  ScannerCallable getScannerCallable(byte[] localStartKey, int nbRows)
           
protected  long getTimestamp()
           
 void initialize()
           
 Iterator<Result> iterator()
           
 Result next()
          Grab the next row's worth of values.
 Result[] next(int nbRows)
           
 
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(Scan scan)
Method Detail

initialize

public void initialize()
                throws IOException
Throws:
IOException

getScan

protected Scan getScan()

getTimestamp

protected long getTimestamp()

getScannerCallable

protected ScannerCallable getScannerCallable(byte[] localStartKey,
                                             int nbRows)

next

public Result next()
            throws IOException
Description copied from interface: ResultScanner
Grab the next row's worth of values. The scanner will return a Result.

Specified by:
next in interface ResultScanner
Returns:
Result object if there is another row, null if the scanner is exhausted.
Throws:
IOException

next

public Result[] next(int nbRows)
              throws IOException
Specified by:
next in interface ResultScanner
Parameters:
nbRows - number of rows to return
Returns:
Between zero and nbRows RowResults
Throws:
IOException

close

public void close()
Description copied from interface: ResultScanner
Closes the scanner and releases any resources it has allocated

Specified by:
close in interface Closeable
Specified by:
close in interface ResultScanner

iterator

public Iterator<Result> iterator()
Specified by:
iterator in interface Iterable<Result>


Copyright © 2009 The Apache Software Foundation