@InterfaceAudience.Private public class AsyncScannerCallable extends AsyncRegionServerCallable<org.apache.hadoop.hbase.client.Result[]>
ResultScanners made by HTable. Passed to a retrying caller such as
AsyncRpcRetryingCaller so fails are retried.| Modifier and Type | Field and Description |
|---|---|
protected AsyncPayloadCarryingRpcController |
controller |
protected boolean |
instantiated |
protected boolean |
isRegionServerRemote |
protected org.apache.hadoop.hbase.client.metrics.ScanMetrics |
scanMetrics |
client, connection, location, MIN_WAIT_DEAD_SERVER, row, tableName| Constructor and Description |
|---|
AsyncScannerCallable(AsyncRpcClient client,
org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.client.Scan scan,
org.apache.hadoop.hbase.client.metrics.ScanMetrics scanMetrics,
AsyncPayloadCarryingRpcController controller) |
| Modifier and Type | Method and Description |
|---|---|
void |
call(ResponseHandler<org.apache.hadoop.hbase.client.Result[]> handler)
Calls the scan request
|
protected void |
checkIfRegionServerIsRemote()
compare the local machine hostname with region server's hostname
to decide if hbase client connects to a remote region server
|
org.apache.hadoop.hbase.HRegionInfo |
getHRegionInfo() |
int |
getMaxResults()
Get the number of rows that will be fetched on next
|
protected org.apache.hadoop.hbase.client.Scan |
getScan()
Get scan of the callable
|
protected void |
openScanner(ResponseHandler<java.lang.Long> responseHandler)
Open the scanner
|
void |
prepare(boolean reload)
Prepare for connection to the server hosting region with row from tablename.
|
void |
setClose()
Call this when the next invocation of call should close the scanner
|
void |
setMaxResults(int maxResults)
Set the number of rows that will be fetched on next
|
getExceptionMessageAdditionalDetail, getLocation, getRow, getStub, getTableName, setLocation, sleep, throwableprotected boolean instantiated
protected org.apache.hadoop.hbase.client.metrics.ScanMetrics scanMetrics
protected boolean isRegionServerRemote
protected final AsyncPayloadCarryingRpcController controller
public AsyncScannerCallable(AsyncRpcClient client, org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.Scan scan, org.apache.hadoop.hbase.client.metrics.ScanMetrics scanMetrics, AsyncPayloadCarryingRpcController controller)
client - to connect withtableName - table callable is onscan - the scan to executescanMetrics - the ScanMetrics to used, if it is null, ScannerCallable won't collect
metricscontroller - to use when writing the rpcpublic void prepare(boolean reload)
throws java.io.IOException
AsyncRegionServerCallableprepare in interface AsyncRetryingCallable<org.apache.hadoop.hbase.client.Result[]>prepare in class AsyncRegionServerCallable<org.apache.hadoop.hbase.client.Result[]>reload - force reload of server locationjava.io.IOException - if preparation failsprotected void checkIfRegionServerIsRemote()
public void call(ResponseHandler<org.apache.hadoop.hbase.client.Result[]> handler)
handler - to handle resultsprotected void openScanner(ResponseHandler<java.lang.Long> responseHandler)
responseHandler - handles responseprotected org.apache.hadoop.hbase.client.Scan getScan()
public void setClose()
public org.apache.hadoop.hbase.HRegionInfo getHRegionInfo()
getHRegionInfo in class AsyncRegionServerCallable<org.apache.hadoop.hbase.client.Result[]>public int getMaxResults()
public void setMaxResults(int maxResults)
maxResults - the number of rows for maxResults