Repository: kylin
Updated Branches:
  refs/heads/2.3.x 82bc21581 -> 353a725c9


KYLIN-3139 - Failure in map-reduce job due to undefined hdp.version variable 
when using HDP stack and remote HBase cluster

Signed-off-by: Billy Liu <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/353a725c
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/353a725c
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/353a725c

Branch: refs/heads/2.3.x
Commit: 353a725c945fc151051aff4b554dcf445edd1e5f
Parents: 82bc215
Author: Seva Ostapenko <[email protected]>
Authored: Thu Dec 28 16:18:58 2017 -0500
Committer: Billy Liu <[email protected]>
Committed: Fri Feb 9 09:13:06 2018 +0800

----------------------------------------------------------------------
 build/conf/setenv.sh | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/353a725c/build/conf/setenv.sh
----------------------------------------------------------------------
diff --git a/build/conf/setenv.sh b/build/conf/setenv.sh
index 7bc8827..bec9dc2 100755
--- a/build/conf/setenv.sh
+++ b/build/conf/setenv.sh
@@ -27,10 +27,20 @@ export KYLIN_JVM_SETTINGS="-Xms1024M -Xmx4096M -Xss1024K 
-XX:MaxPermSize=512M -v
 # uncomment following to for it to take effect(the values need adjusting to 
fit your env)
 # export KYLIN_DEBUG_SETTINGS="-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false"
 
-# uncomment following to for it to take effect(the values need adjusting to 
fit your env)
-# export 
KYLIN_LD_LIBRARY_SETTINGS="-Djava.library.path=/apache/hadoop/lib/native/Linux-amd64-64"
-
-export KYLIN_EXTRA_START_OPTS=""
+# when running on HDP, try to determine the software stack version adn set 
hdp.version JVM property 
+if [[ -d "/usr/hdp/current/hadoop-client" ]]
+then
+   export KYLIN_EXTRA_START_OPTS="-Dhdp.version=`ls -l 
/usr/hdp/current/hadoop-client | awk -F'/' '{print $8}'`"
+   # attempt to locate JVM native libraries and set corresponding property
+   if [[ -d "/usr/hdp/current/hadoop-client/lib/native" ]]
+   then
+      export 
KYLIN_LD_LIBRARY_SETTINGS="-Djava.library.path=/usr/hdp/current/hadoop-client/lib/native"
+   fi
+else
+   export KYLIN_EXTRA_START_OPTS=""
+   # uncomment the following line to set JVM native library path, the values 
need to reflect your environment and hardware architecture
+   # export 
KYLIN_LD_LIBRARY_SETTINGS="-Djava.library.path=/apache/hadoop/lib/native/Linux-amd64-64"
+fi
 
 if [ ! -z "${KYLIN_JVM_SETTINGS}" ]
 then

Reply via email to