@InterfaceAudience.Private public class ClientScanner extends AbstractClientScanner
| 限定符和类型 | 字段和说明 |
|---|---|
protected LinkedList<Result> |
cache |
protected int |
caching |
protected org.apache.hadoop.hbase.client.ScannerCallableWithReplicas |
callable |
protected RpcRetryingCaller<Result[]> |
caller |
protected boolean |
closed |
protected org.apache.hadoop.conf.Configuration |
conf |
protected HRegionInfo |
currentRegion |
protected long |
lastNext |
protected Result |
lastResult |
protected long |
maxScannerResultSize |
protected ExecutorService |
pool |
protected int |
primaryOperationTimeout |
protected RpcControllerFactory |
rpcControllerFactory |
protected Scan |
scan |
protected boolean |
scanMetricsPublished |
protected int |
scannerTimeout |
scanMetrics| 构造器和说明 |
|---|
ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
org.apache.hadoop.hbase.TableName tableName,
ClusterConnection connection,
RpcRetryingCallerFactory rpcFactory,
RpcControllerFactory controllerFactory,
ExecutorService pool,
int primaryOperationTimeout)
Create a new ClientScanner for the specified table Note that the passed
Scan's start
row maybe changed changed. |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
checkScanStopRow(byte[] endKey) |
void |
close()
Closes the scanner and releases any resources it has allocated
|
int |
getCacheSize() |
protected int |
getCaching() |
protected org.apache.hadoop.conf.Configuration |
getConf() |
protected ClusterConnection |
getConnection() |
protected long |
getMaxResultSize() |
protected ExecutorService |
getPool() |
protected int |
getPrimaryOperationTimeout() |
protected int |
getRetries() |
protected Scan |
getScan() |
protected org.apache.hadoop.hbase.client.ScannerCallableWithReplicas |
getScannerCallable(byte[] localStartKey,
int nbRows) |
protected int |
getScannerTimeout() |
protected org.apache.hadoop.hbase.TableName |
getTable() |
protected byte[] |
getTableName()
已过时。
Since 0.96.0; use
getTable() |
protected long |
getTimestamp() |
protected void |
initializeScannerInConstruction() |
protected void |
loadCache()
Contact the servers to load more
Results in the cache. |
Result |
next()
Grab the next row's worth of values.
|
protected boolean |
nextScanner(int nbRows,
boolean done) |
boolean |
renewLease()
Allow the client to renew the scanner's lease on the server.
|
protected void |
writeScanMetrics()
Publish the scan metrics.
|
getScanMetrics, initScanMetrics, iterator, nextprotected Scan scan
protected boolean closed
protected HRegionInfo currentRegion
protected org.apache.hadoop.hbase.client.ScannerCallableWithReplicas callable
protected final LinkedList<Result> cache
protected final int caching
protected long lastNext
protected Result lastResult
protected final long maxScannerResultSize
protected final int scannerTimeout
protected boolean scanMetricsPublished
protected RpcRetryingCaller<Result[]> caller
protected RpcControllerFactory rpcControllerFactory
protected org.apache.hadoop.conf.Configuration conf
protected final int primaryOperationTimeout
protected final ExecutorService pool
public ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
org.apache.hadoop.hbase.TableName tableName,
ClusterConnection connection,
RpcRetryingCallerFactory rpcFactory,
RpcControllerFactory controllerFactory,
ExecutorService pool,
int primaryOperationTimeout)
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 ClusterConnection getConnection()
@Deprecated protected byte[] getTableName()
getTable()protected org.apache.hadoop.hbase.TableName getTable()
protected int getRetries()
protected int getScannerTimeout()
protected org.apache.hadoop.conf.Configuration getConf()
protected Scan getScan()
protected ExecutorService getPool()
protected int getPrimaryOperationTimeout()
protected int getCaching()
protected long getTimestamp()
protected long getMaxResultSize()
public int getCacheSize()
protected boolean checkScanStopRow(byte[] endKey)
protected boolean nextScanner(int nbRows,
boolean done)
throws IOException
IOException@InterfaceAudience.Private
protected org.apache.hadoop.hbase.client.ScannerCallableWithReplicas getScannerCallable(byte[] localStartKey,
int nbRows)
protected void writeScanMetrics()
Scan.setScanMetricsEnabled(boolean)
This invocation clears the scan metrics. Metrics are aggregated in the Scan instance.
public Result next() throws IOException
ResultScannerIOException - eprotected void loadCache()
throws IOException
Results in the cache.IOExceptionpublic void close()
ResultScannerpublic boolean renewLease()
AbstractClientScannerrenewLease 在类中 AbstractClientScannerCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.