HBase table scans
In the previous chapter, we took a look at CRUD operations in HBase. Now, let's take a step further and discuss table scans in Hbase. In Hbase, table scans are similar to iterators in Java or nonscrollable cursors in the RDBMS world. The HBase table scans command is useful for querying the data to access the complete set of records for a specific value by applying filters. Hence, the scan()
operation reads the defined portion of data similar to the get()
operation, and the filters are applied to the read portion for narrowing down the results further.
The org.apache.hadoop.hbase.client
package provides the Scan
class with the following constructors:
Constructor |
Description |
---|---|
|
The default scan constructor reads the entire HBase table, including all the column families and the respective columns |
|
Creates a scan operation starting at the specified row |
|
Creates a scan operation for the range of... |