更新时间:2023-01-20 19:55:07
您可以指定扫描版本的数量并且它会检索它们:
HTable tbl = new HTable(tableName);
Get q = new Get(Bytes.toBytes(key));
q.setMaxVersions(numberOfVersionsYouWant);
结果行= tbl.get(q);
NavigableMap< byte [],NavigableMap< byte [],NavigableMap< Long,byte []>>> allVersions = row.getMap();
As we know, hbase has a feature that a specific Row and specific Column can record recent change values by timestamps. So my question is, HOW TO list all the changed values using any HBase command? I googled a lot, but didn't find any useful links.
You can specify the number of version you get for Scan and Get and it will retrieve them:
HTable tbl = new HTable(tableName);
Get q= new Get(Bytes.toBytes(key));
q.setMaxVersions(numberOfVersionsYouWant);
Result row= tbl.get(q);
NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>> allVersions=row.getMap();