-
- Downloads
[SPARK-2933] [yarn] Refactor and cleanup Yarn AM code.
This change modifies the Yarn module so that all the logic related to running the ApplicationMaster is localized. Instead of, previously, 4 different classes with mostly identical code, now we have: - A single, shared ApplicationMaster class, which can operate both in client and cluster mode, and substitutes the old ApplicationMaster (for cluster mode) and ExecutorLauncher (for client mode). The benefit here is that all different execution modes for all supported yarn versions use the same shared code for monitoring executor allocation, setting up configuration, and monitoring the process's lifecycle. - A new YarnRMClient interface, which defines basic RM functionality needed by the ApplicationMaster. This interface has concrete implementations for each supported Yarn version. - A new YarnAllocator interface, which just abstracts the existing interface of the YarnAllocationHandler class. This is to avoid having to touch the allocator code too much in this change, although it might benefit from a similar effort in the future. The end result is much easier to understand code, with much less duplication, making it much easier to fix bugs, add features, and test everything knowing that all supported versions will behave the same. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #2020 from vanzin/SPARK-2933 and squashes the following commits: 3bbf3e7 [Marcelo Vanzin] Merge branch 'master' into SPARK-2933 ff389ed [Marcelo Vanzin] Do not interrupt reporter thread from within itself. 3a8ed37 [Marcelo Vanzin] Remote stale comment. 0f5142c [Marcelo Vanzin] Review feedback. 41f8c8a [Marcelo Vanzin] Fix app status reporting. c0794be [Marcelo Vanzin] Correctly clean up staging directory. 92770cc [Marcelo Vanzin] Merge branch 'master' into SPARK-2933 ecaf332 [Marcelo Vanzin] Small fix to shutdown code. f02d3f8 [Marcelo Vanzin] Merge branch 'master' into SPARK-2933 f581122 [Marcelo Vanzin] Review feedback. 557fdeb [Marcelo Vanzin] Cleanup a couple more constants. be6068d [Marcelo Vanzin] Restore shutdown hook to clean up staging dir. 5150993 [Marcelo Vanzin] Some more cleanup. b6289ab [Marcelo Vanzin] Move cluster/client code to separate methods. ecb23cd [Marcelo Vanzin] More trivial cleanup. 34f1e63 [Marcelo Vanzin] Fix some questionable error handling. 5657c7d [Marcelo Vanzin] Finish app if SparkContext initialization times out. 0e4be3d [Marcelo Vanzin] Keep "ExecutorLauncher" as the main class for client-mode AM. 91beabb [Marcelo Vanzin] Fix UI filter registration. 8c72239 [Marcelo Vanzin] Trivial cleanups. 99a52d5 [Marcelo Vanzin] Changes to the yarn-alpha project to use common AM code. 848ca6d [Marcelo Vanzin] [SPARK-2933] [yarn] Refactor and cleanup Yarn AM code.
Showing
- yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala 0 additions, 453 deletions...cala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
- yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala 0 additions, 315 deletions...scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala
- yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala 34 additions, 158 deletions.../org/apache/spark/deploy/yarn/YarnAllocationHandler.scala
- yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClientImpl.scala 103 additions, 0 deletions...scala/org/apache/spark/deploy/yarn/YarnRMClientImpl.scala
- yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala 430 additions, 0 deletions...cala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
- yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMasterArguments.scala 11 additions, 15 deletions...apache/spark/deploy/yarn/ApplicationMasterArguments.scala
- yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala 1 addition, 8 deletions.../scala/org/apache/spark/deploy/yarn/ClientArguments.scala
- yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala 31 additions, 23 deletions.../main/scala/org/apache/spark/deploy/yarn/ClientBase.scala
- yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala 34 additions, 0 deletions...in/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala
- yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala 67 additions, 0 deletions...ain/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala
- yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala 51 additions, 0 deletions...la/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala
- yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientClusterScheduler.scala 5 additions, 6 deletions.../spark/scheduler/cluster/YarnClientClusterScheduler.scala
- yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala 2 additions, 5 deletions.../spark/scheduler/cluster/YarnClientSchedulerBackend.scala
- yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClusterScheduler.scala 12 additions, 5 deletions...apache/spark/scheduler/cluster/YarnClusterScheduler.scala
- yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala 0 additions, 276 deletions...scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala
- yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala 35 additions, 161 deletions.../org/apache/spark/deploy/yarn/YarnAllocationHandler.scala
- yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClientImpl.scala 76 additions, 0 deletions...scala/org/apache/spark/deploy/yarn/YarnRMClientImpl.scala
Loading
Please register or sign in to comment