java:无法在timestamp.hbase api处执行列族删除

7y4bm7vi  于 2021-06-07  发布在  Hbase
关注(0)|答案(0)|浏览(261)
  1. Delete delete = new Delete(Bytes.toBytes("hello#2"),1585990109000l);
  2. delete.addFamilyVersion(Bytes.toBytes("gretting"), 1585990109000l);
  3. Table table;
  4. try{table = connection.getTable(TableName.valueOf(TABLE_NAME));
  5. table.delete(delete);
  6. deleted =true;
  7. LOG.info("deleted");
  8. table.close();
  9. } catch (IOException e) {
  10. e.printStackTrace();
  11. }

结果:

  1. java.lang.UnsupportedOperationException: Cannot perform column family deletion at timestamp.
  2. at com.google.cloud.bigtable.hbase.adapters.DeleteAdapter.throwOnUnsupportedDeleteFamilyVersion(DeleteAdapter.java:66) ~[bigtable-hbase-1.6.0.jar:na]
  3. at com.google.cloud.bigtable.hbase.adapters.DeleteAdapter.adaptMutations(DeleteAdapter.java:160) ~[bigtable-hbase-1.6.0.jar:na]
  4. at com.google.cloud.bigtable.hbase.adapters.DeleteAdapter.adaptMutations(DeleteAdapter.java:43) ~[bigtable-hbase-1.6.0.jar:na]
  5. at com.google.cloud.bigtable.hbase.adapters.MutationAdapter.adapt(MutationAdapter.java:48) ~[bigtable-hbase-1.6.0.jar:na]
  6. at com.google.cloud.bigtable.hbase.adapters.HBaseRequestAdapter.adapt(HBaseRequestAdapter.java:125) ~[bigtable-hbase-1.6.0.jar:na]

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题