我正在使用 HBase API 访问 Google Cloud Bigtable,但每当我尝试删除列时:
Delete delete = new Delete(r.getRow());
delete.addColumn(CF, Bytes.toBytes(d.seqid()));
delete.addColumn(CF, COL_LEASE);
tasksTable.delete(delete);
我得到一个UnsupportedOperationException
:
java.lang.UnsupportedOperationException: Cannot delete single latest cell.
at com.google.cloud.bigtable.hbase.adapters.DeleteAdapter.throwIfUnsupportedPointDelete(DeleteAdapter.java:85)
at com.google.cloud.bigtable.hbase.adapters.DeleteAdapter.adapt(DeleteAdapter.java:141)
at com.google.cloud.bigtable.hbase.adapters.HBaseRequestAdapter.adapt(HBaseRequestAdapter.java:71)
at com.google.cloud.bigtable.hbase.BigtableTable.delete(BigtableTable.java:307)
at queue.BigTableRowBackedQueue.poll(BigTableRowBackedQueue.java:54)
我在代码中看到它出现在这里。
我可以从 HBase Java 客户端删除整行,也可以使用 HBase shell 删除单个列。
如何在不删除 Java 客户端中的行的情况下删除列?