phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject phoenix git commit: PHOENIX-1975 Detect and use HBASE_HOME when set
Date Wed, 24 Jun 2015 21:00:19 GMT
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 <ndimiduk@apache.org>
Authored: Wed Jun 24 13:59:00 2015 -0700
Committer: Nick Dimiduk <ndimiduk@apache.org>
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
 


Mime
View raw message