support local run mode

This commit is contained in:
judy0131 2020-06-30 18:08:13 +08:00
parent afeabaf264
commit 289c2a0353
1 changed files with 3 additions and 3 deletions

View File

@ -42,11 +42,11 @@ object FlowLauncher {
.setMainClass("cn.piflow.api.StartFlowMain")
.addAppArgs(flowJsonencryptAES)
if(PropertyUtil.getPropertyValue("spark.master").equals("yarn"))
val sparkMaster = PropertyUtil.getPropertyValue("spark.master")
if(sparkMaster.equals("yarn")){
sparkLauncher.setDeployMode(PropertyUtil.getPropertyValue("spark.deploy.mode"))
if(PropertyUtil.getPropertyValue("yarn.resourcemanager.hostname") != null)
sparkLauncher.setConf("spark.hadoop.yarn.resourcemanager.hostname", PropertyUtil.getPropertyValue("yarn.resourcemanager.hostname"))
}
//add other jars for application
val classPath = PropertyUtil.getClassPath()