Search in sources :

Example 11 with ZKStoreHelper

use of io.pravega.controller.store.ZKStoreHelper in project pravega by pravega.

the class ZkOrderedStoreTest method setup.

@Before
public void setup() throws Exception {
    zkServer = new TestingServerStarter().start();
    cli = CuratorFrameworkFactory.newClient(zkServer.getConnectString(), 10000, 10000, new RetryNTimes(0, 0));
    cli.start();
    zkStoreHelper = new ZKStoreHelper(cli, executor);
}
Also used : RetryNTimes(org.apache.curator.retry.RetryNTimes) ZKStoreHelper(io.pravega.controller.store.ZKStoreHelper) TestingServerStarter(io.pravega.test.common.TestingServerStarter) Before(org.junit.Before)

Example 12 with ZKStoreHelper

use of io.pravega.controller.store.ZKStoreHelper in project pravega by pravega.

the class ZooKeeperStreamTest method setup.

@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, executor, Duration.ofSeconds(1));
}
Also used : ZKStoreHelper(io.pravega.controller.store.ZKStoreHelper) RetryOneTime(org.apache.curator.retry.RetryOneTime) TestingServerStarter(io.pravega.test.common.TestingServerStarter)

Aggregations

ZKStoreHelper (io.pravega.controller.store.ZKStoreHelper)12 Test (org.junit.Test)9 StreamConfiguration (io.pravega.client.stream.StreamConfiguration)3 TestingServerStarter (io.pravega.test.common.TestingServerStarter)3 ScalingPolicy (io.pravega.client.stream.ScalingPolicy)2 Int96 (io.pravega.common.lang.Int96)2 TestOperationContext (io.pravega.controller.store.TestOperationContext)2 UUID (java.util.UUID)2 CompletableFuture (java.util.concurrent.CompletableFuture)2 RetryOneTime (org.apache.curator.retry.RetryOneTime)2 Before (org.junit.Before)2 ExecutorServiceHelpers (io.pravega.common.concurrent.ExecutorServiceHelpers)1 Futures (io.pravega.common.concurrent.Futures)1 SegmentHelper (io.pravega.controller.server.SegmentHelper)1 GrpcAuthHelper (io.pravega.controller.server.security.auth.GrpcAuthHelper)1 PravegaTablesStoreHelper (io.pravega.controller.store.PravegaTablesStoreHelper)1 VersionedMetadata (io.pravega.controller.store.VersionedMetadata)1 ActiveTxnRecord (io.pravega.controller.store.stream.records.ActiveTxnRecord)1 Duration (java.time.Duration)1 Arrays (java.util.Arrays)1