Search in sources :

Example 6 with StreamProperties

use of org.apache.bookkeeper.stream.proto.StreamProperties in project bookkeeper by apache.

the class StorageClientTest method testAdmin.

@Test
public void testAdmin() throws Exception {
    StreamProperties properties = FutureUtils.result(adminClient.getStream(nsName, streamName));
    assertEquals(StreamConfiguration.newBuilder(streamConf).setBackendServiceUrl(defaultBackendUri.toString()).build(), properties.getStreamConf());
}
Also used : StreamProperties(org.apache.bookkeeper.stream.proto.StreamProperties) Test(org.junit.Test)

Example 7 with StreamProperties

use of org.apache.bookkeeper.stream.proto.StreamProperties in project bookkeeper by apache.

the class TestStorageServerClientManagerImpl method testGetMetaRangeClientByStreamId.

@Test
public void testGetMetaRangeClientByStreamId() throws Exception {
    long streamId = 3456L;
    StreamProperties props = StreamProperties.newBuilder().setStorageContainerId(1234L).setStreamId(streamId).setStreamName("metaclient-stream").setStreamConf(StreamConfiguration.newBuilder().build()).build();
    RootRangeServiceImplBase rootRangeService = new RootRangeServiceImplBase() {

        @Override
        public void getStream(GetStreamRequest request, StreamObserver<GetStreamResponse> responseObserver) {
            responseObserver.onNext(GetStreamResponse.newBuilder().setCode(StatusCode.SUCCESS).setStreamProps(props).build());
            responseObserver.onCompleted();
        }
    };
    serviceRegistry.addService(rootRangeService.bindService());
    // the stream properties will be cached here
    assertEquals(props, FutureUtils.result(serverManager.getStreamProperties(streamId)));
    // the metadata range client is cached as well
    MetaRangeClient client = FutureUtils.result(serverManager.openMetaRangeClient(streamId));
    assertEquals(props, client.getStreamProps());
}
Also used : StreamObserver(io.grpc.stub.StreamObserver) MetaRangeClient(org.apache.bookkeeper.clients.impl.internal.api.MetaRangeClient) StreamProperties(org.apache.bookkeeper.stream.proto.StreamProperties) GetStreamRequest(org.apache.bookkeeper.stream.proto.storage.GetStreamRequest) RootRangeServiceImplBase(org.apache.bookkeeper.stream.proto.storage.RootRangeServiceGrpc.RootRangeServiceImplBase) Test(org.junit.Test)

Example 8 with StreamProperties

use of org.apache.bookkeeper.stream.proto.StreamProperties in project bookkeeper by apache.

the class MetaRangeImpl method unsafeCreate.

private void unsafeCreate(CompletableFuture<Boolean> createFuture, StreamProperties streamProps) {
    // 1. verify the state
    checkLifecycleState(LifecycleState.UNINIT);
    this.lifecycleState = LifecycleState.CREATING;
    // 2. store the props/configuration
    synchronized (this) {
        this.streamProps = streamProps;
    }
    this.streamId = streamProps.getStreamId();
    this.cTime = this.mTime = System.currentTimeMillis();
    // 3. create the ranges
    List<RangeProperties> propertiesList = split(streamId, streamProps.getStreamConf().getInitialNumRanges(), nextRangeId, placementPolicy);
    List<Op<byte[], byte[]>> successOps = Lists.newArrayListWithExpectedSize(propertiesList.size() + 1);
    for (RangeProperties props : propertiesList) {
        RangeMetadata meta = RangeMetadata.newBuilder().setProps(props).setCreateTime(cTime).setFenceTime(Long.MAX_VALUE).setState(RangeState.RANGE_ACTIVE).addAllParents(Lists.newArrayList()).build();
        ranges.put(props.getRangeId(), meta);
        currentRanges.add(props.getRangeId());
        successOps.add(store.newPut(getStreamRangeKey(streamId, props.getRangeId()), meta.toByteArray()));
    }
    nextRangeId += propertiesList.size();
    // serialize the stream metadata
    byte[] streamMetadataKey = getStreamMetadataKey(streamId);
    successOps.add(store.newPut(streamMetadataKey, toStreamMetadata(LifecycleState.CREATED).toByteArray()));
    TxnOp<byte[], byte[]> txn = store.newTxn().If(store.newCompareValue(CompareResult.EQUAL, streamMetadataKey, null)).Then(successOps.toArray(new Op[successOps.size()])).build();
    if (log.isTraceEnabled()) {
        log.trace("Execute create stream metadata range txn {}", streamProps);
    }
    store.txn(txn).thenApplyAsync(txnResult -> {
        try {
            if (log.isTraceEnabled()) {
                log.trace("Create stream metadata range txn result = {}", txnResult.isSuccess());
            }
            if (txnResult.isSuccess()) {
                List<Result<byte[], byte[]>> results = txnResult.results();
                MetaRangeImpl.this.revision = results.get(results.size() - 1).revision();
                // mark the state to CREATED
                this.lifecycleState = LifecycleState.CREATED;
                createFuture.complete(true);
            } else {
                createFuture.complete(false);
            }
            return null;
        } finally {
            txnResult.close();
        }
    }, executor).exceptionally(cause -> {
        createFuture.completeExceptionally(cause);
        return null;
    });
}
Also used : RangeMetadata(org.apache.bookkeeper.stream.proto.RangeMetadata) RangeState(org.apache.bookkeeper.stream.proto.RangeState) CompletableFuture(java.util.concurrent.CompletableFuture) Supplier(java.util.function.Supplier) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) ProtoUtils.split(org.apache.bookkeeper.stream.protocol.util.ProtoUtils.split) MVCCAsyncStore(org.apache.bookkeeper.statelib.api.mvcc.MVCCAsyncStore) StreamMetadata(org.apache.bookkeeper.stream.proto.StreamMetadata) Lists(com.google.common.collect.Lists) TxnOp(org.apache.bookkeeper.api.kv.op.TxnOp) MetaRange(org.apache.bookkeeper.stream.storage.api.metadata.stream.MetaRange) ImmutableList(com.google.common.collect.ImmutableList) ProtoUtils.isStreamCreated(org.apache.bookkeeper.stream.protocol.util.ProtoUtils.isStreamCreated) RangeProperties(org.apache.bookkeeper.stream.proto.RangeProperties) LifecycleState(org.apache.bookkeeper.stream.proto.StreamMetadata.LifecycleState) KeyValue(org.apache.bookkeeper.api.kv.result.KeyValue) ExecutorService(java.util.concurrent.ExecutorService) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) StorageContainerPlacementPolicy(org.apache.bookkeeper.stream.protocol.util.StorageContainerPlacementPolicy) MIN_DATA_RANGE_ID(org.apache.bookkeeper.stream.protocol.ProtocolConstants.MIN_DATA_RANGE_ID) DataRangeNotFoundException(org.apache.bookkeeper.stream.storage.exceptions.DataRangeNotFoundException) ServingState(org.apache.bookkeeper.stream.proto.StreamMetadata.ServingState) Result(org.apache.bookkeeper.api.kv.result.Result) StreamConfiguration(org.apache.bookkeeper.stream.proto.StreamConfiguration) Bytes(org.apache.bookkeeper.common.util.Bytes) NavigableMap(java.util.NavigableMap) GuardedBy(javax.annotation.concurrent.GuardedBy) FutureUtils(org.apache.bookkeeper.common.concurrent.FutureUtils) Maps(com.google.common.collect.Maps) Preconditions.checkState(com.google.common.base.Preconditions.checkState) Consumer(java.util.function.Consumer) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) StreamProperties(org.apache.bookkeeper.stream.proto.StreamProperties) VisibleForTesting(com.google.common.annotations.VisibleForTesting) CompareResult(org.apache.bookkeeper.api.kv.op.CompareResult) Op(org.apache.bookkeeper.api.kv.op.Op) RangeProperties(org.apache.bookkeeper.stream.proto.RangeProperties) TxnOp(org.apache.bookkeeper.api.kv.op.TxnOp) Op(org.apache.bookkeeper.api.kv.op.Op) ImmutableList(com.google.common.collect.ImmutableList) List(java.util.List) RangeMetadata(org.apache.bookkeeper.stream.proto.RangeMetadata)

Example 9 with StreamProperties

use of org.apache.bookkeeper.stream.proto.StreamProperties in project bookkeeper by apache.

the class TableClientSimpleTest method testTableSimpleAPI.

@Test
public void testTableSimpleAPI() throws Exception {
    // Create a namespace
    NamespaceConfiguration nsConf = NamespaceConfiguration.newBuilder().setDefaultStreamConf(DEFAULT_STREAM_CONF).build();
    NamespaceProperties nsProps = result(adminClient.createNamespace(namespace, nsConf));
    assertEquals(namespace, nsProps.getNamespaceName());
    assertEquals(nsConf.getDefaultStreamConf(), nsProps.getDefaultStreamConf());
    // Create a stream
    String streamName = testName.getMethodName() + "_stream";
    StreamConfiguration streamConf = StreamConfiguration.newBuilder(DEFAULT_STREAM_CONF).build();
    StreamProperties streamProps = result(adminClient.createStream(namespace, streamName, streamConf));
    assertEquals(streamName, streamProps.getStreamName());
    assertEquals(StreamConfiguration.newBuilder(streamConf).setBackendServiceUrl(defaultBackendUri.toString()).build(), streamProps.getStreamConf());
    // Open the table
    PTable<ByteBuf, ByteBuf> table = result(storageClient.openPTable(streamName));
    byte[] rKey = "routing-key".getBytes(UTF_8);
    byte[] lKey = "testing-key".getBytes(UTF_8);
    byte[] value1 = "testing-value-1".getBytes(UTF_8);
    byte[] value2 = "testing-value-2".getBytes(UTF_8);
    // put first key
    ByteBuf rKeyBuf = Unpooled.wrappedBuffer(rKey);
    ByteBuf lKeyBuf = Unpooled.wrappedBuffer(lKey);
    ByteBuf valBuf1 = Unpooled.wrappedBuffer(value1);
    ByteBuf valBuf2 = Unpooled.wrappedBuffer(value2);
    // normal put
    assertNull(result(table.put(rKeyBuf, lKeyBuf, valBuf1)));
    // putIfAbsent failure
    assertArrayEquals(value1, ByteBufUtil.getBytes(result(table.putIfAbsent(rKeyBuf, lKeyBuf, valBuf2))));
    // delete failure
    assertFalse(result(table.delete(rKeyBuf, lKeyBuf, valBuf2)));
    // delete success
    assertTrue(result(table.delete(rKeyBuf, lKeyBuf, valBuf1)));
    // get
    assertNull(result(table.get(rKeyBuf, lKeyBuf)));
    // putIfAbsent success
    assertNull(result(table.putIfAbsent(rKeyBuf, lKeyBuf, valBuf2)));
    // get returns val2
    assertArrayEquals(value2, ByteBufUtil.getBytes(result(table.get(rKeyBuf, lKeyBuf))));
    // vPut failure
    try {
        result(table.vPut(rKeyBuf, lKeyBuf, valBuf1, 9999L));
        fail("Should fail vPut if the version doesn't match");
    } catch (KvApiException e) {
        assertEquals(Code.BAD_REVISION, e.getCode());
    }
    // vPut success
    assertEquals(1L, result(table.vPut(rKeyBuf, lKeyBuf, valBuf1, 0L)).longValue());
    // vDelete failure
    try {
        result(table.vDelete(rKeyBuf, lKeyBuf, 9999L));
        fail("Should fail vDelete if the version doesn't match");
    } catch (KvApiException e) {
        assertEquals(Code.BAD_REVISION, e.getCode());
    }
    // vDelete success
    try (KeyValue<ByteBuf, ByteBuf> prevKv = result(table.vDelete(rKeyBuf, lKeyBuf, 1L))) {
        assertNotNull(prevKv);
        assertEquals(1L, prevKv.version());
        assertArrayEquals(value1, ByteBufUtil.getBytes(prevKv.value()));
    }
    // write a range of key
    int numKvs = 100;
    rKeyBuf = Unpooled.wrappedBuffer("test-key".getBytes(UTF_8));
    for (int i = 0; i < numKvs; i++) {
        lKeyBuf = getLKey(i);
        valBuf1 = getValue(i);
        result(table.put(rKeyBuf, lKeyBuf, valBuf1));
    }
    // get ranges
    ByteBuf lStartKey = getLKey(20);
    ByteBuf lEndKey = getLKey(50);
    List<KeyValue<ByteBuf, ByteBuf>> kvs = result(table.range(rKeyBuf, lStartKey, lEndKey));
    assertEquals(31, kvs.size());
    int i = 20;
    for (KeyValue<ByteBuf, ByteBuf> kvPair : kvs) {
        assertEquals(getLKey(i), kvPair.key());
        assertEquals(getValue(i), kvPair.value());
        ++i;
        kvPair.close();
    }
    assertEquals(51, i);
    // delete range
    kvs = result(table.deleteRange(rKeyBuf, lStartKey, lEndKey));
    assertEquals(31, kvs.size());
    i = 20;
    for (KeyValue<ByteBuf, ByteBuf> kvPair : kvs) {
        assertEquals(getLKey(i), kvPair.key());
        assertEquals(getValue(i), kvPair.value());
        ++i;
        kvPair.close();
    }
    assertEquals(51, i);
    // get ranges again
    kvs = result(table.range(rKeyBuf, lStartKey, lEndKey));
    assertTrue(kvs.isEmpty());
    byte[] lIncrKey = "test-incr-lkey".getBytes(UTF_8);
    ByteBuf lIncrKeyBuf = Unpooled.wrappedBuffer(lIncrKey);
    // test increment
    for (int j = 0; j < 5; j++) {
        result(table.increment(rKeyBuf, lIncrKeyBuf, 100L));
        long number = result(table.getNumber(rKeyBuf, lIncrKeyBuf));
        assertEquals(100L * (j + 1), number);
    }
    for (int j = 5; j < 10; j++) {
        long number = result(table.incrementAndGet(rKeyBuf, lIncrKeyBuf, 100L));
        assertEquals(100L * (j + 1), number);
    }
}
Also used : KeyValue(org.apache.bookkeeper.api.kv.result.KeyValue) StreamProperties(org.apache.bookkeeper.stream.proto.StreamProperties) KvApiException(org.apache.bookkeeper.api.kv.exceptions.KvApiException) ByteBuf(io.netty.buffer.ByteBuf) Endpoint(org.apache.bookkeeper.stream.proto.common.Endpoint) NamespaceProperties(org.apache.bookkeeper.stream.proto.NamespaceProperties) StreamConfiguration(org.apache.bookkeeper.stream.proto.StreamConfiguration) NamespaceConfiguration(org.apache.bookkeeper.stream.proto.NamespaceConfiguration) Test(org.junit.Test)

Example 10 with StreamProperties

use of org.apache.bookkeeper.stream.proto.StreamProperties in project bookkeeper by apache.

the class TableClientTest method testTableAPI.

@Test
public void testTableAPI() throws Exception {
    // Create a namespace
    NamespaceConfiguration nsConf = NamespaceConfiguration.newBuilder().setDefaultStreamConf(DEFAULT_STREAM_CONF).build();
    NamespaceProperties nsProps = FutureUtils.result(adminClient.createNamespace(namespace, nsConf));
    assertEquals(namespace, nsProps.getNamespaceName());
    assertEquals(nsConf.getDefaultStreamConf(), nsProps.getDefaultStreamConf());
    // Create a stream
    String streamName = testName.getMethodName() + "_stream";
    StreamConfiguration streamConf = StreamConfiguration.newBuilder(DEFAULT_STREAM_CONF).build();
    StreamProperties streamProps = FutureUtils.result(adminClient.createStream(namespace, streamName, streamConf));
    assertEquals(streamName, streamProps.getStreamName());
    assertEquals(StreamConfiguration.newBuilder(streamConf).setBackendServiceUrl(defaultBackendUri.toString()).build(), streamProps.getStreamConf());
    // Open the table
    PTable<ByteBuf, ByteBuf> table = FutureUtils.result(storageClient.openPTable(streamName));
    byte[] rKey = "routing-key".getBytes(UTF_8);
    byte[] lKey = "testing-key".getBytes(UTF_8);
    byte[] value = "testing-value".getBytes(UTF_8);
    // put first key
    ByteBuf rKeyBuf = Unpooled.wrappedBuffer(rKey);
    ByteBuf lKeyBuf = Unpooled.wrappedBuffer(lKey);
    ByteBuf valBuf = Unpooled.wrappedBuffer(value);
    try (PutOption<ByteBuf> option = Options.putAndGet()) {
        try (PutResult<ByteBuf, ByteBuf> putResult = FutureUtils.result(table.put(rKeyBuf, lKeyBuf, valBuf, option))) {
            assertNull(putResult.prevKv());
        }
    }
    // put second key
    ByteBuf valBuf2 = Unpooled.wrappedBuffer("testing-value-2".getBytes(UTF_8));
    try (PutOption<ByteBuf> option = Options.putAndGet()) {
        try (PutResult<ByteBuf, ByteBuf> putResult = FutureUtils.result(table.put(rKeyBuf, lKeyBuf, valBuf2, option))) {
            assertNotNull(putResult.prevKv());
            KeyValue<ByteBuf, ByteBuf> prevKv = putResult.prevKv();
            assertEquals("testing-key", new String(ByteBufUtil.getBytes(prevKv.key()), UTF_8));
            assertEquals("testing-value", new String(ByteBufUtil.getBytes(prevKv.value()), UTF_8));
        }
    }
    // get key
    try (RangeOption<ByteBuf> option = optionFactory.newRangeOption().build()) {
        try (RangeResult<ByteBuf, ByteBuf> getResult = FutureUtils.result(table.get(rKeyBuf, lKeyBuf, option))) {
            assertEquals(1, getResult.count());
            assertEquals(1, getResult.kvs().size());
            KeyValue<ByteBuf, ByteBuf> kv = getResult.kvs().get(0);
            assertEquals("testing-key", new String(ByteBufUtil.getBytes(kv.key()), UTF_8));
            assertEquals("testing-value-2", new String(ByteBufUtil.getBytes(kv.value()), UTF_8));
        }
    }
    // delete key
    try (DeleteOption<ByteBuf> option = optionFactory.newDeleteOption().prevKv(true).build()) {
        try (DeleteResult<ByteBuf, ByteBuf> deleteResult = FutureUtils.result(table.delete(rKeyBuf, lKeyBuf, option))) {
            assertEquals(1, deleteResult.numDeleted());
            assertEquals(1, deleteResult.prevKvs().size());
            KeyValue<ByteBuf, ByteBuf> kv = deleteResult.prevKvs().get(0);
            assertEquals("testing-key", new String(ByteBufUtil.getBytes(kv.key()), UTF_8));
            assertEquals("testing-value-2", new String(ByteBufUtil.getBytes(kv.value()), UTF_8));
        }
    }
    // write a range of key
    int numKvs = 100;
    rKeyBuf = Unpooled.wrappedBuffer("test-key".getBytes(UTF_8));
    try (PutOption<ByteBuf> option = Options.blindPut()) {
        for (int i = 0; i < numKvs; i++) {
            lKeyBuf = getLKey(i);
            valBuf = getValue(i);
            FutureUtils.result(table.put(rKeyBuf, lKeyBuf, valBuf, option));
        }
    }
    // get ranges
    ByteBuf lStartKey = getLKey(20);
    ByteBuf lEndKey = getLKey(50);
    try (RangeOption<ByteBuf> option = optionFactory.newRangeOption().endKey(lEndKey).build()) {
        try (RangeResult<ByteBuf, ByteBuf> rangeResult = FutureUtils.result(table.get(rKeyBuf, lStartKey, option))) {
            assertEquals(31, rangeResult.kvs().size());
            assertEquals(31, rangeResult.count());
            int i = 20;
            for (KeyValue<ByteBuf, ByteBuf> kvPair : rangeResult.kvs()) {
                assertEquals(getLKey(i), kvPair.key());
                assertEquals(getValue(i), kvPair.value());
                ++i;
            }
            assertEquals(51, i);
        }
    }
    // delete range
    try (DeleteOption<ByteBuf> option = optionFactory.newDeleteOption().prevKv(true).endKey(lEndKey).build()) {
        try (DeleteResult<ByteBuf, ByteBuf> deleteRangeResult = FutureUtils.result(table.delete(rKeyBuf, lStartKey, option))) {
            assertEquals(31, deleteRangeResult.numDeleted());
            assertEquals(31, deleteRangeResult.prevKvs().size());
            int i = 20;
            for (KeyValue<ByteBuf, ByteBuf> kvPair : deleteRangeResult.prevKvs()) {
                assertEquals(getLKey(i), kvPair.key());
                assertEquals(getValue(i), kvPair.value());
                ++i;
            }
            assertEquals(51, i);
        }
    }
    // test txn
    byte[] lTxnKey = "txn-key".getBytes(UTF_8);
    ByteBuf lTxnKeyBuf = Unpooled.wrappedBuffer(lTxnKey);
    byte[] txnValue = "txn-value".getBytes(UTF_8);
    ByteBuf txnValueBuf = Unpooled.wrappedBuffer(txnValue);
    Txn<ByteBuf, ByteBuf> txn = table.txn(lTxnKeyBuf);
    CompletableFuture<TxnResult<ByteBuf, ByteBuf>> commitFuture = txn.If(table.opFactory().compareValue(CompareResult.EQUAL, lTxnKeyBuf, Unpooled.wrappedBuffer(new byte[0]))).Then(table.opFactory().newPut(lTxnKeyBuf, txnValueBuf, table.opFactory().optionFactory().newPutOption().build())).commit();
    try (TxnResult<ByteBuf, ByteBuf> txnResult = FutureUtils.result(commitFuture)) {
        assertTrue(txnResult.isSuccess());
        assertEquals(1, txnResult.results().size());
        Result<ByteBuf, ByteBuf> opResult = txnResult.results().get(0);
        assertEquals(OpType.PUT, opResult.type());
    }
    // get key
    try (RangeOption<ByteBuf> option = optionFactory.newRangeOption().build()) {
        try (RangeResult<ByteBuf, ByteBuf> getResult = FutureUtils.result(table.get(lTxnKeyBuf, lTxnKeyBuf, option))) {
            assertEquals(1, getResult.count());
            assertEquals(1, getResult.kvs().size());
            KeyValue<ByteBuf, ByteBuf> kv = getResult.kvs().get(0);
            assertEquals("txn-key", new String(ByteBufUtil.getBytes(kv.key()), UTF_8));
            assertEquals("txn-value", new String(ByteBufUtil.getBytes(kv.value()), UTF_8));
        }
    }
    txn = table.txn(lTxnKeyBuf);
    // txn failure
    commitFuture = txn.If(table.opFactory().compareValue(CompareResult.EQUAL, lTxnKeyBuf, Unpooled.wrappedBuffer(new byte[0]))).Then(table.opFactory().newPut(lTxnKeyBuf, valBuf, table.opFactory().optionFactory().newPutOption().build())).commit();
    try (TxnResult<ByteBuf, ByteBuf> txnResult = FutureUtils.result(commitFuture)) {
        assertFalse(txnResult.isSuccess());
        assertEquals(0, txnResult.results().size());
    }
}
Also used : TxnResult(org.apache.bookkeeper.api.kv.result.TxnResult) StreamProperties(org.apache.bookkeeper.stream.proto.StreamProperties) ByteBuf(io.netty.buffer.ByteBuf) Endpoint(org.apache.bookkeeper.stream.proto.common.Endpoint) NamespaceProperties(org.apache.bookkeeper.stream.proto.NamespaceProperties) StreamConfiguration(org.apache.bookkeeper.stream.proto.StreamConfiguration) NamespaceConfiguration(org.apache.bookkeeper.stream.proto.NamespaceConfiguration) Test(org.junit.Test)

Aggregations

StreamProperties (org.apache.bookkeeper.stream.proto.StreamProperties)11 Test (org.junit.Test)7 StreamConfiguration (org.apache.bookkeeper.stream.proto.StreamConfiguration)5 NamespaceProperties (org.apache.bookkeeper.stream.proto.NamespaceProperties)4 KeyValue (org.apache.bookkeeper.api.kv.result.KeyValue)3 NamespaceConfiguration (org.apache.bookkeeper.stream.proto.NamespaceConfiguration)3 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)2 ByteBuf (io.netty.buffer.ByteBuf)2 CompletableFuture (java.util.concurrent.CompletableFuture)2 Slf4j (lombok.extern.slf4j.Slf4j)2 CompareResult (org.apache.bookkeeper.api.kv.op.CompareResult)2 TxnOp (org.apache.bookkeeper.api.kv.op.TxnOp)2 FutureUtils (org.apache.bookkeeper.common.concurrent.FutureUtils)2 Bytes (org.apache.bookkeeper.common.util.Bytes)2 MVCCAsyncStore (org.apache.bookkeeper.statelib.api.mvcc.MVCCAsyncStore)2 Endpoint (org.apache.bookkeeper.stream.proto.common.Endpoint)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 UTF_8 (com.google.common.base.Charsets.UTF_8)1 Preconditions.checkArgument (com.google.common.base.Preconditions.checkArgument)1 Preconditions.checkState (com.google.common.base.Preconditions.checkState)1