From 397cae3ed9907bcab14cf2a8c95ffe067f8c0337 Mon Sep 17 00:00:00 2001 From: lasantha Date: Thu, 15 Mar 2018 02:09:07 +0530 Subject: [PATCH] Modify load-spark-env-vars.sh and wso2server.sh In order to fix analytics spark isssue added environmental variables to the load-spark-env-vars.sh and wso2server.sh --- .../src/analytics/bin/load-spark-env-vars.sh | 12 ++++++------ modules/distribution/src/analytics/bin/wso2server.sh | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/distribution/src/analytics/bin/load-spark-env-vars.sh b/modules/distribution/src/analytics/bin/load-spark-env-vars.sh index d842449d..e9c6274c 100755 --- a/modules/distribution/src/analytics/bin/load-spark-env-vars.sh +++ b/modules/distribution/src/analytics/bin/load-spark-env-vars.sh @@ -5,13 +5,13 @@ echo 'Loading spark environment variables ' export CARBON_SPARK_HOME=$CARBON_HOME export _SPARK_ASSEMBLY=$CARBON_SPARK_HOME/../components/plugins/spark-core_2.10_*.wso2*.jar export SPARK_SCALA_VERSION=2.10 +export CARBON_CONFIG_DIR_PATH=$CARBON_HOME/conf +export CARBON_INTERNAL_LIB_DIR_PATH=$CARBON_HOME/../lib +export CARBON_EXTERNAL_LIB_DIR_PATH=$CARBON_HOME/../../lib +export CARBON_DROPINS_DIR_PATH=$CARBON_HOME/../../dropins +export COMPONENTS_REPO=$CARBON_HOME/../components/plugins +export CARBON_DATA_DIR_PATH=$CARBON_HOME/repository/data # *** jars will be added to the spark classpath in the code itself. check DAS-105 # export SPARK_CLASSPATH=`java -cp $CARBON_SPARK_HOME/repository/components/plugins/org.wso2.carbon.analytics.spark.utils*.jar org.wso2.carbon.analytics.spark.utils.ComputeClasspath $CARBON_HOME` # export SPARK_CLASSPATH=$SPARK_CLASSPATH:$(echo $CARBON_SPARK_HOME/repository/components/lib/*.jar | tr ' ' ':') -export carbon.config.dir.path=$CARBON_HOME/conf -export carbon.data.dir.path=$CARBON_HOME/repository/data -export carbon.internal.lib.dir.path=$CARBON_HOME/../lib -export carbon.external.lib.dir.path=$CARBON_HOME/../../lib -export carbon.dropins.dir.path=$CARBON_HOME/../../dropins -export components.repo=$CARBON_HOME/../components/plugins mkdir -p $CARBON_SPARK_HOME/lib_managed/jars \ No newline at end of file diff --git a/modules/distribution/src/analytics/bin/wso2server.sh b/modules/distribution/src/analytics/bin/wso2server.sh index a7109e23..22376557 100755 --- a/modules/distribution/src/analytics/bin/wso2server.sh +++ b/modules/distribution/src/analytics/bin/wso2server.sh @@ -315,6 +315,13 @@ CARBON_CLASSPATH="$CARBON_CLASSPATH":"$CARBON_HOME/../components/plugins/" #To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property. # -Djava.rmi.server.hostname="your.IP.goes.here" +export CARBON_CONFIG_DIR_PATH="$CARBON_HOME/conf" +export CARBON_INTERNAL_LIB_DIR_PATH="$CARBON_HOME/../lib" +export CARBON_EXTERNAL_LIB_DIR_PATH="$CARBON_HOME/../../lib" +export CARBON_DROPINS_DIR_PATH="$CARBON_HOME/../../dropins" +export COMPONENTS_REPO="$CARBON_HOME/../components/plugins" +export CARBON_DATA_DIR_PATH="$CARBON_HOME/repository/data" + while [ "$status" = "$START_EXIT_STATUS" ] do $JAVACMD \