@InterfaceAudience.Private public class ScannerCallable extends RegionServerCallable<Result[]>
ResultScanners made by HTable. Passed to a retrying caller such as
RpcRetryingCaller so fails are retried.| 限定符和类型 | 字段和说明 |
|---|---|
protected ClusterConnection |
cConnection |
protected boolean |
closed |
protected RpcControllerFactory |
controllerFactory |
protected int |
id |
protected boolean |
instantiated |
protected boolean |
isRegionServerRemote |
static org.apache.commons.logging.Log |
LOG |
static String |
LOG_SCANNER_ACTIVITY |
static String |
LOG_SCANNER_LATENCY_CUTOFF |
protected ScanMetrics |
scanMetrics |
protected long |
scannerId |
protected boolean |
serverHasMoreResults |
protected boolean |
serverHasMoreResultsContext |
connection, location, MIN_WAIT_DEAD_SERVER, row, tableName| 构造器和说明 |
|---|
ScannerCallable(ClusterConnection connection,
org.apache.hadoop.hbase.TableName tableName,
Scan scan,
ScanMetrics scanMetrics,
RpcControllerFactory rpcControllerFactory) |
ScannerCallable(ClusterConnection connection,
org.apache.hadoop.hbase.TableName tableName,
Scan scan,
ScanMetrics scanMetrics,
RpcControllerFactory rpcControllerFactory,
int id) |
| 限定符和类型 | 方法和说明 |
|---|---|
Result[] |
call(int callTimeout)
Computes a result, or throws an exception if unable to do so.
|
protected void |
checkIfRegionServerIsRemote()
compare the local machine hostname with region server's hostname
to decide if hbase client connects to a remote region server
|
int |
getCaching()
Get the number of rows that will be fetched on next
|
ClusterConnection |
getConnection() |
HRegionInfo |
getHRegionInfo() |
protected Scan |
getScan() |
ScannerCallable |
getScannerCallableForReplica(int id) |
protected boolean |
getServerHasMoreResults()
Should the client attempt to fetch more results from this region
|
protected boolean |
hasMoreResultsContext()
Did the server respond with information about whether more results might exist.
|
protected long |
openScanner() |
void |
prepare(boolean reload)
Prepare for connection to the server hosting region with row from tablename.
|
void |
setCaching(int caching)
Set the number of rows that will be fetched on next
|
void |
setClose()
Call this when the next invocation of call should close the scanner
|
protected void |
setHasMoreResultsContext(boolean serverHasMoreResultsContext) |
protected void |
setServerHasMoreResults(boolean serverHasMoreResults) |
protected void |
updateResultsMetrics(Result[] rrs) |
getExceptionMessageAdditionalDetail, getLocation, getRow, getStub, getTableName, setLocation, sleep, throwablepublic static final org.apache.commons.logging.Log LOG
protected long scannerId
protected boolean instantiated
protected boolean closed
protected final ClusterConnection cConnection
protected ScanMetrics scanMetrics
protected final int id
protected boolean serverHasMoreResultsContext
protected boolean serverHasMoreResults
protected boolean isRegionServerRemote
protected RpcControllerFactory controllerFactory
public ScannerCallable(ClusterConnection connection, org.apache.hadoop.hbase.TableName tableName, Scan scan, ScanMetrics scanMetrics, RpcControllerFactory rpcControllerFactory)
connection - which connectiontableName - table callable is onscan - the scan to executescanMetrics - the ScanMetrics to used, if it is null,
ScannerCallable won't collect metricsrpcControllerFactory - factory to use when creating
RpcControllerpublic ScannerCallable(ClusterConnection connection, org.apache.hadoop.hbase.TableName tableName, Scan scan, ScanMetrics scanMetrics, RpcControllerFactory rpcControllerFactory, int id)
connection - tableName - scan - scanMetrics - id - the replicaIdpublic void prepare(boolean reload)
throws IOException
RegionServerCallableprepare 在接口中 RetryingCallable<Result[]>prepare 在类中 RegionServerCallable<Result[]>reload - force reload of server locationIOExceptionprotected void checkIfRegionServerIsRemote()
public Result[] call(int callTimeout) throws IOException
RetryingCallablecallTimeout - - the time available for this call. 0 for infinite.IOExceptionprotected void updateResultsMetrics(Result[] rrs)
protected long openScanner()
throws IOException
IOExceptionprotected Scan getScan()
public void setClose()
public HRegionInfo getHRegionInfo()
getHRegionInfo 在类中 RegionServerCallable<Result[]>public int getCaching()
public ClusterConnection getConnection()
HConnection instance used by this Callable.public void setCaching(int caching)
caching - the number of rows for cachingpublic ScannerCallable getScannerCallableForReplica(int id)
protected boolean getServerHasMoreResults()
protected void setServerHasMoreResults(boolean serverHasMoreResults)
protected boolean hasMoreResultsContext()
protected void setHasMoreResultsContext(boolean serverHasMoreResultsContext)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.