hbase获取某个列族的所有列

    Get get = new Get(Bytes.toBytes("rowA"));
    Table table = conn.getTable(TableName.valueOf("merchants"));
    Result result = table.get(get);
// result.listCells();//可以考虑
    Map familyMap = result.getFamilyMap(Bytes.toBytes("basicInfo"));
    for(Map.Entry entry:familyMap.entrySet()){
        System.out.println(Bytes.toString(entry.getKey()));
    }
    

你可能感兴趣的:(hbase)