org.apache.hadoop.hbase.client
Class ScannerCallable

java.lang.Object
  extended by org.apache.hadoop.hbase.client.ServerCallable<Result[]>
      extended by org.apache.hadoop.hbase.client.ScannerCallable
All Implemented Interfaces:
Callable<Result[]>

public class ScannerCallable
extends ServerCallable<Result[]>

Retries scanner operations such as create, next, etc. Used by ResultScanners made by HTable.


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.client.ServerCallable
callTimeout, connection, endTime, location, row, server, startTime, tableName
 
Constructor Summary
ScannerCallable(HConnection connection, byte[] tableName, Scan scan)
           
 
Method Summary
 Result[] call()
           
 void connect(boolean reload)
          Connect to the server hosting region with row from tablename.
 int getCaching()
          Get the number of rows that will be fetched on next
 HRegionInfo getHRegionInfo()
           
protected  Scan getScan()
           
protected  long openScanner()
           
 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
 
Methods inherited from class org.apache.hadoop.hbase.client.ServerCallable
afterCall, beforeCall, getRegionName, getRow, getServerName, shouldRetry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScannerCallable

public ScannerCallable(HConnection connection,
                       byte[] tableName,
                       Scan scan)
Parameters:
connection - which connection
tableName - table callable is on
scan - the scan to execute
Method Detail

connect

public void connect(boolean reload)
             throws IOException
Description copied from class: ServerCallable
Connect to the server hosting region with row from tablename.

Overrides:
connect in class ServerCallable<Result[]>
Parameters:
reload - force reload of server location
Throws:
IOException

call

public Result[] call()
              throws IOException
Throws:
IOException
See Also:
Callable.call()

openScanner

protected long openScanner()
                    throws IOException
Throws:
IOException

getScan

protected Scan getScan()

setClose

public void setClose()
Call this when the next invocation of call should close the scanner


getHRegionInfo

public HRegionInfo getHRegionInfo()
Returns:
the HRegionInfo for the current region

getCaching

public int getCaching()
Get the number of rows that will be fetched on next

Returns:
the number of rows for caching

setCaching

public void setCaching(int caching)
Set the number of rows that will be fetched on next

Parameters:
caching - the number of rows for caching


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.