kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [19/50] [abbrv] incubator-kylin git commit: add a separate setenv.sh for jvm settings, debug settings and native libarary
Date Sat, 21 Mar 2015 00:27:24 GMT
add a separate setenv.sh for jvm settings, debug settings and native libarary


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

Branch: refs/heads/streaming-localdict
Commit: a540f4024134f2198c52c0a8dfede10da2a08f39
Parents: 014ef83
Author: honma <honma@ebay.com>
Authored: Thu Mar 19 16:10:11 2015 -0700
Committer: honma <honma@ebay.com>
Committed: Thu Mar 19 18:56:21 2015 -0700

----------------------------------------------------------------------
 bin/kylin.sh  | 16 ++++++++--------
 bin/setenv.sh | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a540f402/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/bin/kylin.sh b/bin/kylin.sh
index a6983df..232feef 100644
--- a/bin/kylin.sh
+++ b/bin/kylin.sh
@@ -7,12 +7,6 @@ then
     tomcat_root=${dir}/../tomcat
     export tomcat_root
 
-    #if [ ! -z "$KYLIN_LD_LIBRARY_PATH" ]
-    #then
-    #    echo "KYLIN_LD_LIBRARY_PATH is set to $KYLIN_LD_LIBRARY_PATH"
-    #else
-    #    exit 1
-    #fi
 
     #The location of all hadoop/hbase configurations are difficult to get.
     #Plus, some of the system properties are secretly set in hadoop/hbase shell command.
@@ -23,7 +17,6 @@ then
     #In this way we no longer need to explicitly configure hadoop/hbase related classpath
for tomcat,
     #hbase command will do all the dirty tasks for us:
 
-    #-Djava.library.path=${KYLIN_LD_LIBRARY_PATH} \
 
 
     useSandbox=`cat ${KYLIN_HOME}/conf/kylin.properties | grep 'kylin.sandbox' | awk -F '='
'{print $2}'`
@@ -31,12 +24,19 @@ then
     if [ "$useSandbox" = "true" ]
         then spring_profile="sandbox"
     fi
+
+    #retrive $hive_dependency
     source ${dir}/find-hive-dependency.sh
+    #retrive $KYLIN_EXTRA_START_OPTS
+    if [ -f "${dir}/setenv.sh" ]
+        then source ${dir}/setenv.sh
+    fi
 
     export HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:$HBASE_CLASSPATH_PREFIX
     export HBASE_CLASSPATH=$hive_dependency:${HBASE_CLASSPATH}
 
-    hbase -Djava.util.logging.config.file=${tomcat_root}/conf/logging.properties \
+    hbase ${KYLIN_EXTRA_START_OPTS} \
+    -Djava.util.logging.config.file=${tomcat_root}/conf/logging.properties \
     -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
     -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
     -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a540f402/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/bin/setenv.sh b/bin/setenv.sh
new file mode 100755
index 0000000..53f614d
--- /dev/null
+++ b/bin/setenv.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# uncomment following to for it to take effect
+# export KYLIN_JVM_SETTINGS="-Xms16g -Xmx16g -XX:MaxPermSize=512m -XX:NewSize=3g -XX:MaxNewSize=3g
-XX:SurvivorRatio=4 -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=70 -XX:+DisableExplicitGC"
+
+# uncomment following to for it to take effect
+# export KYLIN_DEBUG_SETTINGS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false -javaagent:${KYLIN_HOME}/lib/CustomAgent.jar -Dcom.ebay.lnp.rmiagent.port=8080"
+
+# uncomment following to for it to take effect
+# export KYLIN_LD_LIBRARY_SETTINGS="-Djava.library.path=/apache/hadoop/lib/native/Linux-amd64-64"
+
+export KYLIN_EXTRA_START_OPTS=""
+
+if [ ! -z "${KYLIN_JVM_SETTINGS}" ]
+then
+    echo "KYLIN_JVM_SETTINGS is ${KYLIN_JVM_SETTINGS}"
+    KYLIN_EXTRA_START_OPTS="${KYLIN_JVM_SETTINGS} ${KYLIN_EXTRA_START_OPTS}"
+else
+    echo "KYLIN_JVM_SETTINGS is not set, using default jvm settings"
+fi
+
+if [ ! -z "${KYLIN_DEBUG_SETTINGS}" ]
+then
+    echo "KYLIN_DEBUG_SETTINGS is ${KYLIN_DEBUG_SETTINGS}"
+    KYLIN_EXTRA_START_OPTS="${KYLIN_DEBUG_SETTINGS} ${KYLIN_EXTRA_START_OPTS}"
+else
+    echo "KYLIN_DEBUG_SETTINGS is not set, will not enable remote debuging"
+fi
+
+if [ ! -z "${KYLIN_LD_LIBRARY_SETTINGS}" ]
+then
+    echo "KYLIN_LD_LIBRARY_SETTINGS is ${KYLIN_LD_LIBRARY_SETTINGS}"
+    KYLIN_EXTRA_START_OPTS="${KYLIN_LD_LIBRARY_SETTINGS} ${KYLIN_EXTRA_START_OPTS}"
+else
+    echo "KYLIN_LD_LIBRARY_SETTINGS is not set, lzo compression at MR and hbase might not
work"
+fi


Mime
View raw message