From user-return-55078-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Fri Apr 20 15:17:09 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id BA490180645 for ; Fri, 20 Apr 2018 15:17:08 +0200 (CEST) Received: (qmail 63125 invoked by uid 500); 20 Apr 2018 13:17:06 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 63027 invoked by uid 99); 20 Apr 2018 13:17:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Apr 2018 13:17:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D96DEC65D1 for ; Fri, 20 Apr 2018 13:04:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id XztO0LxGPhZI for ; Fri, 20 Apr 2018 13:04:44 +0000 (UTC) Received: from mail3-163.sinamail.sina.com.cn (mail3-163.sinamail.sina.com.cn [202.108.3.163]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 4F0E95F477 for ; Fri, 20 Apr 2018 13:04:41 +0000 (UTC) Received: from 158.38.37.58.broad.xw.sh.dynamic.163data.com.cn (HELO ESGSHPC007)([58.37.38.158]) by sina.com with ESMTP id 5AD9E55F00004BEE; Fri, 20 Apr 2018 21:04:32 +0800 (CST) X-Sender: ovis_poly@sina.com X-Auth-ID: ovis_poly@sina.com X-SMAIL-MID: 507940393271 From: "Ming" To: References: <000b01d3d8a4$7c8b0c80$75a12580$@sina.com> In-Reply-To: Subject: RE: How to get the HDFS path for a given HBase table? Date: Fri, 20 Apr 2018 21:04:27 +0800 Message-ID: <001e01d3d8a8$1e650a80$5b2f1f80$@sina.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQL0L1SxschZLMSb2TZYLOyTkgpE1QHvMg6EAsWU+c6ho0q1IA== Content-Language: zh-cn Thanks Sean,=20 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 =20 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 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 : > >> 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 >> >>