use of org.apache.curator.test.TestingServer in project flink by apache.
the class ResumeCheckpointManuallyITCase method testExternalizedFSCheckpointsZookeeper.
@Test
public void testExternalizedFSCheckpointsZookeeper() throws Exception {
TestingServer zkServer = new TestingServer();
zkServer.start();
try {
final File checkpointDir = temporaryFolder.newFolder();
testExternalizedCheckpoints(checkpointDir, zkServer.getConnectString(), createFsStateBackend(checkpointDir), false);
} finally {
zkServer.stop();
}
}
use of org.apache.curator.test.TestingServer in project flink by apache.
the class ResumeCheckpointManuallyITCase method testExternalizedFullRocksDBCheckpointsWithLocalRecoveryZookeeper.
@Test
public void testExternalizedFullRocksDBCheckpointsWithLocalRecoveryZookeeper() throws Exception {
TestingServer zkServer = new TestingServer();
zkServer.start();
try {
final File checkpointDir = temporaryFolder.newFolder();
testExternalizedCheckpoints(checkpointDir, zkServer.getConnectString(), createRocksDBStateBackend(checkpointDir, false), true);
} finally {
zkServer.stop();
}
}
use of org.apache.curator.test.TestingServer in project flink by apache.
the class ResumeCheckpointManuallyITCase method testExternalizedIncrementalRocksDBCheckpointsWithLocalRecoveryZookeeper.
@Test
public void testExternalizedIncrementalRocksDBCheckpointsWithLocalRecoveryZookeeper() throws Exception {
TestingServer zkServer = new TestingServer();
zkServer.start();
try {
final File checkpointDir = temporaryFolder.newFolder();
testExternalizedCheckpoints(checkpointDir, zkServer.getConnectString(), createRocksDBStateBackend(checkpointDir, true), true);
} finally {
zkServer.stop();
}
}
use of org.apache.curator.test.TestingServer in project flink by apache.
the class EventTimeWindowCheckpointingITCase method getConfiguration.
private Configuration getConfiguration() throws Exception {
// print a message when starting a test method to avoid Travis' <tt>"Maven produced no
// output for xxx seconds."</tt> messages
System.out.println("Starting " + getClass().getCanonicalName() + "#" + name.getMethodName() + ".");
// Testing HA Scenario / ZKCompletedCheckpointStore with incremental checkpoints
StateBackendEnum stateBackendEnum = getStateBackend();
if (ROCKSDB_INCREMENTAL_ZK.equals(stateBackendEnum)) {
zkServer = new TestingServer();
zkServer.start();
}
Configuration config = createClusterConfig();
config.setInteger(NettyShuffleEnvironmentOptions.NETWORK_BUFFERS_PER_CHANNEL, buffersPerChannel);
switch(stateBackendEnum) {
case MEM:
this.stateBackend = new MemoryStateBackend(MAX_MEM_STATE_SIZE);
break;
case FILE:
{
final File backups = tempFolder.newFolder().getAbsoluteFile();
this.stateBackend = new FsStateBackend(Path.fromLocalFile(backups));
break;
}
case ROCKSDB_FULL:
{
setupRocksDB(config, -1, false);
break;
}
case ROCKSDB_INCREMENTAL:
// Test RocksDB based timer service as well
config.set(RocksDBOptions.TIMER_SERVICE_FACTORY, EmbeddedRocksDBStateBackend.PriorityQueueStateType.ROCKSDB);
setupRocksDB(config, 16, true);
break;
case ROCKSDB_INCREMENTAL_ZK:
{
setupRocksDB(config, 16, true);
break;
}
default:
throw new IllegalStateException("No backend selected.");
}
// Configure DFS DSTL for this test as it might produce too much GC pressure if
// ChangelogStateBackend is used.
// Doing it on cluster level unconditionally as randomization currently happens on the job
// level (environment); while this factory can only be set on the cluster level.
FsStateChangelogStorageFactory.configure(config, tempFolder.newFolder());
return config;
}
use of org.apache.curator.test.TestingServer in project pinpoint by naver.
the class CuratorZookeeperClientTest method setUpClass.
@BeforeClass
public static void setUpClass() throws Exception {
int availablePort = SocketUtils.findAvailableTcpPort();
ts = new TestingServer(availablePort);
eventHoldingZookeeperEventWatcher = new EventHoldingZookeeperEventWatcher();
curatorZookeeperClient = createCuratorZookeeperClient(ts.getConnectString(), eventHoldingZookeeperEventWatcher);
curatorZookeeperClient.createPath(PARENT_PATH);
}
Aggregations