{"id":1541,"date":"2015-08-11T15:34:20","date_gmt":"2015-08-11T07:34:20","guid":{"rendered":"https:\/\/cowmanchiang.me\/wp\/?p=1541"},"modified":"2023-10-31T15:43:30","modified_gmt":"2023-10-31T07:43:30","slug":"java%e3%80%81hbase-retrieving-timestamp-form-hbase-row","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=1541","title":{"rendered":"[Java\u3001HBase] Retrieving timestamp form HBase row"},"content":{"rendered":"<p>Ref. <a href=\"http:\/\/stackoverflow.com\/questions\/8321741\/retrieving-timestamp-from-hbase-row\">stackoverflow: retrieving timestamp from hbase row<\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"\">HTableInterface hTableInterface = CONNECTION.getTable(Table.SCHEMA_NAME);\nResult result = hTableInterface.get(get);\nDate date = new Date(result.raw()[0].getTimestamp());\nSystem.out.println(&quot;DateTime: &quot; + sdf.format(date));<\/pre>\n<blockquote>\n<p>we must edit HBaseSettings to set hbaseConf.set(HBASE_ENV_KEY_ZOOKEEPER_QUORUM, \u201ctarget_zookeeper_address\u201d);<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>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(&quot;DateTime: &quot; + sdf.format(date)); we must edit HBaseSettings to set hbaseConf.set(HBASE_ENV_KEY_ZOOKEEPER_QUORUM, \u201ctarget_zookeeper_address\u201d);<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47,51],"tags":[95,97],"class_list":["post-1541","post","type-post","status-publish","format-standard","hentry","category-hbase","category-java","tag-hbase","tag-java"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1541"}],"version-history":[{"count":2,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1541\/revisions"}],"predecessor-version":[{"id":2181,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1541\/revisions\/2181"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}