Run Rule Engine Manually - adarshatm/My-Notes GitHub Wiki

Run Rule engine manually:

Cd /development/mm2/apps/ProjectEagle/RulesEngine/current/scripts Run this declaration and rest of the script separately: Logs can be found in Cd /development/mm2/apps/ProjectEagle/RulesEngine/current/logs Jar files are placed in Cd /development/mm2/apps/ProjectEagle/RulesEngine/current/lib If any of jar file missing use similar command to create one: cp common_2.11-2.6.8.jar rule-engine-common.jar

export PHASE_NAME=Phase2 export EAGLE_ENVIRONMENT=DEVL export EAGLE_PORT=4400 export ID_LIFE_CYCLE=DEVL export EAGLE_USER=mm2dusr export EAGLE_ROOT=ProjectEagle export EAGLE_ROOT=ProjectEagle/Phase2 export EAGLE_CONF=development.properties export EAGLE_LOCATION=development/mm2/apps/ProjectEagle export CURRENT_RULEENGINE=development/mm2/apps/ProjectEagle/RulesEngine/current export CURRENT_JOBSERVICE=development/mm2/apps/ProjectEagle/restJobService/current export EAGLE_LIB=development/mm2/apps/ProjectEagle/RulesEngine/current/lib export EAGLE_SERVER="localhost" export THRESHOLD=WARN export ELASTICHOST="localhost"export MODULE=RuleEngine export jobName=RuleEngine-20180626071159410 export jobId=20180626071159410

spark2-submit
--master yarn
--deploy-mode cluster
--queue mm2
--files /${CURRENT_RULEENGINE}/conf/${EAGLE_CONF},
/${CURRENT_RULEENGINE}/scripts/logo.png
--jars /${EAGLE_LIB}/mssql-jdbc-6.1.7.jre8-preview.jar,
/${EAGLE_LIB}/config-1.3.0.jar,
/${EAGLE_LIB}/play-json_2.11-2.5.9.jar,
/${EAGLE_LIB}/play_2.11-2.5.9.jar,
/${EAGLE_LIB}/javax.mail-api-1.5.6.jar,
/${EAGLE_LIB}/play-json-extensions_2.11-0.8.0.jar,
/${EAGLE_LIB}/javax.mail-1.5.6.jar,
/${EAGLE_LIB}/play-functional_2.11-2.5.9.jar,
/${EAGLE_LIB}/play-datacommons_2.11-2.5.9.jar,
/${EAGLE_LIB}/scopt_2.11-3.7.0.jar,
/${EAGLE_LIB}/cats-core_2.11-1.0.0-RC1.jar,
/${EAGLE_LIB}/cats-kernel_2.11-1.0.0-RC1.jar,
/${EAGLE_LIB}/cats-macros_2.11-1.0.0-RC1.jar,
/${EAGLE_LIB}/bcprov-jdk15on-1.57.jar,
/${EAGLE_LIB}/ojdbc7-12.1.0.2.jar,
/${EAGLE_LIB}/rule-engine-common.jar,
/${EAGLE_LIB}/loggingframework_2.11-1.5.3.jar,
/${EAGLE_LIB}/apache-log4j-extras-1.2.17.jar,
/${EAGLE_LIB}/commons-cli-1.4.jar,
/${EAGLE_LIB}/commons-httpclient-3.1.jar,
/${EAGLE_LIB}/json4s-jackson_2.11-3.2.11.jar,
/${EAGLE_LIB}/json4s-native_2.11-3.2.11.jar,
/${EAGLE_LIB}/kafka-clients-0.9.0.0.jar,
/${EAGLE_LIB}/log4j-1.2.17.jar,
/${EAGLE_LIB}/nv-i18n-1.20.jar
--executor-cores 4
--driver-memory 4G --executor-memory 2G
--conf spark.driver.maxResultSize=2G
--conf spark.dynamicAllocation.enabled=true
--conf spark.dynamicAllocation.initialExecutors=1
--conf spark.executor.extraJavaOptions=-Duser.timezone=UTC
--conf spark.driver.extraJavaOptions=-Duser.timezone=UTC
--conf spark.yarn.appMasterEnv.module="${MODULE}"
--conf spark.yarn.appMasterEnv.threshold=${THRESHOLD}
--conf spark.yarn.appMasterEnv.elasticHost=${ELASTICHOST}
--conf spark.yarn.appMasterEnv.environment=${EAGLE_ENVIRONMENT}
--conf spark.yarn.appMasterEnv.uniqueRequestId=${jobId}
--class ruleEngine.MKE_RuleEngineApp
--name "$jobName"
/${EAGLE_LIB}/spark-rule-engine.jar $jobId ${EAGLE_CONF} &