Java Code Examples for org.apache.flink.runtime.util.ZooKeeperUtils#createZooKeeperStateHandleStore()

The following examples show how to use org.apache.flink.runtime.util.ZooKeeperUtils#createZooKeeperStateHandleStore() . 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: ZooKeeperCompletedCheckpointStoreTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Nonnull
private ZooKeeperCompletedCheckpointStore createZooKeeperCheckpointStore(CuratorFramework client) throws Exception {
	final ZooKeeperStateHandleStore<CompletedCheckpoint> checkpointsInZooKeeper = ZooKeeperUtils.createZooKeeperStateHandleStore(
		client,
		"/checkpoints",
		new TestingRetrievableStateStorageHelper<>());

	return new ZooKeeperCompletedCheckpointStore(
		1,
		checkpointsInZooKeeper,
		Executors.directExecutor());
}
 
Example 2
Source File: ZooKeeperCompletedCheckpointStoreITCase.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
protected ZooKeeperCompletedCheckpointStore createCompletedCheckpoints(int maxNumberOfCheckpointsToRetain) throws Exception {
	final ZooKeeperStateHandleStore<CompletedCheckpoint> checkpointsInZooKeeper = ZooKeeperUtils.createZooKeeperStateHandleStore(
		ZOOKEEPER.getClient(),
		CHECKPOINT_PATH,
		new TestingRetrievableStateStorageHelper<>());

	return new ZooKeeperCompletedCheckpointStore(
		maxNumberOfCheckpointsToRetain,
		checkpointsInZooKeeper,
		Executors.directExecutor());
}
 
Example 3
Source File: ZooKeeperCompletedCheckpointStoreTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Nonnull
private ZooKeeperCompletedCheckpointStore createZooKeeperCheckpointStore(CuratorFramework client) throws Exception {
	final ZooKeeperStateHandleStore<CompletedCheckpoint> checkpointsInZooKeeper = ZooKeeperUtils.createZooKeeperStateHandleStore(
		client,
		"/checkpoints",
		new TestingRetrievableStateStorageHelper<>());

	return new ZooKeeperCompletedCheckpointStore(
		1,
		checkpointsInZooKeeper,
		Executors.directExecutor());
}
 
Example 4
Source File: ZooKeeperCompletedCheckpointStoreITCase.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
protected ZooKeeperCompletedCheckpointStore createCompletedCheckpoints(int maxNumberOfCheckpointsToRetain) throws Exception {
	final ZooKeeperStateHandleStore<CompletedCheckpoint> checkpointsInZooKeeper = ZooKeeperUtils.createZooKeeperStateHandleStore(
		ZOOKEEPER.getClient(),
		CHECKPOINT_PATH,
		new TestingRetrievableStateStorageHelper<>());

	return new ZooKeeperCompletedCheckpointStore(
		maxNumberOfCheckpointsToRetain,
		checkpointsInZooKeeper,
		Executors.directExecutor());
}
 
Example 5
Source File: ZooKeeperCompletedCheckpointStoreTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Nonnull
private ZooKeeperCompletedCheckpointStore createZooKeeperCheckpointStore(CuratorFramework client) throws Exception {
	final ZooKeeperStateHandleStore<CompletedCheckpoint> checkpointsInZooKeeper = ZooKeeperUtils.createZooKeeperStateHandleStore(
		client,
		"/checkpoints",
		new TestingRetrievableStateStorageHelper<>());

	return new ZooKeeperCompletedCheckpointStore(
		1,
		checkpointsInZooKeeper,
		Executors.directExecutor());
}
 
Example 6
Source File: ZooKeeperCompletedCheckpointStoreITCase.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
protected ZooKeeperCompletedCheckpointStore createCompletedCheckpoints(int maxNumberOfCheckpointsToRetain) throws Exception {
	final ZooKeeperStateHandleStore<CompletedCheckpoint> checkpointsInZooKeeper = ZooKeeperUtils.createZooKeeperStateHandleStore(
		ZOOKEEPER.getClient(),
		CHECKPOINT_PATH,
		new TestingRetrievableStateStorageHelper<>());

	return new ZooKeeperCompletedCheckpointStore(
		maxNumberOfCheckpointsToRetain,
		checkpointsInZooKeeper,
		Executors.directExecutor());
}
 
Example 7
Source File: ZooKeeperUtilityFactory.java    From Flink-CEPplus with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a {@link ZooKeeperStateHandleStore} instance with the provided arguments.
 *
 * @param zkStateHandleStorePath specifying the path in ZooKeeper to store the state handles to
 * @param stateStorageHelper storing the actual state data
 * @param <T> Type of the state to be stored
 * @return a ZooKeeperStateHandleStore instance
 * @throws Exception if ZooKeeper could not create the provided state handle store path in
 *     ZooKeeper
 */
public <T extends Serializable> ZooKeeperStateHandleStore<T> createZooKeeperStateHandleStore(
		String zkStateHandleStorePath,
		RetrievableStateStorageHelper<T> stateStorageHelper) throws Exception {

	return ZooKeeperUtils.createZooKeeperStateHandleStore(
		facade,
		zkStateHandleStorePath,
		stateStorageHelper);
}
 
Example 8
Source File: ZooKeeperUtilityFactory.java    From flink with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a {@link ZooKeeperStateHandleStore} instance with the provided arguments.
 *
 * @param zkStateHandleStorePath specifying the path in ZooKeeper to store the state handles to
 * @param stateStorageHelper storing the actual state data
 * @param <T> Type of the state to be stored
 * @return a ZooKeeperStateHandleStore instance
 * @throws Exception if ZooKeeper could not create the provided state handle store path in
 *     ZooKeeper
 */
public <T extends Serializable> ZooKeeperStateHandleStore<T> createZooKeeperStateHandleStore(
		String zkStateHandleStorePath,
		RetrievableStateStorageHelper<T> stateStorageHelper) throws Exception {

	return ZooKeeperUtils.createZooKeeperStateHandleStore(
		facade,
		zkStateHandleStorePath,
		stateStorageHelper);
}
 
Example 9
Source File: ZooKeeperUtilityFactory.java    From flink with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a {@link ZooKeeperStateHandleStore} instance with the provided arguments.
 *
 * @param zkStateHandleStorePath specifying the path in ZooKeeper to store the state handles to
 * @param stateStorageHelper storing the actual state data
 * @param <T> Type of the state to be stored
 * @return a ZooKeeperStateHandleStore instance
 * @throws Exception if ZooKeeper could not create the provided state handle store path in
 *     ZooKeeper
 */
public <T extends Serializable> ZooKeeperStateHandleStore<T> createZooKeeperStateHandleStore(
		String zkStateHandleStorePath,
		RetrievableStateStorageHelper<T> stateStorageHelper) throws Exception {

	return ZooKeeperUtils.createZooKeeperStateHandleStore(
		facade,
		zkStateHandleStorePath,
		stateStorageHelper);
}