|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.client.AbstractClientScanner
org.apache.hadoop.hbase.client.ClientScanner
org.apache.hadoop.hbase.client.ClientSmallScanner
@InterfaceAudience.Public @InterfaceStability.Evolving public class ClientSmallScanner
Client scanner for small scan. Generally, only one RPC is called to fetch the
scan results, unless the results cross multiple regions or the row count of
results excess the caching.
For small scan, it will get better performance than ClientScanner
Nested Class Summary | |
---|---|
protected static class |
ClientSmallScanner.SmallScannerCallableFactory
|
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.client.ClientScanner |
---|
cache, caching, callable, caller, closed, currentRegion, lastNext, lastResult, maxScannerResultSize, rpcControllerFactory, scan, scanMetricsPublished, scannerTimeout |
Fields inherited from class org.apache.hadoop.hbase.client.AbstractClientScanner |
---|
scanMetrics |
Constructor Summary | |
---|---|
ClientSmallScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName)
Create a new ClientSmallScanner for the specified table. |
|
ClientSmallScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
HConnection connection)
Create a new ClientSmallScanner for the specified table. |
|
ClientSmallScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
HConnection connection,
RpcRetryingCallerFactory rpcFactory,
RpcControllerFactory controllerFactory)
Create a new ShortClientScanner for the specified table Note that the passed Scan 's start row maybe changed changed. |
Method Summary | |
---|---|
void |
close()
Closes the scanner and releases any resources it has allocated |
protected void |
initializeScannerInConstruction()
|
protected void |
loadCache()
Contact the servers to load more Result s in the cache. |
Result |
next()
Grab the next row's worth of values. |
protected void |
setRpcControllerFactory(RpcControllerFactory rpcControllerFactory)
|
protected void |
setRpcRetryingCaller(RpcRetryingCaller<Result[]> caller)
|
protected void |
setScannerCallableFactory(ClientSmallScanner.SmallScannerCallableFactory callableFactory)
|
Methods inherited from class org.apache.hadoop.hbase.client.ClientScanner |
---|
checkScanStopRow, getCacheSize, getConnection, getMaxResultSize, getScan, getScannerCallable, getTable, getTableName, getTimestamp, nextScanner, renewLease, writeScanMetrics |
Methods inherited from class org.apache.hadoop.hbase.client.AbstractClientScanner |
---|
getScanMetrics, initScanMetrics, iterator, next |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientSmallScanner(org.apache.hadoop.conf.Configuration conf, Scan scan, TableName tableName) throws IOException
Scan
's start row maybe changed.
conf
- The Configuration
to use.scan
- Scan
to use in this scannertableName
- The table that we wish to rangeGet
IOException
public ClientSmallScanner(org.apache.hadoop.conf.Configuration conf, Scan scan, TableName tableName, HConnection connection) throws IOException
Scan
's start row maybe changed.
conf
- scan
- tableName
- connection
-
IOException
public ClientSmallScanner(org.apache.hadoop.conf.Configuration conf, Scan scan, TableName tableName, HConnection connection, RpcRetryingCallerFactory rpcFactory, RpcControllerFactory controllerFactory) 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 rangeGetconnection
- Connection identifying the clusterrpcFactory
- controllerFactory
-
IOException
- If the remote call failsMethod Detail |
---|
protected void initializeScannerInConstruction() throws IOException
initializeScannerInConstruction
in class ClientScanner
IOException
public Result next() throws IOException
ResultScanner
next
in interface ResultScanner
next
in class ClientScanner
IOException
- eprotected void loadCache() throws IOException
ClientScanner
Result
s in the cache.
loadCache
in class ClientScanner
IOException
public void close()
ResultScanner
close
in interface Closeable
close
in interface ResultScanner
close
in class ClientScanner
protected void setScannerCallableFactory(ClientSmallScanner.SmallScannerCallableFactory callableFactory)
protected void setRpcRetryingCaller(RpcRetryingCaller<Result[]> caller)
protected void setRpcControllerFactory(RpcControllerFactory rpcControllerFactory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |