은 내가검색 Java API를 사용하는 Hbase 레코드?
Put put = new Put(Bytes.toBytes("rowkey"));
put.add(Bytes.toBytes("family1"), Bytes.toBytes("qualifier1"),
Bytes.toBytes("this is test record"));
이 내 GET 구현
하다 내가 값을 전달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);
코드 아래 사용하여 저장하는 기록이다 기록 값에베이스와 자바
에서 내 응용 프로그램을 검색 할
Get get = new Get(Bytes.toBytes("rowkey"));
String[] family = { "row1" };
get.addColumn(Bytes.toBytes("family1"),Bytes.toBytes("qualifier1"));
Result rs = table.get(get);
이제이 레코드를 검색하고 싶습니다. "이것은 테스트 기록"값입니다.
이 기록을 찾는데 도와주세요. HTable
에 put()
방법과 Put
클래스와 유사 HTable
에 get()
방법 및 가져 오기 클래스에서
예 검색 결과로 얻을 수 있지만 값으로 행을 검색하는 방법은 "테스트 레코드"입니다. – jayesh
필터를 사용할 수 있습니다. – mashuai
한 가지 예를 들려 줄 수 있습니까? – jayesh