hbase-client1.2.0新版api获取数据方式
生活随笔
收集整理的這篇文章主要介紹了
hbase-client1.2.0新版api获取数据方式
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
public static void QueryAll(String tableName) {try {Table table = connection.getTable(TableName.valueOf(tableName));ResultScanner rs = table.getScanner(new Scan());for (Result r : rs) {System.out.println("獲得到rowkey:" + new String(r.getRow()));for (Cell cell : r.rawCells()) {System.out.println("列:" + new String(CellUtil.cloneFamily(cell))+ "====值長度:" + cell.getValueLength()+(cell.getValueLength()<1024?"====值:"+new String(CellUtil.cloneValue(cell)):""));}}} catch (IOException e) {e.printStackTrace();}
}
?
總結
以上是生活随笔為你收集整理的hbase-client1.2.0新版api获取数据方式的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python写完程序怎么运行
- 下一篇: idea中代码能够运行,但是显示类找不到