All operations are identical to Get with the exception of
instantiation. Rather than specifying a single row, an optional startRow
and stopRow may be defined. If rows are not specified, the Scanner will
iterate over all rows.

setTimeRange

Get versions of columns only within the specified timestamp range,
[minStamp, maxStamp). Note, default maximum versions to return is 1. If
your time range spans more than one version and you want all versions
returned, up the number of versions beyond the defaut.

setTimeStamp

Get versions of columns with the specified timestamp. Note, default maximum
versions to return is 1. If your time range spans more than one version
and you want all versions returned, up the number of versions beyond the
defaut.

setMaxVersions

setBatch

public void setBatch(int batch)

Set the maximum number of values to return for each call to next()

Parameters:

batch - the maximum number of values

setCaching

public void setCaching(int caching)

Set the number of rows for caching that will be passed to scanners.
If not set, the default setting from HTable.getScannerCaching() will apply.
Higher caching values will enable faster scanners but will use more memory.

hasFilter

setCacheBlocks

This is true by default. When true, default settings of the table and
family are used (this will never override caching blocks if the block
cache is disabled for that family or entirely).

Parameters:

cacheBlocks - if false, default settings are overridden and blocks
will not be cached

getCacheBlocks

public boolean getCacheBlocks()

Get whether blocks should be cached for this Scan.

Returns:

true if default caching should be used, false if blocks should not
be cached

setLoadColumnFamiliesOnDemand

public void setLoadColumnFamiliesOnDemand(boolean value)

Set the value indicating whether loading CFs on demand should be allowed (cluster
default is false). On-demand CF loading doesn't load column families until necessary, e.g.
if you filter on one column, the other column family data will be loaded only for the rows
that are included in result, not all rows like in normal case.
With column-specific filters, like SingleColumnValueFilter w/filterIfMissing == true,
this can deliver huge perf gains when there's a cf with lots of data; however, it can
also lead to some inconsistent results, as follows:
- if someone does a concurrent update to both column families in question you may get a row
that never existed, e.g. for { rowKey = 5, { cat_videos => 1 }, { video => "my cat" } }
someone puts rowKey 5 with { cat_videos => 0 }, { video => "my dog" }, concurrent scan
filtering on "cat_videos == 1" can get { rowKey = 5, { cat_videos => 1 },
{ video => "my dog" } }.
- if there's a concurrent split and you have more than 2 column families, some rows may be
missing some column families.

doLoadColumnFamiliesOnDemand

public boolean doLoadColumnFamiliesOnDemand()

Get the logical value indicating whether on-demand CF loading should be allowed.

setSmall

public void setSmall(boolean small)

Set whether this scan is a small scan

Small scan should use pread and big scan can use seek + read
seek + read is fast but can cause two problem (1) resource contention (2)
cause too much network io
[89-fb] Using pread for non-compaction read request
https://issues.apache.org/jira/browse/HBASE-7266
On the other hand, if setting it true, we would do
openScanner,next,closeScanner in one RPC call. It means the better
performance for small scan. [HBASE-9488].
Generally, if the scan range is within one data block(64KB), it could be
considered as a small scan.

write

setRaw

public void setRaw(boolean raw)

Enable/disable "raw" mode for this scan.
If "raw" is enabled the scan will return all
delete marker and deleted rows that have not
been collected, yet.
This is mostly useful for Scan on column families
that have KEEP_DELETED_ROWS enabled.
It is an error to specify any column when "raw" is set.