BigtableExtendedScan (Cloud Bigtable HBase Client for Java 1.12.0 API)

Class BigtableExtendedScan

  • All Implemented Interfaces:

    public class BigtableExtendedScan
    extends Scan
    This is a Cloud Bigtable specific extension of Scan. The Cloud Bigtable ReadRows API allows for an arbitrary set of ranges and row keys as part of a scan. Instance of BigtableExtendedScan can be used in Table.getScanner(Scan).
    • Constructor Detail

      • BigtableExtendedScan

        public BigtableExtendedScan()
    • Method Detail

      • addRangeWithPrefix

        public void addRangeWithPrefix(byte[] prefix)
        Creates a RowRange based on a prefix. This is similar to Scan.setRowPrefixFilter(byte[]).
        prefix - a byte array.
      • addRange

        public void addRange(byte[] startRow,
                             byte[] stopRow)
        Adds a range to scan. This is similar to calling a combination of Scan.setStartRow(byte[]) and Scan.setStopRow(byte[]). Other ranges can be constructed by creating a RowRange and calling addRange(RowRange)
        startRow - a byte array.
        stopRow - a byte array.
      • addRange

        public void addRange( range)
        Adds an arbitrary RowRange to the request. Ranges can have empty start keys or end keys. Ranges can also be inclusive/closed or exclusive/open. The default range is inclusive start and exclusive end.
        range - a RowRange object.
      • addRowKey

        public void addRowKey(byte[] rowKey)
        Add a single row key to the output. This can be called multiple times with random rowKeys. Duplicate rowKeys will result in a single response in the scan results. Results of scans also return rows in lexicographically sorted order, and not based on the order in which row keys were added.
        rowKey - a byte array.
      • getRowSet

        public getRowSet()
        the RowSet built until now, which includes lists of individual keys and row ranges.