@Override public MesosWorkerStore createMesosWorkerStore(Configuration configuration, Executor executor) throws Exception { RetrievableStateStorageHelper<MesosWorkerStore.Worker> stateStorageHelper = ZooKeeperUtils.createFileSystemStateStorage(configuration, "mesosWorkerStore"); ZooKeeperStateHandleStore<MesosWorkerStore.Worker> zooKeeperStateHandleStore = zooKeeperUtilityFactory.createZooKeeperStateHandleStore( "/workers", stateStorageHelper); ZooKeeperSharedValue frameworkId = zooKeeperUtilityFactory.createSharedValue("/frameworkId", new byte[0]); ZooKeeperSharedCount totalTaskCount = zooKeeperUtilityFactory.createSharedCount("/taskCount", 0); return new ZooKeeperMesosWorkerStore( zooKeeperStateHandleStore, frameworkId, totalTaskCount); }
/** * Creates a {@link ZooKeeperSubmittedJobGraphStore} instance. * * @param client The {@link CuratorFramework} ZooKeeper client to use * @param configuration {@link Configuration} object * @return {@link ZooKeeperSubmittedJobGraphStore} instance * @throws Exception if the submitted job graph store cannot be created */ public static ZooKeeperSubmittedJobGraphStore createSubmittedJobGraphs( CuratorFramework client, Configuration configuration) throws Exception { checkNotNull(configuration, "Configuration"); RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage = createFileSystemStateStorage(configuration, "submittedJobGraph"); // ZooKeeper submitted jobs root dir String zooKeeperSubmittedJobsPath = configuration.getString(HighAvailabilityOptions.HA_ZOOKEEPER_JOBGRAPHS_PATH); return new ZooKeeperSubmittedJobGraphStore( client, zooKeeperSubmittedJobsPath, stateStorage); }
/** * Creates a {@link ZooKeeperSubmittedJobGraphStore} instance. * * @param client The {@link CuratorFramework} ZooKeeper client to use * @param configuration {@link Configuration} object * @param executor to run ZooKeeper callbacks * @return {@link ZooKeeperSubmittedJobGraphStore} instance * @throws Exception if the submitted job graph store cannot be created */ public static ZooKeeperSubmittedJobGraphStore createSubmittedJobGraphs( CuratorFramework client, Configuration configuration, Executor executor) throws Exception { checkNotNull(configuration, "Configuration"); RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage = createFileSystemStateStorage(configuration, "submittedJobGraph"); // ZooKeeper submitted jobs root dir String zooKeeperSubmittedJobsPath = configuration.getString(HighAvailabilityOptions.HA_ZOOKEEPER_JOBGRAPHS_PATH); return new ZooKeeperSubmittedJobGraphStore( client, zooKeeperSubmittedJobsPath, stateStorage, executor); }
/** * Creates a {@link ZooKeeperSubmittedJobGraphStore} instance. * * @param client The {@link CuratorFramework} ZooKeeper client to use * @param configuration {@link Configuration} object * @return {@link ZooKeeperSubmittedJobGraphStore} instance * @throws Exception if the submitted job graph store cannot be created */ public static ZooKeeperSubmittedJobGraphStore createSubmittedJobGraphs( CuratorFramework client, Configuration configuration) throws Exception { checkNotNull(configuration, "Configuration"); RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage = createFileSystemStateStorage(configuration, "submittedJobGraph"); // ZooKeeper submitted jobs root dir String zooKeeperSubmittedJobsPath = configuration.getString(HighAvailabilityOptions.HA_ZOOKEEPER_JOBGRAPHS_PATH); return new ZooKeeperSubmittedJobGraphStore( client, zooKeeperSubmittedJobsPath, stateStorage); }
/** * Creates a {@link ZooKeeperSubmittedJobGraphStore} instance. * * @param client The {@link CuratorFramework} ZooKeeper client to use * @param configuration {@link Configuration} object * @param executor to run ZooKeeper callbacks * @return {@link ZooKeeperSubmittedJobGraphStore} instance * @throws Exception if the submitted job graph store cannot be created */ public static ZooKeeperSubmittedJobGraphStore createSubmittedJobGraphs( CuratorFramework client, Configuration configuration, Executor executor) throws Exception { checkNotNull(configuration, "Configuration"); RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage = createFileSystemStateStorage(configuration, "submittedJobGraph"); // ZooKeeper submitted jobs root dir String zooKeeperSubmittedJobsPath = ConfigurationUtil.getStringWithDeprecatedKeys( configuration, ConfigConstants.HA_ZOOKEEPER_JOBGRAPHS_PATH, ConfigConstants.DEFAULT_ZOOKEEPER_JOBGRAPHS_PATH, ConfigConstants.ZOOKEEPER_JOBGRAPHS_PATH); return new ZooKeeperSubmittedJobGraphStore( client, zooKeeperSubmittedJobsPath, stateStorage, executor); }
HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINTS_PATH); RetrievableStateStorageHelper<CompletedCheckpoint> stateStorage = createFileSystemStateStorage( configuration, "completedCheckpoint");
HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINTS_PATH); RetrievableStateStorageHelper<CompletedCheckpoint> stateStorage = createFileSystemStateStorage( configuration, "completedCheckpoint");
ConfigConstants.ZOOKEEPER_CHECKPOINTS_PATH); RetrievableStateStorageHelper<CompletedCheckpoint> stateStorage = createFileSystemStateStorage( configuration, "completedCheckpoint");
HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINTS_PATH); RetrievableStateStorageHelper<CompletedCheckpoint> stateStorage = createFileSystemStateStorage( configuration, "completedCheckpoint");