0

以下を使用したい:

List<Cell> cells = sourcePut.get(CfBytes, QualBytes);

しかし、正しい列ファミリーや正しい修飾子を指定していないため、空のリストが返されます。

ソース テーブルで、すべての列ファミリーと修飾子を表示する方法は?

HBase テーブルは作成していませんが、既に使用可能です。

4

1 に答える 1

0

私は次のように解決策を見つけました: 1.列ファミリーを取得するには、テーブルをスキャンする必要があります 2.修飾子を取得するために、使用したコードは次のとおりです。

Get g = new Get(Bytes.toBytes("xxxxxxx"));
//Within quotes above, the rowkey should be entered
            try {
                Result result = table.get(g);
                System.out.println(result.getFamilyMap(Bytes.toBytes("")).firstEntry().getValue().toString());
                byte[] bytes = result.getFamilyMap(Bytes.toBytes("<Column-Family Name>")).firstEntry().getKey();
                String s = new String(bytes);
                System.out.println("Qualifier Decrypted: " + s.toString());
            } catch (IOException e) {
                e.printStackTrace();
            }
于 2015-07-14T12:23:35.980 に答える