1
我想搜索的價值備案基地和我在Java中使用java API搜索Hbase記錄?
應用程序,我使用下面的代碼
HTable table = new HTable(conf, tableName);
Put put = new Put(Bytes.toBytes(rowKey));
put.add(Bytes.toBytes(family), Bytes.toBytes(qualifier),
Bytes.toBytes(value));
table.put(put);
我傳遞值
Put put = new Put(Bytes.toBytes("rowkey"));
put.add(Bytes.toBytes("family1"), Bytes.toBytes("qualifier1"),
Bytes.toBytes("this is test record"));
這是我的GET實施
AM商鋪紀錄Get get = new Get(Bytes.toBytes("rowkey"));
String[] family = { "row1" };
get.addColumn(Bytes.toBytes("family1"),Bytes.toBytes("qualifier1"));
Result rs = table.get(get);
現在我想搜索此記錄「這是測試記錄」的價值。
幫我找到這個記錄。
是的我知道搜索結果,但如何通過值來搜索行「這是測試記錄」。 – jayesh
您可以使用過濾器。 – mashuai
你能舉一個例子嗎? – jayesh