You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2015/02/12 23:51:11 UTC
spark git commit: [SPARK-5759][Yarn]ExecutorRunnable should catch
YarnException while NMClient start contain...
Repository: spark
Updated Branches:
refs/heads/master 1d5663e92 -> 947b8bd82
[SPARK-5759][Yarn]ExecutorRunnable should catch YarnException while NMClient start contain...
some time since some reasons, it lead to some exception while NMClient start some containers.example:we do not config spark_shuffle on some machines, so it will throw a exception:
java.lang.Error: org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException: The auxService:spark_shuffle does not exist.
because YarnAllocator use ThreadPoolExecutor to start Container, so we can not find which container or hostname throw exception. I think we should catch YarnException in ExecutorRunnable when start container. if there are some exceptions, we can know the container id or hostname of failed container.
Author: lianhuiwang <li...@gmail.com>
Closes #4554 from lianhuiwang/SPARK-5759 and squashes the following commits:
caf5a99 [lianhuiwang] use SparkException to warp exception
c02140f [lianhuiwang] ExecutorRunnable should catch YarnException while NMClient start container
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/947b8bd8
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/947b8bd8
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/947b8bd8
Branch: refs/heads/master
Commit: 947b8bd82ec0f4c45910e6d781df4661f56e4587
Parents: 1d5663e
Author: lianhuiwang <li...@gmail.com>
Authored: Thu Feb 12 14:50:16 2015 -0800
Committer: Andrew Or <an...@databricks.com>
Committed: Thu Feb 12 14:51:06 2015 -0800
----------------------------------------------------------------------
.../org/apache/spark/deploy/yarn/ExecutorRunnable.scala | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/947b8bd8/yarn/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnable.scala
----------------------------------------------------------------------
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnable.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnable.scala
index 6d5b8fd..c1d3f73 100644
--- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnable.scala
+++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnable.scala
@@ -38,7 +38,7 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration
import org.apache.hadoop.yarn.ipc.YarnRPC
import org.apache.hadoop.yarn.util.{ConverterUtils, Records}
-import org.apache.spark.{SecurityManager, SparkConf, Logging}
+import org.apache.spark.{Logging, SecurityManager, SparkConf, SparkException}
import org.apache.spark.network.util.JavaUtils
class ExecutorRunnable(
@@ -109,7 +109,13 @@ class ExecutorRunnable(
}
// Send the start request to the ContainerManager
- nmClient.startContainer(container, ctx)
+ try {
+ nmClient.startContainer(container, ctx)
+ } catch {
+ case ex: Exception =>
+ throw new SparkException(s"Exception while starting container ${container.getId}" +
+ s" on host $hostname", ex)
+ }
}
private def prepareCommand(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org