From 1fd1dae8b17024ca7ce1ab7885d928c8460f76a8 Mon Sep 17 00:00:00 2001 From: judy0131 Date: Mon, 23 Mar 2020 19:17:12 +0800 Subject: [PATCH] optimize code --- .../scala/cn/piflow/util/FlowLauncher.scala | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/piflow-core/src/main/scala/cn/piflow/util/FlowLauncher.scala b/piflow-core/src/main/scala/cn/piflow/util/FlowLauncher.scala index 743bc7f..f5dc612 100644 --- a/piflow-core/src/main/scala/cn/piflow/util/FlowLauncher.scala +++ b/piflow-core/src/main/scala/cn/piflow/util/FlowLauncher.scala @@ -29,8 +29,6 @@ object FlowLauncher { .setDeployMode(PropertyUtil.getPropertyValue("spark.deploy.mode")) .setAppResource(ConfigureUtil.getPiFlowBundlePath()) .setVerbose(true) - //.setConf("spark.jars", PropertyUtil.getPropertyValue("piflow.bundle")) - //.setConf("spark.hive.metastore.uris",PropertyUtil.getPropertyValue("hive.metastore.uris")) .setConf("spark.driver.memory", flow.getDriverMemory()) .setConf("spark.executor.instances", flow.getExecutorNum()) .setConf("spark.executor.memory", flow.getExecutorMem()) @@ -40,24 +38,9 @@ object FlowLauncher { .setMainClass("cn.piflow.api.StartFlowMain") .addAppArgs(flowJson) - /*if (PropertyUtil.getPropertyValue("hive.metastore.uris") != null){ - sparkLauncher.setConf("spark.hive.metastore.uris",PropertyUtil.getPropertyValue("hive.metastore.uris")) - }*/ - if(PropertyUtil.getPropertyValue("yarn.resourcemanager.hostname") != null) + if(PropertyUtil.getPropertyValue("yarn.resourcemanager.hostname") != null) sparkLauncher.setConf("spark.hadoop.yarn.resourcemanager.hostname", PropertyUtil.getPropertyValue("yarn.resourcemanager.hostname")) - /*if(PropertyUtil.getPropertyValue("yarn.resourcemanager.address") != null) - sparkLauncher.setConf("spark.hadoop.yarn.resourcemanager.address", PropertyUtil.getPropertyValue("yarn.resourcemanager.address")) - - if(PropertyUtil.getPropertyValue("spark.yarn.access.namenode") != null) - sparkLauncher.setConf("spark.yarn.access.namenode", PropertyUtil.getPropertyValue("spark.yarn.access.namenode")) - else - sparkLauncher.setConf("spark.yarn.access.namenode", PropertyUtil.getPropertyValue("fs.defaultFS")) - - if(PropertyUtil.getPrope rtyValue("yarn.stagingDir") != null) - sparkLauncher.setConf("spark.yarn.stagingDir", PropertyUtil.getPropertyValue("yarn.stagingDir")) - if(PropertyUtil.getPropertyValue("yarn.jars") != null) - sparkLauncher.setConf("spark.yarn.jars", PropertyUtil.getPropertyValue("yarn.jars"))*/ //add other jars for application val classPath = PropertyUtil.getClassPath()