diff --git a/docs/running-on-yarn.md b/docs/running-on-yarn.md index 0b265b0cb1b3..18d424e1b2cd 100644 --- a/docs/running-on-yarn.md +++ b/docs/running-on-yarn.md @@ -500,6 +500,13 @@ providers can be disabled individually by setting `spark.security.credentials.{s The default value should be enough for most deployments. + + spark.yarn.log.application.report + true + + Whether to show the interaction reports with yarn. + + ## Troubleshooting Kerberos diff --git a/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/config.scala b/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/config.scala index 129084a86597..3e499c3d6f96 100644 --- a/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/config.scala +++ b/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/config.scala @@ -334,4 +334,9 @@ package object config { .booleanConf .createWithDefault(false) + private[spark] val SPARK_YARN_LOG_APPLICATION_REPORT = ConfigBuilder("spark.yarn.log.application.report") + .doc("Whether to show the interaction reports with yarn.") + .booleanConf + .createWithDefault(true) + } diff --git a/resource-managers/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala b/resource-managers/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala index f1a8df00f9c5..aefec79715ff 100644 --- a/resource-managers/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala +++ b/resource-managers/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala @@ -111,7 +111,8 @@ private[spark] class YarnClientSchedulerBackend( override def run() { try { val YarnAppReport(_, state, diags) = - client.monitorApplication(appId.get, logApplicationReport = true) + client.monitorApplication(appId.get, + logApplicationReport = conf.getBoolean(SPARK_YARN_LOG_APPLICATION_REPORT, true)) logError(s"YARN application has exited unexpectedly with state $state! " + "Check the YARN application logs for more details.") diags.foreach { err =>