Return-Path: X-Original-To: apmail-phoenix-commits-archive@minotaur.apache.org Delivered-To: apmail-phoenix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D52B18F1F for ; Mon, 20 Jul 2015 13:40:04 +0000 (UTC) Received: (qmail 25194 invoked by uid 500); 20 Jul 2015 13:40:04 -0000 Delivered-To: apmail-phoenix-commits-archive@phoenix.apache.org Received: (qmail 25104 invoked by uid 500); 20 Jul 2015 13:40:04 -0000 Mailing-List: contact commits-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list commits@phoenix.apache.org Received: (qmail 24062 invoked by uid 99); 20 Jul 2015 13:40:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jul 2015 13:40:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 95BCEE03EC; Mon, 20 Jul 2015 13:40:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: greid@apache.org To: commits@phoenix.apache.org Date: Mon, 20 Jul 2015 13:40:33 -0000 Message-Id: In-Reply-To: <4054e5f9260f44ea8802b1612874e5d2@git.apache.org> References: <4054e5f9260f44ea8802b1612874e5d2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [31/34] phoenix git commit: PHOENIX-1975 Detect and use HBASE_HOME when set PHOENIX-1975 Detect and use HBASE_HOME when set Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/980d29c5 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/980d29c5 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/980d29c5 Branch: refs/heads/4.x-HBase-1.1 Commit: 980d29c5acf785dc90ece1a7f047711e8d522a2e Parents: 05b1b8b Author: Nick Dimiduk Authored: Wed Jun 24 13:59:00 2015 -0700 Committer: Nick Dimiduk Committed: Wed Jun 24 13:59:28 2015 -0700 ---------------------------------------------------------------------- bin/phoenix_utils.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/980d29c5/bin/phoenix_utils.py ---------------------------------------------------------------------- diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py index 383e0e1..bfb4737 100755 --- a/bin/phoenix_utils.py +++ b/bin/phoenix_utils.py @@ -65,7 +65,15 @@ def setPath(): phoenix_class_path = os.getenv('PHOENIX_CLASS_PATH','') global hbase_conf_dir - hbase_conf_dir = os.getenv('HBASE_CONF_DIR', os.getenv('HBASE_CONF_PATH', '.')) + # if HBASE_CONF_DIR set explicitly, use that + hbase_conf_dir = os.getenv('HBASE_CONF_DIR', os.getenv('HBASE_CONF_PATH')) + if not hbase_conf_dir: + # else fall back to HBASE_HOME + if os.getenv('HBASE_HOME'): + hbase_conf_dir = os.path.join(os.getenv('HBASE_HOME'), "conf") + else: + # default to pwd + hbase_conf_dir = '.' global hbase_conf_path # keep conf_path around for backward compatibility hbase_conf_path = hbase_conf_dir