HBase 转 json
更新:HHH   时间:2023-1-7


  import com.alibaba.fastjson.JSON
  
  Configuration conf = HBaseConfiguration.create();
  HTableInterface usersTable = new HTable(conf,table);
  Get g = new Get(Bytes.toBytes("TheRealMT"));
  Result r = usersTable.get(g);
  Map<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> map = r.getMap();
  
  String text = JSON.toJSONString(map);
  System.out.println(text);


附件:http://down.51cto.com/data/2365082
返回关系型数据库教程...