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 EB8F418F13 for ; Wed, 24 Jun 2015 21:00:19 +0000 (UTC) Received: (qmail 92731 invoked by uid 500); 24 Jun 2015 21:00:19 -0000 Delivered-To: apmail-phoenix-commits-archive@phoenix.apache.org Received: (qmail 92699 invoked by uid 500); 24 Jun 2015 21:00:19 -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 92690 invoked by uid 99); 24 Jun 2015 21:00:19 -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; Wed, 24 Jun 2015 21:00:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AF0ECE35E5; Wed, 24 Jun 2015 21:00:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ndimiduk@apache.org To: commits@phoenix.apache.org Message-Id: <27495150ce904c898a30007b2f8b7b02@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: phoenix git commit: PHOENIX-1975 Detect and use HBASE_HOME when set Date: Wed, 24 Jun 2015 21:00:19 +0000 (UTC) Repository: phoenix Updated Branches: refs/heads/master 3cf22a7de -> 3e4933982 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/3e493398 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/3e493398 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/3e493398 Branch: refs/heads/master Commit: 3e49339828e64842891879a18248a91601740dd0 Parents: 3cf22a7 Author: Nick Dimiduk Authored: Wed Jun 24 13:59:00 2015 -0700 Committer: Nick Dimiduk Committed: Wed Jun 24 13:59:00 2015 -0700 ---------------------------------------------------------------------- bin/phoenix_utils.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/3e493398/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