Read all (HBase)

Perform a full table scan.

Documentation pages that include this code sample

To view the code sample used in context, see the following documentation:

Code sample


To learn how to install and use the client library for Bigtable, see Bigtable client libraries.

// Now scan across all rows.
Scan scan = new Scan();

print("Scan for all greetings:");
ResultScanner scanner = table.getScanner(scan);
for (Result row : scanner) {
  byte[] valueBytes = row.getValue(COLUMN_FAMILY_NAME, COLUMN_NAME);
  System.out.println('\t' + Bytes.toString(valueBytes));

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.