私は次のコードを持っています。私は列のファミリを与えられたテーブル内のすべての行を取得しようとしています。私はすべての行を得ることができましたが、出力は私が期待したものではありません。キーとタイムスタンプは表示されますが、値は表示されません。行の値が表示されないのはなぜですか?助けてください。出力は以下の通りである:Javaを使用してHbaseのすべての行のすべての値を取得
keyvalues={Justin/marks:total/1375104216267/Put/vlen=7/ts=0, Justin/marks:markPercentage/ 1375104186783/Put/vlen=4/ts=0}
//コードをここにHBaseの
public class GetHbaseData {
public static void getdata() throws IOException{
@SuppressWarnings("resource")
HTable table = new HTable(HBaseConfiguration.create(), "Student");
Scan scan = new Scan();
scan.setCaching(20);
scan.addFamily(Bytes.toBytes("marks"));
ResultScanner scanner = table.getScanner(scan);
for (Result result = scanner.next(); (result != null); result = scanner.next()) {
Get get = new Get(result.getRow());
Result entireRow = table.get(get);
System.out.println(entireRow);
}
}
これは非常に良く見えます。 – Tariq