Search in sources :

Example 1 with ZooKeeperMultipleComponentLeaderElectionHaServices

use of org.apache.flink.runtime.highavailability.zookeeper.ZooKeeperMultipleComponentLeaderElectionHaServices in project flink by apache.

the class HighAvailabilityServicesUtils method createZooKeeperHaServices.

private static HighAvailabilityServices createZooKeeperHaServices(Configuration configuration, Executor executor, FatalErrorHandler fatalErrorHandler) throws Exception {
    final boolean useOldHaServices = configuration.get(HighAvailabilityOptions.USE_OLD_HA_SERVICES);
    BlobStoreService blobStoreService = BlobUtils.createBlobStoreFromConfig(configuration);
    final CuratorFrameworkWithUnhandledErrorListener curatorFrameworkWrapper = ZooKeeperUtils.startCuratorFramework(configuration, fatalErrorHandler);
    if (useOldHaServices) {
        return new ZooKeeperHaServices(curatorFrameworkWrapper, executor, configuration, blobStoreService);
    } else {
        return new ZooKeeperMultipleComponentLeaderElectionHaServices(curatorFrameworkWrapper, configuration, executor, blobStoreService, fatalErrorHandler);
    }
}
Also used : ZooKeeperHaServices(org.apache.flink.runtime.highavailability.zookeeper.ZooKeeperHaServices) CuratorFrameworkWithUnhandledErrorListener(org.apache.flink.runtime.highavailability.zookeeper.CuratorFrameworkWithUnhandledErrorListener) ZooKeeperMultipleComponentLeaderElectionHaServices(org.apache.flink.runtime.highavailability.zookeeper.ZooKeeperMultipleComponentLeaderElectionHaServices) BlobStoreService(org.apache.flink.runtime.blob.BlobStoreService)

Aggregations

BlobStoreService (org.apache.flink.runtime.blob.BlobStoreService)1 CuratorFrameworkWithUnhandledErrorListener (org.apache.flink.runtime.highavailability.zookeeper.CuratorFrameworkWithUnhandledErrorListener)1 ZooKeeperHaServices (org.apache.flink.runtime.highavailability.zookeeper.ZooKeeperHaServices)1 ZooKeeperMultipleComponentLeaderElectionHaServices (org.apache.flink.runtime.highavailability.zookeeper.ZooKeeperMultipleComponentLeaderElectionHaServices)1