org.apache.hadoop.hbase.client
Class AbstractClientScanner
java.lang.Object
org.apache.hadoop.hbase.client.AbstractClientScanner
- All Implemented Interfaces:
- Closeable, Iterable<Result>, ResultScanner
- Direct Known Subclasses:
- ClientScanner
@InterfaceAudience.Private
public abstract class AbstractClientScanner
- extends Object
- implements ResultScanner
Helper class for custom client scanners.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
scanMetrics
protected ScanMetrics scanMetrics
AbstractClientScanner
public AbstractClientScanner()
initScanMetrics
protected void initScanMetrics(Scan scan)
- Check and initialize if application wants to collect scan metrics
getScanMetrics
public ScanMetrics getScanMetrics()
next
public Result[] next(int nbRows)
throws IOException
- Get nbRows rows.
How many RPCs are made is determined by the
Scan.setCaching(int)
setting (or hbase.client.scanner.caching in hbase-site.xml).
- Specified by:
next
in interface ResultScanner
- Parameters:
nbRows
- number of rows to return
- Returns:
- Between zero and nbRows RowResults. Scan is done
if returned array is of zero-length (We never return null).
- Throws:
IOException
iterator
public Iterator<Result> iterator()
- Specified by:
iterator
in interface Iterable<Result>
renewLease
public abstract boolean renewLease()
- Allow the client to renew the scanner's lease on the server.
- Returns:
- true if the lease was successfully renewed, false otherwise.
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.