org.apache.flink.runtime.checkpoint.ZooKeeperCompletedCheckpointStore Java Examples
The following examples show how to use
org.apache.flink.runtime.checkpoint.ZooKeeperCompletedCheckpointStore.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ZooKeeperUtils.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * Creates a {@link ZooKeeperCompletedCheckpointStore} instance. * * @param client The {@link CuratorFramework} ZooKeeper client to use * @param configuration {@link Configuration} object * @param jobId ID of job to create the instance for * @param maxNumberOfCheckpointsToRetain The maximum number of checkpoints to retain * @param executor to run ZooKeeper callbacks * @return {@link ZooKeeperCompletedCheckpointStore} instance * @throws Exception if the completed checkpoint store cannot be created */ public static CompletedCheckpointStore createCompletedCheckpoints( CuratorFramework client, Configuration configuration, JobID jobId, int maxNumberOfCheckpointsToRetain, Executor executor) throws Exception { checkNotNull(configuration, "Configuration"); String checkpointsPath = configuration.getString( HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINTS_PATH); RetrievableStateStorageHelper<CompletedCheckpoint> stateStorage = createFileSystemStateStorage( configuration, "completedCheckpoint"); checkpointsPath += ZooKeeperSubmittedJobGraphStore.getPathForJob(jobId); final ZooKeeperCompletedCheckpointStore zooKeeperCompletedCheckpointStore = new ZooKeeperCompletedCheckpointStore( maxNumberOfCheckpointsToRetain, createZooKeeperStateHandleStore(client, checkpointsPath, stateStorage), executor); LOG.info("Initialized {} in '{}'.", ZooKeeperCompletedCheckpointStore.class.getSimpleName(), checkpointsPath); return zooKeeperCompletedCheckpointStore; }
Example #2
Source File: ZooKeeperUtils.java From flink with Apache License 2.0 | 5 votes |
/** * Creates a {@link ZooKeeperCompletedCheckpointStore} instance. * * @param client The {@link CuratorFramework} ZooKeeper client to use * @param configuration {@link Configuration} object * @param jobId ID of job to create the instance for * @param maxNumberOfCheckpointsToRetain The maximum number of checkpoints to retain * @param executor to run ZooKeeper callbacks * @return {@link ZooKeeperCompletedCheckpointStore} instance * @throws Exception if the completed checkpoint store cannot be created */ public static CompletedCheckpointStore createCompletedCheckpoints( CuratorFramework client, Configuration configuration, JobID jobId, int maxNumberOfCheckpointsToRetain, Executor executor) throws Exception { checkNotNull(configuration, "Configuration"); String checkpointsPath = configuration.getString( HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINTS_PATH); RetrievableStateStorageHelper<CompletedCheckpoint> stateStorage = createFileSystemStateStorage( configuration, "completedCheckpoint"); checkpointsPath += ZooKeeperSubmittedJobGraphStore.getPathForJob(jobId); final ZooKeeperCompletedCheckpointStore zooKeeperCompletedCheckpointStore = new ZooKeeperCompletedCheckpointStore( maxNumberOfCheckpointsToRetain, createZooKeeperStateHandleStore(client, checkpointsPath, stateStorage), executor); LOG.info("Initialized {} in '{}'.", ZooKeeperCompletedCheckpointStore.class.getSimpleName(), checkpointsPath); return zooKeeperCompletedCheckpointStore; }
Example #3
Source File: ZooKeeperUtils.java From flink with Apache License 2.0 | 5 votes |
/** * Creates a {@link ZooKeeperCompletedCheckpointStore} instance. * * @param client The {@link CuratorFramework} ZooKeeper client to use * @param configuration {@link Configuration} object * @param jobId ID of job to create the instance for * @param maxNumberOfCheckpointsToRetain The maximum number of checkpoints to retain * @param executor to run ZooKeeper callbacks * @return {@link ZooKeeperCompletedCheckpointStore} instance * @throws Exception if the completed checkpoint store cannot be created */ public static CompletedCheckpointStore createCompletedCheckpoints( CuratorFramework client, Configuration configuration, JobID jobId, int maxNumberOfCheckpointsToRetain, Executor executor) throws Exception { checkNotNull(configuration, "Configuration"); String checkpointsPath = configuration.getString( HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINTS_PATH); RetrievableStateStorageHelper<CompletedCheckpoint> stateStorage = createFileSystemStateStorage( configuration, HA_STORAGE_COMPLETED_CHECKPOINT); checkpointsPath += ZooKeeperJobGraphStore.getPathForJob(jobId); final ZooKeeperCompletedCheckpointStore zooKeeperCompletedCheckpointStore = new ZooKeeperCompletedCheckpointStore( maxNumberOfCheckpointsToRetain, createZooKeeperStateHandleStore(client, checkpointsPath, stateStorage), executor); LOG.info("Initialized {} in '{}'.", ZooKeeperCompletedCheckpointStore.class.getSimpleName(), checkpointsPath); return zooKeeperCompletedCheckpointStore; }