Hi All, I recently upgraded my spark version to 2.4.1 but when I try to run it with the spark launcher 2.4, the set conf doesn't set my K8S environment variables from the launcher submit command. Did anything change or am I doing something wrong?
private def submitToSpark(launchId: String, req: SparkSubmitRequest, appArgsStr: String)(implicit sparkEc: ExecutionContext): Future[String] = { val promise: Promise[String] = Promise[String]() val launcher = new SparkLauncher() .setSparkHome(sys.env("SPARK_HOME")) .setMaster(req.k8master.getOrElse(Constants.KUBERNETES_MASTER)) .setVerbose(true) .addSparkArg("--verbose") .setAppResource(req.appResource) .setConf(Constants.SPARK_APP_NAME_KEY, req.appName) .setMainClass(req.appMainClass.getOrElse(Constants.SPARK_APP_MAINCLASS)) .setConf(Constants.SPARK_KUBERNETES_NAMESPACE_KEY, req.appNamespace.getOrElse(Constants.SPARK_KUBERNETES_NAMESPACE)) .setConf(Constants.SPARK_EXECUTOR_INSTANCES_KEY, req.executorInstances.getOrElse(Constants.SPARK_EXECUTOR_INSTANCES)) .setConf(Constants.SPARK_DRIVER_LABEL_KEY, launchId) .setDeployMode("cluster") .setConf(Constants.SPARK_KUBERNETES_CONTAINER_IMAGE_KEY, req.k8containerImage.getOrElse(Constants.SPARK_KUBERNETES_CONTAINER_IMAGE)) .setConf(Constants.SPARK_KUBERNETES_AUTHENTICATE_DRIVER_SERVICEACCOUNTNAME_KEY, req.serviceAccount.getOrElse(Constants.SPARK_KUBERNETES_AUTHENTICATE_DRIVER_SERVICEACCOUNTNAME)) .setConf(Constants.SPARK_DRIVER_IAM_ROLE_ARN_KEY, config.get[String]("k8s.submitter.spark.driver.iam.role.arn")) .setConf(Constants.SPARK_EXECUTOR_IAM_ROLE_ARN_KEY, config.get[String]("k8s.submitter.spark.executor.iam.role.arn")) .addAppArgs(appArgsStr) Thanks and Regards, I. Ben Chukwumobi ________________________________________________________ The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.