자바용 Cloud Bigtable HBase 클라이언트는 Apache HBase API의 1.x 및 2.x 버전을 대상으로 합니다. API 버전 1.0에는 이전 버전의 HBase의 주요 변경 사항이 포함되어 있습니다. HBase에서 Bigtable로 마이그레이션 중이며 애플리케이션이 이전 버전의 HBase API를 대상으로 하는 경우 Bigtable과 호환되도록 애플리케이션을 업데이트해야 합니다.
이 페이지에는 이전에 도움이 되는 HBase 1.0 API의 주요 변경 사항이 요약되어 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eMigrating to Cloud Bigtable from older HBase versions requires updating applications to be compatible with the HBase 1.x or 2.x API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConnectionFactory\u003c/code\u003e class and the \u003ccode\u003eConnection\u003c/code\u003e interface are now used to manage connections, replacing the deprecated \u003ccode\u003eHConnection\u003c/code\u003e interface, \u003ccode\u003eConnectionManager\u003c/code\u003e, and \u003ccode\u003eHConnectionManager\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTable names are now represented by instances of the \u003ccode\u003eTableName\u003c/code\u003e class instead of \u003ccode\u003eString\u003c/code\u003e or \u003ccode\u003ebyte[]\u003c/code\u003e values.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eHTable\u003c/code\u003e class has been replaced by \u003ccode\u003eTable\u003c/code\u003e, \u003ccode\u003eBufferedMutator\u003c/code\u003e, and \u003ccode\u003eRegionLocator\u003c/code\u003e interfaces for working with table data, performing batch writes, and accessing region information, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eHBaseAdmin\u003c/code\u003e class has been replaced by the \u003ccode\u003eAdmin\u003c/code\u003e interface, which is obtained via a \u003ccode\u003eConnection\u003c/code\u003e object, although many of the method calls are not supported.\u003c/p\u003e\n"]]],[],null,["Migrate from earlier HBase versions\n\nThe Cloud Bigtable HBase client for Java targets versions 1.x and 2.x of the\n[Apache HBase API](https://hbase.apache.org/apidocs/). Version 1.0 of the API included some notable\nchanges from earlier versions of HBase. If you are migrating to\nBigtable from HBase, and your application targets an older version\nof the HBase API, you will need to update your application to make it compatible\nwith Bigtable.\n\nTo assist with your migration, this page summarizes the most notable changes in\nthe HBase 1.0 API.\n\nConnection interface\n\nIn HBase 1.0 and later, instead of relying upon the deprecated `HConnection`\ninterface, you should use\n[`org.apache.hadoop.hbase.client.ConnectionFactory`](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/ConnectionFactory.html).\nThis class creates objects that implement the new [`Connection`\ninterface](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Connection.html). `ConnectionFactory` replaces the deprecated\nclasses `ConnectionManager` and `HConnectionManager`.\n\nCreating a `Connection` object is a relatively expensive operation. You should\ncreate one `Connection` object per process and share the object as needed.\n`Connection` objects are thread-safe.\n\nIn addition, be sure to close the connection once you are done using it. In\nHBase 1.0 and later, it is the application's responsibility to manage the\nlifecycle of the connection.\n\nYour updated code should look similar to the following example: \n\n Connection connection = ConnectionFactory.createConnection(config);\n // ...\n connection.close();\n\nTableName class\n\nIn previous versions of HBase, when you manipulated a table, you could specify\nthe table name as a `String` or `byte[]` value. In HBase 1.0 and later, you must\nspecify the table name by creating an instance of\n[`org.apache.hadoop.hbase.TableName`](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/TableName.html): \n\n String tableName = \"MyTable\";\n // or byte[] tableName = Bytes.toBytes(\"MyTable\");\n TableName tableNameObj = TableName.valueOf(tableName);\n\nTable, BufferedMutator, and RegionLocator interfaces\n\nIn HBase 1.0, the `HTable` class is replaced by the following interfaces:\n\n- [`org.apache.hadoop.hbase.client.Table`](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Table.html): Enables you to work with data in a single table.\n- [`org.apache.hadoop.hbase.client.BufferedMutator`](https://hbase.apache.org/devapidocs/org/apache/hadoop/hbase/client/BufferedMutator.html): Enables you to perform asynchronous batch writes to a table. Use this class instead of calling the `setAutoFlush(boolean)` method in `HTableInterface`.\n- [`org.apache.hadoop.hbase.client.RegionLocator`](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/RegionLocator.html): Provides access to information about a table's regions.\n\n| **Note:** You cannot use `new HTable(config)` to access Bigtable.\n\nUse a `Connection` object to obtain an instance of these interfaces: \n\n Table table = connection.getTable(tableNameObj);\n BufferedMutator mutator = connection.getBufferedMutator(tableNameObj);\n RegionLocator regionLocator = connection.getRegionLocator(tableNameObj);\n\nInstances of `Table`, `BufferedMutator`, and `RegionLocator` are not\nthread-safe. However, these are lightweight objects, so you can create them as\nneeded within the context of a single thread.\n\nAdmin interface\n\nIn HBase 1.0, the `HBaseAdmin` class is replaced by the\n[`org.apache.hadoop.hbase.client.Admin` interface](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Admin.html). Because\nBigtable handles maintenance tasks automatically, many of the\nmethods in the `Admin` interface are not supported. See [Differences between the\nHBase and Bigtable APIs](/bigtable/docs/hbase-differences#admin) for details.\n| **Note:** You cannot use `new HBaseAdmin(config)` to access Bigtable.\n\nUse a `Connection` object to obtain an instance of the `Admin` interface: \n\n Admin admin = connection.getAdmin();"]]