Repository: kylin Updated Branches: refs/heads/master 8826e1ded -> 46d4f97c2
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/46d4f97c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/46d4f97c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/46d4f97c Branch: refs/heads/master Commit: 46d4f97c27c39f6eacc32f974bc17ba6860f50df Parents: 8826e1d Author: Seva Ostapenko <[email protected]> Authored: Thu Dec 28 16:18:58 2017 -0500 Committer: Billy Liu <[email protected]> Committed: Fri Feb 9 09:12:07 2018 +0800 ---------------------------------------------------------------------- build/conf/setenv.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/46d4f97c/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
