@InterfaceAudience.Public @InterfaceStability.Stable public class ClientScanner extends AbstractClientScanner
| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<Result> |
cache |
protected int |
caching |
protected RpcRetryingCaller<Result[]> |
caller |
protected boolean |
closed |
protected HRegionInfo |
currentRegion |
protected long |
lastNext |
protected Result |
lastResult |
protected long |
maxScannerResultSize |
protected Scan |
scan |
protected ScanMetrics |
scanMetrics |
protected boolean |
scanMetricsPublished |
| Constructor and Description |
|---|
ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
byte[] tableName)
Deprecated.
|
ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
byte[] tableName,
HConnection connection)
Deprecated.
|
ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName)
Create a new ClientScanner for the specified table.
|
ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
HConnection connection)
Create a new ClientScanner for the specified table
Note that the passed
Scan's start row maybe changed changed. |
ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
HConnection connection,
RpcRetryingCallerFactory rpcFactory)
Create a new ClientScanner for the specified table Note that the passed
Scan's start
row maybe changed changed. |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkScanStopRow(byte[] endKey) |
void |
close()
Closes the scanner and releases any resources it has allocated
|
protected HConnection |
getConnection() |
protected Scan |
getScan() |
protected ScannerCallable |
getScannerCallable(byte[] localStartKey,
int nbRows) |
protected TableName |
getTable() |
protected byte[] |
getTableName()
Deprecated.
Since 0.96.0; use
getTable() |
protected long |
getTimestamp() |
protected void |
initializeScannerInConstruction() |
Result |
next()
Grab the next row's worth of values.
|
Result[] |
next(int nbRows)
Get nbRows rows.
|
protected void |
writeScanMetrics()
Publish the scan metrics.
|
iteratorprotected Scan scan
protected boolean closed
protected HRegionInfo currentRegion
protected final LinkedList<Result> cache
protected final int caching
protected long lastNext
protected Result lastResult
protected ScanMetrics scanMetrics
protected final long maxScannerResultSize
protected boolean scanMetricsPublished
protected RpcRetryingCaller<Result[]> caller
public ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName)
throws IOException
Scan's start row maybe changed changed.conf - The Configuration to use.scan - Scan to use in this scannertableName - The table that we wish to scanIOException@Deprecated public ClientScanner(org.apache.hadoop.conf.Configuration conf, Scan scan, byte[] tableName) throws IOException
ClientScanner(Configuration, Scan, TableName)IOExceptionpublic ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
HConnection connection)
throws IOException
Scan's start row maybe changed changed.conf - The Configuration to use.scan - Scan to use in this scannertableName - The table that we wish to scanconnection - Connection identifying the clusterIOException@Deprecated public ClientScanner(org.apache.hadoop.conf.Configuration conf, Scan scan, byte[] tableName, HConnection connection) throws IOException
ClientScanner(Configuration, Scan, TableName, HConnection)IOExceptionpublic ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
HConnection connection,
RpcRetryingCallerFactory rpcFactory)
throws IOException
Scan's start
row maybe changed changed.conf - The Configuration to use.scan - Scan to use in this scannertableName - The table that we wish to scanconnection - Connection identifying the clusterIOExceptionprotected void initializeScannerInConstruction()
throws IOException
IOExceptionprotected HConnection getConnection()
@Deprecated protected byte[] getTableName()
getTable()protected TableName getTable()
protected Scan getScan()
protected long getTimestamp()
protected boolean checkScanStopRow(byte[] endKey)
@InterfaceAudience.Private protected ScannerCallable getScannerCallable(byte[] localStartKey, int nbRows)
protected void writeScanMetrics()
public Result next() throws IOException
ResultScannerIOException - epublic Result[] next(int nbRows) throws IOException
Scan.setCaching(int)
setting (or hbase.client.scanner.caching in hbase-site.xml).nbRows - number of rows to returnIOExceptionpublic void close()
ResultScannerCopyright © 2013 The Apache Software Foundation. All Rights Reserved.