b.startZk(false); try { int bkBasePort = Integer.parseInt(System.getProperty(PROPERTY_BASE_PORT)); b.bookiePorts(bkPorts); b.zkPort(Integer.parseInt(System.getProperty(PROPERTY_ZK_PORT))); b.ledgersPath(System.getProperty(PROPERTY_LEDGERS_PATH)); b.startZk(Boolean.parseBoolean(System.getProperty(PROPERTY_START_ZK, "false"))); b.tLSKeyStore(System.getProperty(TLS_KEY_STORE, "../../../config/bookie.keystore.jks")); b.tLSKeyStorePasswordPath(System.getProperty(TLS_KEY_STORE_PASSWD, "../../../config/bookie.keystore.jks.passwd")); b.secureBK(Boolean.parseBoolean(System.getProperty(PROPERTY_SECURE_BK, "false"))); BookKeeperServiceRunner runner = b.build(); runner.startAll(); Thread.sleep(Long.MAX_VALUE);
.startZk(true) .zkPort(zkPort) .secureBK(false) .ledgersPath("/ledgers") .bookiePorts(bookiePorts) .build(); this.bkRunner.startAll();
/** * Start BookKeeper once for the duration of this class. This is pretty strenuous, so in the interest of running time * we only do it once. */ public static void setUpBookKeeper(boolean secure) throws Exception { // Pick a random port to reduce chances of collisions during concurrent test executions. SECURE_BK.set(secure); BK_PORT.set(TestUtils.getAvailableListenPort()); val bookiePorts = new ArrayList<Integer>(); for (int i = 0; i < BOOKIE_COUNT; i++) { bookiePorts.add(TestUtils.getAvailableListenPort()); } val runner = BookKeeperServiceRunner.builder() .startZk(true) .zkPort(BK_PORT.get()) .ledgersPath("/pravega/bookkeeper/ledgers") .secureBK(isSecure()) .secureZK(isSecure()) .tlsTrustStore("../../../config/bookie.truststore.jks") .tLSKeyStore("../../../config/bookie.keystore.jks") .tLSKeyStorePasswordPath("../../../config/bookie.keystore.jks.passwd") .bookiePorts(bookiePorts) .build(); runner.startAll(); BK_SERVICE.set(runner); }