Read all (HBase)
Stay organized with collections
Save and categorize content based on your preferences.
Perform a full table scan.
Explore further
For detailed documentation that includes this code sample, see the following:
Code sample
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],[],[[["\u003cp\u003eThe code provided performs a full table scan to retrieve all rows from a Bigtable table.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eScan\u003c/code\u003e class is utilized to scan across all rows in the table.\u003c/p\u003e\n"],["\u003cp\u003eThe code retrieves values from the specified column family and column name for each row.\u003c/p\u003e\n"],["\u003cp\u003eDetailed documentation and other code samples can be found through the provided links.\u003c/p\u003e\n"]]],[],null,["Perform a full table scan.\n\nExplore further\n\n\nFor detailed documentation that includes this code sample, see the following:\n\n- [HBase APIs for Java hello world](/bigtable/docs/samples-hbase-java-hello)\n\nCode sample \n\nJava\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n // Now scan across all rows.\n Scan scan = new Scan();\n\n System.out.println(\"HelloWorld: Scan for all greetings:\");\n ResultScanner scanner = table.getScanner(scan);\n for (Result row : scanner) {\n byte[] valueBytes = row.getValue(COLUMN_FAMILY_NAME, COLUMN_NAME);\n System.out.println('\\t' + Bytes.toString(valueBytes));\n }\n\nWhat's next\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=bigtable)."]]