Search in sources :

Example 11 with WireCommand

use of io.pravega.shared.protocol.netty.WireCommand in project pravega by pravega.

the class PravegaRequestProcessorTest method testReadTableEntriesDeltaEmpty.

@Test
public void testReadTableEntriesDeltaEmpty() throws Exception {
    // Set up PravegaRequestProcessor instance to execute requests against
    String tableSegmentName = "testReadTableEntriesDelta";
    @Cleanup ServiceBuilder serviceBuilder = newInlineExecutionInMemoryBuilder(getBuilderConfig());
    serviceBuilder.initialize();
    StreamSegmentStore store = serviceBuilder.createStreamSegmentService();
    TableStore tableStore = serviceBuilder.createTableStoreService();
    ServerConnection connection = mock(ServerConnection.class);
    InOrder order = inOrder(connection);
    val recorderMock = mock(TableSegmentStatsRecorder.class);
    PravegaRequestProcessor processor = new PravegaRequestProcessor(store, tableStore, new TrackedConnection(connection), SegmentStatsRecorder.noOp(), recorderMock, new PassingTokenVerifier(), false);
    processor.createTableSegment(new WireCommands.CreateTableSegment(1, tableSegmentName, false, 0, "", 0));
    order.verify(connection).send(new WireCommands.SegmentCreated(1, tableSegmentName));
    verify(recorderMock).createTableSegment(eq(tableSegmentName), any());
    processor.readTableEntriesDelta(new WireCommands.ReadTableEntriesDelta(1, tableSegmentName, "", 0, 3));
    ArgumentCaptor<WireCommand> wireCommandsCaptor = ArgumentCaptor.forClass(WireCommand.class);
    verify(recorderMock).iterateEntries(eq(tableSegmentName), eq(0), any());
}
Also used : lombok.val(lombok.val) WireCommand(io.pravega.shared.protocol.netty.WireCommand) InOrder(org.mockito.InOrder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Cleanup(lombok.Cleanup) ServiceBuilder(io.pravega.segmentstore.server.store.ServiceBuilder) TableStore(io.pravega.segmentstore.contracts.tables.TableStore) StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) SynchronousStreamSegmentStore(io.pravega.segmentstore.server.mocks.SynchronousStreamSegmentStore) PassingTokenVerifier(io.pravega.segmentstore.server.host.delegationtoken.PassingTokenVerifier) WireCommands(io.pravega.shared.protocol.netty.WireCommands) Test(org.junit.Test)

Example 12 with WireCommand

use of io.pravega.shared.protocol.netty.WireCommand in project pravega by pravega.

the class PravegaRequestProcessorTest method testGetTableEntries.

@Test
public void testGetTableEntries() throws Exception {
    // Set up PravegaRequestProcessor instance to execute requests against
    val rnd = new Random(0);
    String tableSegmentName = "testGetTableEntries";
    @Cleanup ServiceBuilder serviceBuilder = newInlineExecutionInMemoryBuilder(getBuilderConfig());
    serviceBuilder.initialize();
    StreamSegmentStore store = serviceBuilder.createStreamSegmentService();
    TableStore tableStore = serviceBuilder.createTableStoreService();
    ServerConnection connection = mock(ServerConnection.class);
    InOrder order = inOrder(connection);
    val recorderMock = mock(TableSegmentStatsRecorder.class);
    PravegaRequestProcessor processor = new PravegaRequestProcessor(store, tableStore, new TrackedConnection(connection), SegmentStatsRecorder.noOp(), recorderMock, new PassingTokenVerifier(), false);
    // Generate keys.
    ArrayList<ArrayView> keys = generateKeys(3, rnd);
    ArrayView testValue = generateValue(rnd);
    TableEntry e1 = TableEntry.unversioned(keys.get(0), testValue);
    TableEntry e2 = TableEntry.unversioned(keys.get(1), testValue);
    TableEntry e3 = TableEntry.unversioned(keys.get(2), testValue);
    // Create a table segment and add data.
    processor.createTableSegment(new WireCommands.CreateTableSegment(1, tableSegmentName, false, 0, "", 0));
    order.verify(connection).send(new WireCommands.SegmentCreated(1, tableSegmentName));
    verify(recorderMock).createTableSegment(eq(tableSegmentName), any());
    processor.updateTableEntries(new WireCommands.UpdateTableEntries(2, tableSegmentName, "", getTableEntries(asList(e1, e2, e3)), WireCommands.NULL_TABLE_SEGMENT_OFFSET));
    verify(recorderMock).updateEntries(eq(tableSegmentName), eq(3), eq(false), any());
    // 1. Now read the table entries where suggestedEntryCount is equal to number of entries in the Table Store.
    WireCommands.TableIteratorArgs args = new WireCommands.TableIteratorArgs(Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER);
    processor.readTableEntries(new WireCommands.ReadTableEntries(3, tableSegmentName, "", 3, args));
    // Capture the WireCommands sent.
    ArgumentCaptor<WireCommand> wireCommandsCaptor = ArgumentCaptor.forClass(WireCommand.class);
    order.verify(connection, times(2)).send(wireCommandsCaptor.capture());
    verify(recorderMock).iterateEntries(eq(tableSegmentName), eq(3), any());
    // Verify the WireCommands.
    List<Long> keyVersions = ((WireCommands.TableEntriesUpdated) wireCommandsCaptor.getAllValues().get(0)).getUpdatedVersions();
    WireCommands.TableEntriesRead getTableEntriesIteratorsResp = (WireCommands.TableEntriesRead) wireCommandsCaptor.getAllValues().get(1);
    assertTrue(getTableEntriesIteratorsResp.getEntries().getEntries().stream().map(e -> e.getKey().getKeyVersion()).collect(Collectors.toList()).containsAll(keyVersions));
    // Verify if the value is correct.
    assertTrue(getTableEntriesIteratorsResp.getEntries().getEntries().stream().allMatch(e -> {
        ByteBuf buf = e.getValue().getData();
        byte[] bytes = new byte[buf.readableBytes()];
        buf.getBytes(buf.readerIndex(), bytes);
        return testValue.equals(new ByteArraySegment(bytes));
    }));
    // 2. Now read the table keys where suggestedEntryCount is less than the number of entries in the Table Store.
    processor.readTableEntries(new WireCommands.ReadTableEntries(3, tableSegmentName, "", 1, args));
    // Capture the WireCommands sent.
    ArgumentCaptor<WireCommands.TableEntriesRead> tableEntriesCaptor = ArgumentCaptor.forClass(WireCommands.TableEntriesRead.class);
    order.verify(connection, times(1)).send(tableEntriesCaptor.capture());
    // Verify the WireCommands.
    getTableEntriesIteratorsResp = tableEntriesCaptor.getAllValues().get(0);
    assertEquals(1, getTableEntriesIteratorsResp.getEntries().getEntries().size());
    assertTrue(keyVersions.contains(getTableEntriesIteratorsResp.getEntries().getEntries().get(0).getKey().getKeyVersion()));
    // Get the last state.
    ByteBuf state = getTableEntriesIteratorsResp.getContinuationToken();
    args = new WireCommands.TableIteratorArgs(state, Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER);
    // 3. Now read the remaining table entries by providing a higher suggestedKeyCount and the state to the iterator.
    processor.readTableEntries(new WireCommands.ReadTableEntries(3, tableSegmentName, "", 3, args));
    // Capture the WireCommands sent.
    tableEntriesCaptor = ArgumentCaptor.forClass(WireCommands.TableEntriesRead.class);
    order.verify(connection, times(1)).send(tableEntriesCaptor.capture());
    verify(recorderMock).iterateEntries(eq(tableSegmentName), eq(1), any());
    // Verify the WireCommands.
    getTableEntriesIteratorsResp = tableEntriesCaptor.getAllValues().get(0);
    assertEquals(2, getTableEntriesIteratorsResp.getEntries().getEntries().size());
    assertTrue(keyVersions.containsAll(getTableEntriesIteratorsResp.getEntries().getEntries().stream().map(e -> e.getKey().getKeyVersion()).collect(Collectors.toList())));
}
Also used : ReadResultEntryBase(io.pravega.segmentstore.server.reading.ReadResultEntryBase) StreamSegmentInformation(io.pravega.segmentstore.contracts.StreamSegmentInformation) StreamSegmentNotExistsException(io.pravega.segmentstore.contracts.StreamSegmentNotExistsException) TableStore(io.pravega.segmentstore.contracts.tables.TableStore) AssertExtensions(io.pravega.test.common.AssertExtensions) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Cleanup(lombok.Cleanup) Random(java.util.Random) ServiceBuilderConfig(io.pravega.segmentstore.server.store.ServiceBuilderConfig) Unpooled(io.netty.buffer.Unpooled) Collections.singletonList(java.util.Collections.singletonList) ArrayView(io.pravega.common.util.ArrayView) ServiceBuilder(io.pravega.segmentstore.server.store.ServiceBuilder) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) Arrays.asList(java.util.Arrays.asList) BufferView(io.pravega.common.util.BufferView) Duration(java.time.Duration) Map(java.util.Map) SegmentStatsRecorder(io.pravega.segmentstore.server.host.stat.SegmentStatsRecorder) Unpooled.wrappedBuffer(io.netty.buffer.Unpooled.wrappedBuffer) Mockito.doReturn(org.mockito.Mockito.doReturn) StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) StreamSegmentReadResult(io.pravega.segmentstore.server.reading.StreamSegmentReadResult) Attributes(io.pravega.segmentstore.contracts.Attributes) TableKey(io.pravega.segmentstore.contracts.tables.TableKey) Mockito.clearInvocations(org.mockito.Mockito.clearInvocations) CancellationException(java.util.concurrent.CancellationException) ReadResultEntryType(io.pravega.segmentstore.contracts.ReadResultEntryType) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) MetricsProvider(io.pravega.shared.metrics.MetricsProvider) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) ByteArraySegment(io.pravega.common.util.ByteArraySegment) PassingTokenVerifier(io.pravega.segmentstore.server.host.delegationtoken.PassingTokenVerifier) Assert.assertFalse(org.junit.Assert.assertFalse) Mockito.inOrder(org.mockito.Mockito.inOrder) TestUtils(io.pravega.test.common.TestUtils) Futures(io.pravega.common.concurrent.Futures) ReadResult(io.pravega.segmentstore.contracts.ReadResult) StreamSegmentService(io.pravega.segmentstore.server.store.StreamSegmentService) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Setter(lombok.Setter) Getter(lombok.Getter) BeforeClass(org.junit.BeforeClass) RunWith(org.junit.runner.RunWith) ServiceConfig(io.pravega.segmentstore.server.store.ServiceConfig) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) Mockito.spy(org.mockito.Mockito.spy) Iterators(com.google.common.collect.Iterators) ArrayList(java.util.ArrayList) SegmentType(io.pravega.segmentstore.contracts.SegmentType) ArgumentCaptor(org.mockito.ArgumentCaptor) ImmutableList(com.google.common.collect.ImmutableList) ByteBuf(io.netty.buffer.ByteBuf) ReadResultEntry(io.pravega.segmentstore.contracts.ReadResultEntry) ByteBufWrapper(io.pravega.shared.protocol.netty.ByteBufWrapper) StreamSegmentTruncatedException(io.pravega.segmentstore.contracts.StreamSegmentTruncatedException) NameUtils(io.pravega.shared.NameUtils) Properties(java.util.Properties) InOrder(org.mockito.InOrder) SerializedClassRunner(io.pravega.test.common.SerializedClassRunner) AttributeId(io.pravega.segmentstore.contracts.AttributeId) lombok.val(lombok.val) Assert.assertTrue(org.junit.Assert.assertTrue) TableExtensionConfig(io.pravega.segmentstore.server.tables.TableExtensionConfig) Test(org.junit.Test) Mockito.times(org.mockito.Mockito.times) MergeStreamSegmentResult(io.pravega.segmentstore.contracts.MergeStreamSegmentResult) StreamSegmentMergedException(io.pravega.segmentstore.contracts.StreamSegmentMergedException) Mockito.when(org.mockito.Mockito.when) WireCommands(io.pravega.shared.protocol.netty.WireCommands) TableSegmentStatsRecorder(io.pravega.segmentstore.server.host.stat.TableSegmentStatsRecorder) Mockito.verify(org.mockito.Mockito.verify) WireCommand(io.pravega.shared.protocol.netty.WireCommand) Mockito(org.mockito.Mockito) SynchronousStreamSegmentStore(io.pravega.segmentstore.server.mocks.SynchronousStreamSegmentStore) AbstractMap(java.util.AbstractMap) Collectors.toList(java.util.stream.Collectors.toList) InlineExecutor(io.pravega.test.common.InlineExecutor) MetricsConfig(io.pravega.shared.metrics.MetricsConfig) Preconditions(com.google.common.base.Preconditions) Assert(org.junit.Assert) TableEntry(io.pravega.segmentstore.contracts.tables.TableEntry) Assert.assertEquals(org.junit.Assert.assertEquals) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) ByteArraySegment(io.pravega.common.util.ByteArraySegment) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) ByteBuf(io.netty.buffer.ByteBuf) Cleanup(lombok.Cleanup) ServiceBuilder(io.pravega.segmentstore.server.store.ServiceBuilder) TableEntry(io.pravega.segmentstore.contracts.tables.TableEntry) Random(java.util.Random) PassingTokenVerifier(io.pravega.segmentstore.server.host.delegationtoken.PassingTokenVerifier) WireCommands(io.pravega.shared.protocol.netty.WireCommands) lombok.val(lombok.val) WireCommand(io.pravega.shared.protocol.netty.WireCommand) InOrder(org.mockito.InOrder) TableStore(io.pravega.segmentstore.contracts.tables.TableStore) StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) SynchronousStreamSegmentStore(io.pravega.segmentstore.server.mocks.SynchronousStreamSegmentStore) ArrayView(io.pravega.common.util.ArrayView) Test(org.junit.Test)

Example 13 with WireCommand

use of io.pravega.shared.protocol.netty.WireCommand in project pravega by pravega.

the class AppendProcessorTest method sendRequest.

private Reply sendRequest(EmbeddedChannel channel, Request request) throws Exception {
    channel.writeInbound(request);
    Object encodedReply = channel.readOutbound();
    for (int i = 0; encodedReply == null && i < 50; i++) {
        channel.runPendingTasks();
        Thread.sleep(10);
        encodedReply = channel.readOutbound();
    }
    if (encodedReply == null) {
        return null;
    }
    WireCommand decoded = CommandDecoder.parseCommand((ByteBuf) encodedReply);
    ((ByteBuf) encodedReply).release();
    assertNotNull(decoded);
    return (Reply) decoded;
}
Also used : WireCommand(io.pravega.shared.protocol.netty.WireCommand) Reply(io.pravega.shared.protocol.netty.Reply) ByteBuf(io.netty.buffer.ByteBuf)

Example 14 with WireCommand

use of io.pravega.shared.protocol.netty.WireCommand in project pravega by pravega.

the class PravegaRequestProcessorTest method testGetTableKeys.

@Test
public void testGetTableKeys() throws Exception {
    // Set up PravegaRequestProcessor instance to execute requests against
    val rnd = new Random(0);
    String tableSegmentName = "testGetTableKeys";
    @Cleanup ServiceBuilder serviceBuilder = newInlineExecutionInMemoryBuilder(getBuilderConfig());
    serviceBuilder.initialize();
    StreamSegmentStore store = serviceBuilder.createStreamSegmentService();
    TableStore tableStore = serviceBuilder.createTableStoreService();
    ServerConnection connection = mock(ServerConnection.class);
    InOrder order = inOrder(connection);
    val recorderMock = mock(TableSegmentStatsRecorder.class);
    PravegaRequestProcessor processor = new PravegaRequestProcessor(store, tableStore, new TrackedConnection(connection), SegmentStatsRecorder.noOp(), recorderMock, new PassingTokenVerifier(), false);
    // Generate keys.
    ArrayList<ArrayView> keys = generateKeys(3, rnd);
    TableEntry e1 = TableEntry.unversioned(keys.get(0), generateValue(rnd));
    TableEntry e2 = TableEntry.unversioned(keys.get(1), generateValue(rnd));
    TableEntry e3 = TableEntry.unversioned(keys.get(2), generateValue(rnd));
    // Create a table segment and add data.
    processor.createTableSegment(new WireCommands.CreateTableSegment(1, tableSegmentName, false, 0, "", 0));
    order.verify(connection).send(new WireCommands.SegmentCreated(1, tableSegmentName));
    verify(recorderMock).createTableSegment(eq(tableSegmentName), any());
    processor.updateTableEntries(new WireCommands.UpdateTableEntries(2, tableSegmentName, "", getTableEntries(asList(e1, e2, e3)), WireCommands.NULL_TABLE_SEGMENT_OFFSET));
    verify(recorderMock).updateEntries(eq(tableSegmentName), eq(3), eq(false), any());
    // 1. Now read the table keys where suggestedKeyCount is equal to number of entries in the Table Store.
    WireCommands.TableIteratorArgs args = new WireCommands.TableIteratorArgs(Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER);
    processor.readTableKeys(new WireCommands.ReadTableKeys(3, tableSegmentName, "", 3, args));
    // Capture the WireCommands sent.
    ArgumentCaptor<WireCommand> wireCommandsCaptor = ArgumentCaptor.forClass(WireCommand.class);
    order.verify(connection, times(2)).send(wireCommandsCaptor.capture());
    verify(recorderMock).iterateKeys(eq(tableSegmentName), eq(3), any());
    // Verify the WireCommands.
    List<Long> keyVersions = ((WireCommands.TableEntriesUpdated) wireCommandsCaptor.getAllValues().get(0)).getUpdatedVersions();
    WireCommands.TableKeysRead getTableKeysReadResponse = (WireCommands.TableKeysRead) wireCommandsCaptor.getAllValues().get(1);
    assertTrue(getTableKeysReadResponse.getKeys().stream().map(WireCommands.TableKey::getKeyVersion).collect(Collectors.toList()).containsAll(keyVersions));
    // 2. Now read the table keys where suggestedKeyCount is less than the number of keys in the Table Store.
    processor.readTableKeys(new WireCommands.ReadTableKeys(3, tableSegmentName, "", 1, args));
    // Capture the WireCommands sent.
    ArgumentCaptor<WireCommands.TableKeysRead> tableKeysCaptor = ArgumentCaptor.forClass(WireCommands.TableKeysRead.class);
    order.verify(connection, times(1)).send(tableKeysCaptor.capture());
    verify(recorderMock).iterateKeys(eq(tableSegmentName), eq(1), any());
    // Verify the WireCommands.
    getTableKeysReadResponse = tableKeysCaptor.getAllValues().get(0);
    assertEquals(1, getTableKeysReadResponse.getKeys().size());
    assertTrue(keyVersions.contains(getTableKeysReadResponse.getKeys().get(0).getKeyVersion()));
    // Get the last state.
    ByteBuf state = getTableKeysReadResponse.getContinuationToken();
    args = new WireCommands.TableIteratorArgs(state, Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER, Unpooled.EMPTY_BUFFER);
    // 3. Now read the remaining table keys by providing a higher suggestedKeyCount and the state to the iterator.
    processor.readTableKeys(new WireCommands.ReadTableKeys(3, tableSegmentName, "", 3, args));
    // Capture the WireCommands sent.
    tableKeysCaptor = ArgumentCaptor.forClass(WireCommands.TableKeysRead.class);
    order.verify(connection, times(1)).send(tableKeysCaptor.capture());
    verify(recorderMock).iterateKeys(eq(tableSegmentName), eq(1), any());
    // Verify the WireCommands.
    getTableKeysReadResponse = tableKeysCaptor.getAllValues().get(0);
    assertEquals(2, getTableKeysReadResponse.getKeys().size());
    assertTrue(keyVersions.containsAll(getTableKeysReadResponse.getKeys().stream().map(WireCommands.TableKey::getKeyVersion).collect(Collectors.toList())));
}
Also used : ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) ByteBuf(io.netty.buffer.ByteBuf) Cleanup(lombok.Cleanup) ServiceBuilder(io.pravega.segmentstore.server.store.ServiceBuilder) TableEntry(io.pravega.segmentstore.contracts.tables.TableEntry) Random(java.util.Random) PassingTokenVerifier(io.pravega.segmentstore.server.host.delegationtoken.PassingTokenVerifier) WireCommands(io.pravega.shared.protocol.netty.WireCommands) lombok.val(lombok.val) WireCommand(io.pravega.shared.protocol.netty.WireCommand) InOrder(org.mockito.InOrder) TableStore(io.pravega.segmentstore.contracts.tables.TableStore) StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) SynchronousStreamSegmentStore(io.pravega.segmentstore.server.mocks.SynchronousStreamSegmentStore) ArrayView(io.pravega.common.util.ArrayView) Test(org.junit.Test)

Example 15 with WireCommand

use of io.pravega.shared.protocol.netty.WireCommand in project pravega by pravega.

the class SegmentHelper method sendRequestAsync.

private <ResultT> void sendRequestAsync(final WireCommand request, final ReplyProcessor replyProcessor, final CompletableFuture<ResultT> resultFuture, final ConnectionFactory connectionFactory, final PravegaNodeUri uri) {
    CompletableFuture<ClientConnection> connectionFuture = connectionFactory.establishConnection(uri, replyProcessor);
    connectionFuture.whenComplete((connection, e) -> {
        if (connection == null) {
            resultFuture.completeExceptionally(new WireCommandFailedException(new ConnectionFailedException(e), request.getType(), WireCommandFailedException.Reason.ConnectionFailed));
        } else {
            try {
                connection.send(request);
            } catch (ConnectionFailedException cfe) {
                throw new WireCommandFailedException(cfe, request.getType(), WireCommandFailedException.Reason.ConnectionFailed);
            } catch (Exception e2) {
                throw new RuntimeException(e2);
            }
        }
    }).exceptionally(e -> {
        Throwable cause = Exceptions.unwrap(e);
        if (cause instanceof WireCommandFailedException) {
            resultFuture.completeExceptionally(cause);
        } else if (cause instanceof ConnectionFailedException) {
            resultFuture.completeExceptionally(new WireCommandFailedException(cause, request.getType(), WireCommandFailedException.Reason.ConnectionFailed));
        } else {
            resultFuture.completeExceptionally(new RuntimeException(cause));
        }
        return null;
    });
    resultFuture.whenComplete((result, e) -> {
        connectionFuture.thenAccept(ClientConnection::close);
    });
}
Also used : ClientConnection(io.pravega.client.netty.impl.ClientConnection) AuthenticationException(io.pravega.common.auth.AuthenticationException) Segment(io.pravega.client.segment.impl.Segment) ConnectionFailedException(io.pravega.shared.protocol.netty.ConnectionFailedException) Exceptions(io.pravega.common.Exceptions) CompletableFuture(java.util.concurrent.CompletableFuture) Supplier(java.util.function.Supplier) FailingReplyProcessor(io.pravega.shared.protocol.netty.FailingReplyProcessor) Pair(org.apache.commons.lang3.tuple.Pair) PravegaNodeUri(io.pravega.shared.protocol.netty.PravegaNodeUri) ConnectionFactory(io.pravega.client.netty.impl.ConnectionFactory) Controller(io.pravega.controller.stream.api.grpc.v1.Controller) WireCommandType(io.pravega.shared.protocol.netty.WireCommandType) ModelHelper(io.pravega.client.stream.impl.ModelHelper) Host(io.pravega.common.cluster.Host) UUID(java.util.UUID) WireCommands(io.pravega.shared.protocol.netty.WireCommands) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) WireCommand(io.pravega.shared.protocol.netty.WireCommand) AtomicLong(java.util.concurrent.atomic.AtomicLong) Slf4j(lombok.extern.slf4j.Slf4j) HostControllerStore(io.pravega.controller.store.host.HostControllerStore) TxnStatus(io.pravega.controller.stream.api.grpc.v1.Controller.TxnStatus) ScalingPolicy(io.pravega.client.stream.ScalingPolicy) ReplyProcessor(io.pravega.shared.protocol.netty.ReplyProcessor) ClientConnection(io.pravega.client.netty.impl.ClientConnection) ConnectionFailedException(io.pravega.shared.protocol.netty.ConnectionFailedException) AuthenticationException(io.pravega.common.auth.AuthenticationException) ConnectionFailedException(io.pravega.shared.protocol.netty.ConnectionFailedException)

Aggregations

WireCommand (io.pravega.shared.protocol.netty.WireCommand)23 Test (org.junit.Test)18 WireCommands (io.pravega.shared.protocol.netty.WireCommands)17 ByteBuf (io.netty.buffer.ByteBuf)15 UUID (java.util.UUID)15 PravegaNodeUri (io.pravega.shared.protocol.netty.PravegaNodeUri)13 Append (io.pravega.shared.protocol.netty.Append)12 Event (io.pravega.shared.protocol.netty.WireCommands.Event)10 Cleanup (lombok.Cleanup)9 AppendBatchSizeTracker (io.pravega.shared.protocol.netty.AppendBatchSizeTracker)8 AppendBlock (io.pravega.shared.protocol.netty.WireCommands.AppendBlock)8 AppendBlockEnd (io.pravega.shared.protocol.netty.WireCommands.AppendBlockEnd)8 lombok.val (lombok.val)7 StreamSegmentStore (io.pravega.segmentstore.contracts.StreamSegmentStore)6 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)6 TableStore (io.pravega.segmentstore.contracts.tables.TableStore)5 PassingTokenVerifier (io.pravega.segmentstore.server.host.delegationtoken.PassingTokenVerifier)5 SynchronousStreamSegmentStore (io.pravega.segmentstore.server.mocks.SynchronousStreamSegmentStore)5 ServiceBuilder (io.pravega.segmentstore.server.store.ServiceBuilder)5 CompletableFuture (java.util.concurrent.CompletableFuture)5