Tag Archives: HBase

[Java、HBase] Retrieving timestamp form HBase row

Ref. stackoverflow: retrieving timestamp from hbase row HTableInterface hTableInterface = CONNECTION.getTable(Table.SCHEMA_NAME); Result result = hTableInterface.get(get); Date date = new Date(result.raw()[0].getTimestamp()); System.out.println(“DateTime: ” + sdf.format(date)); we must edit HBaseSettings to set hbaseConf.set(HBASE_ENV_KEY_ZOOKEEPER_QUORUM, “target_zookeeper_address”);

Posted in HBase, Java | Tagged , | Leave a comment