|
||||||||||
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
@InterfaceAudience.Public @InterfaceStability.Stable public class ClientScanner
Implements the scanner interface for the HBase client. If there are multiple regions in a table, this scanner will iterate through them all.
Field Summary | |
---|---|
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 Summary | |
---|---|
ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
byte[] tableName)
Deprecated. Use ClientScanner(Configuration, Scan, TableName) |
|
ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
byte[] tableName,
HConnection connection)
Deprecated. Use ClientScanner(Configuration, Scan, TableName, HConnection) |
|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.hadoop.hbase.client.AbstractClientScanner |
---|
iterator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected 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
Constructor Detail |
---|
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 scan
IOException
@Deprecated public ClientScanner(org.apache.hadoop.conf.Configuration conf, Scan scan, byte[] tableName) throws IOException
ClientScanner(Configuration, Scan, TableName)
IOException
public 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 cluster
IOException
@Deprecated public ClientScanner(org.apache.hadoop.conf.Configuration conf, Scan scan, byte[] tableName, HConnection connection) throws IOException
ClientScanner(Configuration, Scan, TableName, HConnection)
IOException
public 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 cluster
IOException
Method Detail |
---|
protected void initializeScannerInConstruction() throws IOException
IOException
protected 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
ResultScanner
IOException
- 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 return
IOException
public void close()
ResultScanner
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |