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);
}
}
Aggregations