예제 #1
0
파일: Test.java 프로젝트: imace/tutorials
  public static void main(String[] args) throws IOException {
    Configuration conf = HBaseConfiguration.create();
    HTableInterface literaturesTable = new HTable(conf, "pb_literatures");

    Scan s = new Scan();
    s.addFamily(Bytes.toBytes("info"));
    ResultScanner rs = literaturesTable.getScanner(s);
    for (Result r : rs) {
      byte[] b = r.getValue(Bytes.toBytes("info"), Bytes.toBytes("title"));
      System.out.println(Bytes.toString(b));
    }
  }