From f549ea33d3d5a584f5d9965bb8e56462a1d6528e Mon Sep 17 00:00:00 2001 From: Aaron Davidson Date: Thu, 19 Sep 2013 14:40:14 -0700 Subject: Standalone Scheduler fault tolerance using ZooKeeper This patch implements full distributed fault tolerance for standalone scheduler Masters. There is only one master Leader at a time, which is actively serving scheduling requests. If this Leader crashes, another master will eventually be elected, reconstruct the state from the first Master, and continue serving scheduling requests. Leader election is performed using the ZooKeeper leader election pattern. We try to minimize the use of ZooKeeper and the assumptions about ZooKeeper's behavior, so there is a layer of retries and session monitoring on top of the ZooKeeper client. Master failover follows directly from the single-node Master recovery via the file system (patch 194ba4b8), save that the Master state is stored in ZooKeeper instead. Configuration: By default, no recovery mechanism is enabled (spark.deploy.recoveryMode = NONE). By setting spark.deploy.recoveryMode to ZOOKEEPER and setting spark.deploy.zookeeper.url to an appropriate ZooKeeper URL, ZooKeeper recovery mode is enabled. By setting spark.deploy.recoveryMode to FILESYSTEM and setting spark.deploy.recoveryDirectory to an appropriate directory accessible by the Master, we will keep the behavior of from 194ba4b8. Additionally, places where a Master could be specificied by a spark:// url can now take comma-delimited lists to specify backup masters. Note that this is only used for registration of NEW Workers and application Clients. Once a Worker or Client has registered with the Master Leader, it is "in the system" and will never need to register again. Forthcoming: Documentation, tests (! - only ad hoc testing has been performed so far) I do not intend for this commit to be merged until tests are added, but this patch should still be mostly reviewable until then. --- pom.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pom.xml') diff --git a/pom.xml b/pom.xml index d74d45adf1..f8ea2b8920 100644 --- a/pom.xml +++ b/pom.xml @@ -344,6 +344,17 @@ 0.9 test + + org.apache.zookeeper + zookeeper + 3.4.5 + + + org.jboss.netty + netty + + + org.apache.hadoop hadoop-client -- cgit v1.2.3