Differences between the HBase and Cloud Bigtable APIs

One way to access Cloud Bigtable is to use a customized version of the Apache HBase client for Java. In general, the customized client exposes the same API as a standard installation of HBase. Exceptions are described in the following sections. Many of these exceptions are related to management tasks that Cloud Bigtable handles automatically.

Rows and cells

  • You cannot define an ACL for an individual row.
  • You cannot set the visibility of individual cells.
  • Tags are not supported. You cannot use the class org.apache.hadoop.hbase.Tag to add metadata to individual cells.

Mutations and deletions

Deleting a specific version of a specific column based on its timestamp is supported, but deleting all values with a specific timestamp in a given column family or row is not supported. The following methods in the class org.apache.hadoop.hbase.client.Delete are not supported:

  • new Delete(byte[] row, long timestamp)
  • addColumn(byte[] family, byte[] qualifier)
  • addFamily(byte[] family, long timestamp)
  • addFamilyVersion(byte[] family, long timestamp)

Gets and scans

Coprocessors

Coprocessors are not supported. You cannot create classes that implement the interface org.apache.hadoop.hbase.coprocessor.

Filters

The following table shows which filters are currently supported. All of these filters are in the package org.apache.hadoop.hbase.filter:

Supported Supported, with limitations Not supported
  1. Supports only a single column family.
  2. Calling setLenAsVal(true) is not supported.
  3. Supports only the BinaryComparator comparator. If any operator other than EQUAL is used, only a single column family is supported.
  4. Supports only the following comparators:
    • BinaryComparator
    • RegexStringComparator with no flags and the EQUAL operator
  5. If a PageFilter is in a FilterList, PageFilter will only work similarly to HBase when the FilterList is set to MUST_PASS_ALL, which is the default behavior. If the FilterList is set to MUST_PASS_ONE, Cloud Bigtable will treat the PageFilter as a MUST_PASS_ALL and only return a number of rows corresponding to the PageFilter's pageSize.
ColumnPrefixFilter
FilterList
FuzzyRowFilter
MultipleColumnPrefixFilter
PrefixFilter
RandomRowFilter
TimestampsFilter
ColumnCountGetFilter 1
ColumnPaginationFilter 1
ColumnRangeFilter 1
FirstKeyOnlyFilter 1
KeyOnlyFilter 2
PageFilter 5
QualifierFilter 3
RowFilter 1, 4
SingleColumnValueExcludeFilter 1, 4
SingleColumnValueFilter 4
ValueFilter 4
DependentColumnFilter
FamilyFilter
FirstKeyValueMatchingQualifiersFilter
InclusiveStopFilter
MultiRowRangeFilter
ParseFilter
SkipFilter
WhileMatchFilter

In addition, the following differences affect Cloud Bigtable filters:

  • In filters that use the regular expression comparator (org.apache.hadoop.hbase.filter.RegexStringComparator), regular expressions use RE2 syntax, not Java syntax.
  • Custom filters are not supported. You cannot create classes that inherit from org.apache.hadoop.hbase.filter.Filter.

Administration

This section describes methods in the interface org.apache.hadoop.hbase.client.Admin that are not available on Cloud Bigtable, or that behave differently on Cloud Bigtable than on HBase.

Most of these methods are unnecessary on Cloud Bigtable, because management tasks are handled automatically. A few methods are not available because they relate to features that Cloud Bigtable does not support.

General maintenance tasks

Cloud Bigtable handles most maintenance tasks automatically. As a result, the following methods are not available:

  • abort(String why, Throwable e)
  • balancer()
  • enableCatalogJanitor(boolean enable)
  • getMasterInfoPort()
  • getOperationTimeout()
  • isCatalogJanitorEnabled()
  • rollWALWriter(ServerName serverName)
  • runCatalogScan()
  • setBalancerRunning(boolean on, boolean synchronous)
  • shutdown()
  • stopMaster()
  • updateConfiguration()
  • updateConfiguration(ServerName serverName)

Namespaces

Cloud Bigtable does not use namespaces. In effect, your Cloud project serves as a namespace for your tables. As a result, the following methods are not available:

  • createNamespace(NamespaceDescriptor descriptor)
  • deleteNamespace(String name)
  • getNamespaceDescriptor(String name)
  • listNamespaceDescriptors()
  • listTableDescriptorsByNamespace(String name)
  • listTableNamesByNamespace(String name)
  • modifyNamespace(NamespaceDescriptor descriptor)

Region management

Cloud Bigtable uses tablets, which are similar to regions. Cloud Bigtable manages your tablets automatically. As a result, the following methods are not available:

  • assign(byte[] regionName)
  • closeRegion(byte[] regionname, String serverName)
  • closeRegion(ServerName sn, HRegionInfo hri)
  • closeRegion(String regionname, String serverName)
  • closeRegionWithEncodedRegionName(String encodedRegionName, String serverName)
  • compactRegion(byte[] regionName)
  • compactRegion(byte[] regionName, byte[] columnFamily)
  • compactRegionServer(ServerName sn, boolean major)
  • flushRegion(byte[] regionName)
  • getAlterStatus(byte[] tableName)
  • getAlterStatus(TableName tableName)
  • getCompactionStateForRegion(byte[] regionName)
  • getOnlineRegions(ServerName sn)
  • majorCompactRegion(byte[] regionName)
  • majorCompactRegion(byte[] regionName, byte[] columnFamily)
  • mergeRegions(byte[] encodedNameOfRegionA, byte[] encodedNameOfRegionB, boolean forcible)
  • move(byte[] encodedRegionName, byte[] destServerName)
  • offline(byte[] regionName)
  • splitRegion(byte[] regionName)
  • splitRegion(byte[] regionName, byte[] splitPoint)
  • stopRegionServer(String hostnamePort)
  • unassign(byte[] regionName, boolean force)

Snapshots

The following methods are not currently available:

  • cloneSnapshot(byte[] snapshotName, TableName tableName)
  • cloneSnapshot(String snapshotName, TableName tableName)
  • deleteSnapshot(byte[] snapshotName)
  • deleteSnapshot(String snapshotName)
  • deleteSnapshots(Pattern pattern)
  • deleteSnapshots(String regex)
  • isSnapshotFinished(HBaseProtos.SnapshotDescription snapshot)
  • listSnapshots()
  • listSnapshots(Pattern pattern)
  • listSnapshots(String regex)
  • restoreSnapshot(byte[] snapshotName)
  • restoreSnapshot(String snapshotName)
  • restoreSnapshot(byte[] snapshotName, boolean takeFailSafeSnapshot)
  • restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot)
  • snapshot(HBaseProtos.SnapshotDescription snapshot)
  • snapshot(byte[] snapshotName, TableName tableName)
  • snapshot(String snapshotName, TableName tableName)
  • snapshot(String snapshotName, TableName tableName, HBaseProtos.SnapshotDescription.Type type)
  • takeSnapshotAsync(HBaseProtos.SnapshotDescription snapshot)

Table management

Tasks such as table compaction are handled automatically. As a result, the following methods are not available:

  • compact(TableName tableName)
  • compact(TableName tableName, byte[] columnFamily)
  • flush(TableName tableName)
  • getCompactionState(TableName tableName)
  • majorCompact(TableName tableName)
  • majorCompact(TableName tableName, byte[] columnFamily)
  • modifyTable(TableName tableName, HTableDescriptor htd)
  • split(TableName tableName)
  • split(TableName tableName, byte[] splitPoint)

Coprocessors

Cloud Bigtable does not support coprocessors. As a result, the following methods are not available:

  • coprocessorService()
  • coprocessorService(ServerName serverName)
  • getMasterCoprocessors()

Distributed procedures

Cloud Bigtable does not support distributed procedures. As a result, the following methods are not available:

  • execProcedure(String signature, String instance, Map<String, String> props)
  • execProcedureWithRet(String signature, String instance, Map<String, String> props)
  • isProcedureFinished(String signature, String instance, Map<String, String> props)

Send feedback about...

Cloud Bigtable Documentation