You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ma...@apache.org on 2015/12/11 03:43:53 UTC
[15/52] [abbrv] phoenix git commit: PHOENIX-2449 QueryServer needs
Hadoop configuration on classpath with Kerberos(Josh Elser)
PHOENIX-2449 QueryServer needs Hadoop configuration on classpath with Kerberos(Josh Elser)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/cab39d72
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/cab39d72
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/cab39d72
Branch: refs/heads/calcite
Commit: cab39d72171ff76397661fec93d55da7420352fb
Parents: 1b5e7fd
Author: Enis Soztutar <en...@apache.org>
Authored: Wed Nov 25 10:55:00 2015 -0800
Committer: Enis Soztutar <en...@apache.org>
Committed: Wed Nov 25 10:55:00 2015 -0800
----------------------------------------------------------------------
bin/phoenix_utils.py | 15 +++++++++++++--
bin/queryserver.py | 4 +++-
2 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/cab39d72/bin/phoenix_utils.py
----------------------------------------------------------------------
diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py
index 068d097..5fb4f08 100755
--- a/bin/phoenix_utils.py
+++ b/bin/phoenix_utils.py
@@ -85,8 +85,11 @@ def setPath():
# else fall back to HBASE_HOME
if os.getenv('HBASE_HOME'):
hbase_conf_dir = os.path.join(os.getenv('HBASE_HOME'), "conf")
+ elif os.name == 'posix':
+ # default to the bigtop configuration dir
+ hbase_conf_dir = '/etc/hbase/conf'
else:
- # default to pwd
+ # Try to provide something valid
hbase_conf_dir = '.'
global hbase_conf_path # keep conf_path around for backward compatibility
hbase_conf_path = hbase_conf_dir
@@ -114,7 +117,15 @@ def setPath():
phoenix_test_jar_path = os.path.join(current_dir, "..", "phoenix-core", "target","*")
global hadoop_conf
- hadoop_conf = os.getenv('HADOOP_CONF_DIR', '')
+ hadoop_conf = os.getenv('HADOOP_CONF_DIR', None)
+ if not hadoop_conf:
+ if os.name == 'posix':
+ # Try to provide a sane configuration directory for Hadoop if not otherwise provided.
+ # If there's no jaas file specified by the caller, this is necessary when Kerberos is enabled.
+ hadoop_conf = '/etc/hadoop/conf'
+ else:
+ # Try to provide something valid..
+ hadoop_conf = '.'
global hadoop_classpath
if (os.name != 'nt'):
http://git-wip-us.apache.org/repos/asf/phoenix/blob/cab39d72/bin/queryserver.py
----------------------------------------------------------------------
diff --git a/bin/queryserver.py b/bin/queryserver.py
index 11f5aeb..78d340c 100755
--- a/bin/queryserver.py
+++ b/bin/queryserver.py
@@ -67,6 +67,7 @@ else:
# HBase configuration folder path (where hbase-site.xml reside) for
# HBase/Phoenix client side property override
hbase_config_path = phoenix_utils.hbase_conf_dir
+hadoop_config_path = phoenix_utils.hadoop_conf
# default paths ## TODO: add windows support
java_home = os.getenv('JAVA_HOME')
@@ -118,7 +119,8 @@ else:
# " -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n " + \
# " -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \
-java_cmd = '%(java)s -cp ' + hbase_config_path + os.pathsep + phoenix_utils.phoenix_queryserver_jar + os.pathsep + phoenix_utils.phoenix_client_jar + \
+java_cmd = '%(java)s -cp ' + hbase_config_path + os.pathsep + hadoop_config_path + os.pathsep + \
+ phoenix_utils.phoenix_queryserver_jar + os.pathsep + phoenix_utils.phoenix_client_jar + \
" -Dproc_phoenixserver" + \
" -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, "log4j.properties") + \
" -Dpsql.root.logger=%(root_logger)s" + \