-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-2933] [yarn] Refactor and cleanup Yarn AM code. #2020
Commits on Aug 18, 2014
-
[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.
Marcelo Vanzin committedAug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for 848ca6d - Browse repository at this point
Copy the full SHA 848ca6dView commit details -
Changes to the yarn-alpha project to use common AM code.
Made some tweaks to the YarnAllocator interface to cover both APIs more easily. There's still a lot of cleanup possible on that front, but I'll leave that as a separate task.
Marcelo Vanzin committedAug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for 99a52d5 - Browse repository at this point
Copy the full SHA 99a52d5View commit details -
Marcelo Vanzin committed
Aug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for 8c72239 - Browse repository at this point
Copy the full SHA 8c72239View commit details -
Marcelo Vanzin committed
Aug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for 91beabb - Browse repository at this point
Copy the full SHA 91beabbView commit details -
Keep "ExecutorLauncher" as the main class for client-mode AM.
Marcelo Vanzin committedAug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for 0e4be3d - Browse repository at this point
Copy the full SHA 0e4be3dView commit details -
Finish app if SparkContext initialization times out.
This avoids the NPEs that would happen if code just kept going.
Marcelo Vanzin committedAug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for 5657c7d - Browse repository at this point
Copy the full SHA 5657c7dView commit details -
Fix some questionable error handling.
Marcelo Vanzin committedAug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for 34f1e63 - Browse repository at this point
Copy the full SHA 34f1e63View commit details -
Marcelo Vanzin committed
Aug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for ecb23cd - Browse repository at this point
Copy the full SHA ecb23cdView commit details -
Move cluster/client code to separate methods.
Makes code a little cleaner and easier to follow.
Marcelo Vanzin committedAug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for b6289ab - Browse repository at this point
Copy the full SHA b6289abView commit details -
Marcelo Vanzin committed
Aug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for 5150993 - Browse repository at this point
Copy the full SHA 5150993View commit details -
Restore shutdown hook to clean up staging dir.
Marcelo Vanzin committedAug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for be6068d - Browse repository at this point
Copy the full SHA be6068dView commit details -
Cleanup a couple more constants.
Marcelo Vanzin committedAug 18, 2014 Configuration menu - View commit details
-
Copy full SHA for 557fdeb - Browse repository at this point
Copy the full SHA 557fdebView commit details
Commits on Aug 19, 2014
-
Marcelo Vanzin committed
Aug 19, 2014 Configuration menu - View commit details
-
Copy full SHA for f581122 - Browse repository at this point
Copy the full SHA f581122View commit details -
Merge branch 'master' into SPARK-2933
Conflicts: yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala
Marcelo Vanzin committedAug 19, 2014 Configuration menu - View commit details
-
Copy full SHA for f02d3f8 - Browse repository at this point
Copy the full SHA f02d3f8View commit details -
Avoid an interrupted exception when shutting down from the reporter thread. Also, make extra effort to finish the RM connection.
Marcelo Vanzin committedAug 19, 2014 Configuration menu - View commit details
-
Copy full SHA for ecaf332 - Browse repository at this point
Copy the full SHA ecaf332View commit details
Commits on Aug 20, 2014
-
Merge branch 'master' into SPARK-2933
Conflicts: yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala
Marcelo Vanzin committedAug 20, 2014 Configuration menu - View commit details
-
Copy full SHA for 92770cc - Browse repository at this point
Copy the full SHA 92770ccView commit details -
Correctly clean up staging directory.
This change also avoids overriding the app's status with "SUCCEEDED" in cluster mode when the shutdown hook runs, by signaling the AM that the SparkContext was shut down (see YarnClusterScheduler.scala). That way the AM can correctly expose its final status to the RM.
Marcelo Vanzin committedAug 20, 2014 Configuration menu - View commit details
-
Copy full SHA for c0794be - Browse repository at this point
Copy the full SHA c0794beView commit details
Commits on Aug 21, 2014
-
Marcelo Vanzin committed
Aug 21, 2014 Configuration menu - View commit details
-
Copy full SHA for 41f8c8a - Browse repository at this point
Copy the full SHA 41f8c8aView commit details
Commits on Aug 25, 2014
-
Marcelo Vanzin committed
Aug 25, 2014 Configuration menu - View commit details
-
Copy full SHA for 0f5142c - Browse repository at this point
Copy the full SHA 0f5142cView commit details -
Marcelo Vanzin committed
Aug 25, 2014 Configuration menu - View commit details
-
Copy full SHA for 3a8ed37 - Browse repository at this point
Copy the full SHA 3a8ed37View commit details
Commits on Aug 26, 2014
-
Do not interrupt reporter thread from within itself.
Marcelo Vanzin committedAug 26, 2014 Configuration menu - View commit details
-
Copy full SHA for ff389ed - Browse repository at this point
Copy the full SHA ff389edView commit details -
Merge branch 'master' into SPARK-2933
Conflicts: yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala
Marcelo Vanzin committedAug 26, 2014 Configuration menu - View commit details
-
Copy full SHA for 3bbf3e7 - Browse repository at this point
Copy the full SHA 3bbf3e7View commit details