public void startCluster() throws Exception { this.testingZKServer.start(); createHelixCluster(); startWorker(); startTaskDriver(); startManager(); }
@Test public void testExternalizedFSCheckpointsWithLocalRecoveryZookeeper() throws Exception { TestingServer zkServer = new TestingServer(); zkServer.start(); try { final File checkpointDir = temporaryFolder.newFolder(); testExternalizedCheckpoints( checkpointDir, zkServer.getConnectString(), createFsStateBackend(checkpointDir), true); } finally { zkServer.stop(); } }
@Test public void testExternalizedIncrementalRocksDBCheckpointsZookeeper() throws Exception { TestingServer zkServer = new TestingServer(); zkServer.start(); try { final File checkpointDir = temporaryFolder.newFolder(); testExternalizedCheckpoints( checkpointDir, zkServer.getConnectString(), createRocksDBStateBackend(checkpointDir, true), false); } finally { zkServer.stop(); } }
@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(); } }
@Test public void testExternalizedFullRocksDBCheckpointsZookeeper() throws Exception { TestingServer zkServer = new TestingServer(); zkServer.start(); try { final File checkpointDir = temporaryFolder.newFolder(); testExternalizedCheckpoints( checkpointDir, zkServer.getConnectString(), createRocksDBStateBackend(checkpointDir, false), false); } finally { zkServer.stop(); } }
@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(); } }
@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(); } }
if (ROCKSDB_INCREMENTAL_ZK.equals(stateBackendEnum)) { zkServer = new TestingServer(); zkServer.start();
/** * Basic setup: start a ZK and verify that the initial endpoint list is empty. * Also validates the basics of the test setup (mock server, etc.) * * @throws Exception */ @Test public void testBasics() throws Exception { try (TestingServer server = new TestingServer()) { server.start(); String connStr = server.getConnectString(); ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver() .setConnect(connStr, "drill", "drillbits").build(); assertTrue(driver.getInitialEndpoints().isEmpty()); driver.close(); server.stop(); } }
public void testCycle() throws Exception { TestingServer server = new TestingServer(); server.start(); String connStr = server.getConnectString();
@Test public void testZKRegistry() throws Exception { TestingServer server = new TestingServer(); server.start(); String connStr = server.getConnectString();
@Test public void testAMRegistry() throws Exception { try (TestingServer server = new TestingServer()) { server.start(); String connStr = server.getConnectString(); ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver()
/** Create a testing ZooKeeper server: record in {@link ZkT#servers}. */ public static TestingServer localServer() { try { TestingServer server = new TestingServer(); servers.add(server); server.start(); return server ; } catch (Exception ex) { throw new RuntimeException(ex); } }
@Before public void before() { try { server = new TestingServer(); server.start(); } catch (Exception ex) { ex.printStackTrace(); throw new RuntimeException(ex); } }
@Before public void initialize() throws Exception { testingServer = new TestingServer(); testingServer.start(); incrSequenceZKHandler = new IncrSequenceZKHandler[MAX_CONNECTION]; results = new ConcurrentSkipListSet(); }
@BeforeClass public static void startZookeeper() throws Exception { server = new TestingServer(DEFAULT_PORT); server.start(); }
@BeforeClass public static void startZookeeper() throws Exception { server = new TestingServer(DEFAULT_PORT); server.start(); }
@Before public void setup() throws Exception { zkServer = new TestingServerStarter().start(); zkServer.start(); int sessionTimeout = 8000; int connectionTimeout = 5000; cli = CuratorFrameworkFactory.newClient(zkServer.getConnectString(), sessionTimeout, connectionTimeout, new RetryOneTime(2000)); cli.start(); executor = Executors.newScheduledThreadPool(2); }
@Override public void setup() throws Exception { zkServer = new TestingServerStarter().start(); zkServer.start(); int sessionTimeout = 8000; int connectionTimeout = 5000; cli = CuratorFrameworkFactory.newClient(zkServer.getConnectString(), sessionTimeout, connectionTimeout, new RetryOneTime(2000)); cli.start(); storeHelper = new ZKStoreHelper(cli, executor); store = new ZKStreamMetadataStore(cli, 1, executor, Duration.ofSeconds(1)); }
@BeforeClass public static void startZK() throws Exception { zkServer = new TestingServer(); zkServer.start(); conf.setProperty(LockManagerConfiguration.IS_ENABLED, "true"); conf.setProperty(LockManagerConfiguration.ZK_BASE_PATH, "/////test/////lock_manager////"); conf.setProperty(ZookeeperConfiguration.ZK_QUORUM, zkServer.getConnectString()); conf.setProperty(ZookeeperConfiguration.ZK_PORT, Integer.toString(zkServer.getPort())); conf.setProperty(LockManagerConfiguration.ACQUIRE_LOCK_TIME_MS, Integer.toString(10 * 1000)); conf.setProperty(LockManagerConfiguration.ZK_SESSION_TIMEOUT_MS, Integer.toString(30 * 1000)); conf.setProperty(LockManagerConfiguration.ZK_CONNECTION_TIMEOUT_MS, Integer.toString(12 * 1000)); }