Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> how to get the timestamp of hfile, like when it's generated.


Copy link to this message
-
Re: how to get the timestamp of hfile, like when it's generated.
On Tue, Oct 16, 2012 at 9:06 PM, Ramkrishna.S.Vasudevan
<[EMAIL PROTECTED]> wrote:
> Hi Yun Peng
>
> You want to know the creation time? I could see the getModificationTime()
> api.  Internally it is used to get a store file with minimum timestamp.
> I have not tried it out.  Let me know if it solves your purpose.
> Just try it out.
>

To add to Rams' response, if you have a reader on the file, you can
get some of its attributes (which I believe come from metadata block
-- you should check the code) and you can iterate the metadata too
which has stuff first and last keys, average size, etc.  See here:
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/io/hfile/HFile.Reader.html
 To look at a particular file's metadata, see the hfile tool at
"9.7.5.2.2. HFile Tool" in the reference guide.

St.Ack
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB