hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ming" <ovis_p...@sina.com>
Subject RE: How to get the HDFS path for a given HBase table?
Date Fri, 20 Apr 2018 13:04:27 GMT

Thanks Sean, 

HDFS support HSM, so some table can use SSD and some use HDD by setting the storage policy
of a given HDFS directory or file.
As Anoop kindly replied few days earlier, HBase support set storage policy via ColumnDescriptor,
that is nice, but it can only work in HBase 2.0.

We are using HBase 1.2.0, so I want to directly use HDFS API to set the storage policy for
a given HBase Table, but I have to know its path.

Ming

-----Original Message-----
From: Sean Busbey <busbey@apache.org> 
Sent: Friday, April 20, 2018 8:49 PM
To: user@hbase.apache.org
Subject: Re: How to get the HDFS path for a given HBase table?


The mapping from HBase table contents to HDFS Path(s) is an internal
implementation detail. It's purposefully not included in any user
facing API.

The class JMS mentioned can be used to "peak behind the curtain", but
it's an internal implementation class so you can't rely on it being
present or the same in any given version of HBase.

What are you trying to get done with the path? That might help us come
up with a sustainable approach, if there is one.

On Fri, Apr 20, 2018 at 7:42 AM, Jean-Marc Spaggiari
<jean-marc@spaggiari.org> wrote:
> Hi Ming,
>
> Take a look at the FSUtils... There is plenty of very useful helpers
> there...
>
> JMS
>
> 2018-04-20 8:38 GMT-04:00 Ming <ovis_poly@sina.com>:
>
>> Hello,
>>
>>
>>
>> I am trying to use Java API to get the HDFS path for a given table, but I
>> cannot find that method.
>>
>> For some version, I notice it is under hbase.rootdir, then
>> 'data/namespace/tablename'; for some version of hbase, it is
>> 'data/default/tablename'.
>>
>> So I wish there is a programming way to get that Path string.
>>
>>
>>
>> Any help will be very appreciated!
>>
>>
>>
>> Thanks,
>>
>> Ming
>>
>>




Mime
View raw message