Search in sources :

Example 16 with BookKeeperLogFactory

use of io.pravega.segmentstore.storage.impl.bookkeeper.BookKeeperLogFactory in project pravega by pravega.

the class BookKeeperAdapter method startUp.

@Override
protected void startUp() throws Exception {
    // Start BookKeeper.
    this.bookKeeperService = BookKeeperAdapter.startBookKeeperOutOfProcess(this.testConfig, this.logId);
    // Create a ZK client.
    this.zkClient = CuratorFrameworkFactory.builder().connectString("localhost:" + this.testConfig.getZkPort()).namespace("pravega").retryPolicy(new ExponentialBackoffRetry(1000, 5)).sessionTimeoutMs(5000).connectionTimeoutMs(5000).build();
    this.zkClient.start();
    // Create a BK client.
    this.logFactory = new BookKeeperLogFactory(this.bkConfig, this.zkClient, this.executor);
    this.logFactory.initialize();
}
Also used : ExponentialBackoffRetry(org.apache.curator.retry.ExponentialBackoffRetry) BookKeeperLogFactory(io.pravega.segmentstore.storage.impl.bookkeeper.BookKeeperLogFactory)

Aggregations

BookKeeperLogFactory (io.pravega.segmentstore.storage.impl.bookkeeper.BookKeeperLogFactory)16 lombok.val (lombok.val)11 BookKeeperConfig (io.pravega.segmentstore.storage.impl.bookkeeper.BookKeeperConfig)9 Cleanup (lombok.Cleanup)8 AdminCommandState (io.pravega.cli.admin.AdminCommandState)5 TestUtils (io.pravega.cli.admin.utils.TestUtils)5 DurableDataLogException (io.pravega.segmentstore.storage.DurableDataLogException)5 Properties (java.util.Properties)5 Test (org.junit.Test)5 SegmentProperties (io.pravega.segmentstore.contracts.SegmentProperties)4 BookKeeperAdmin (org.apache.bookkeeper.client.BookKeeperAdmin)4 CommandArgs (io.pravega.cli.admin.CommandArgs)3 ServiceBuilder (io.pravega.segmentstore.server.store.ServiceBuilder)3 DurableDataLog (io.pravega.segmentstore.storage.DurableDataLog)3 ContainerConfig (io.pravega.segmentstore.server.containers.ContainerConfig)2 DebugDurableDataLogWrapper (io.pravega.segmentstore.storage.DebugDurableDataLogWrapper)2 Storage (io.pravega.segmentstore.storage.Storage)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 IOException (java.io.IOException)2 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)2