Search in sources :

Example 16 with KeyValueTableConfiguration

use of io.pravega.client.tables.KeyValueTableConfiguration in project pravega by pravega.

the class ScopeTest method testDeleteScopeRecursive.

@Test
public void testDeleteScopeRecursive() throws Exception {
    final String scope = "testDeleteScope";
    final String testFalseScope = "falseScope";
    final String streamName1 = "test1";
    final String streamName2 = "test2";
    final String streamName3 = "test3";
    final String streamName4 = "test4";
    final String kvtName1 = "kvt1";
    final String kvtName2 = "kvt2";
    final String kvtName3 = "kvt3";
    final String groupName1 = "rg1";
    final String groupName2 = "rg2";
    final String groupName3 = "rg3";
    StreamConfiguration config = StreamConfiguration.builder().scalingPolicy(ScalingPolicy.fixed(1)).build();
    @Cleanup Controller controller = controllerWrapper.getController();
    ClientConfig clientConfig = ClientConfig.builder().controllerURI(URI.create("tcp://localhost:" + controllerPort)).build();
    @Cleanup ConnectionPool cp = new ConnectionPoolImpl(clientConfig, new SocketConnectionFactoryImpl(clientConfig));
    @Cleanup ConnectionFactory connectionFactory = new SocketConnectionFactoryImpl(clientConfig);
    // Create scope
    controllerWrapper.getControllerService().createScope(scope, 0L).get();
    assertTrue(controller.checkScopeExists(scope).get());
    // Create streams
    assertTrue(controller.createStream(scope, streamName1, config).get());
    assertTrue(controller.createStream(scope, streamName2, config).get());
    assertTrue(controller.createStream(scope, streamName3, config).get());
    @Cleanup StreamManager streamManager = new StreamManagerImpl(controller, cp);
    @Cleanup KeyValueTableManager keyValueTableManager = new KeyValueTableManagerImpl(clientConfig);
    @Cleanup ReaderGroupManager readerGroupManager = new ReaderGroupManagerImpl(scope, clientConfig, connectionFactory);
    // 1. Call deleteScopeRecursive() without creating a scope
    assertTrue(streamManager.deleteScopeRecursive(testFalseScope));
    // Create KVT under the scope
    KeyValueTableConfiguration kvtConfig = KeyValueTableConfiguration.builder().partitionCount(2).primaryKeyLength(4).secondaryKeyLength(4).build();
    assertTrue(keyValueTableManager.createKeyValueTable(scope, kvtName1, kvtConfig));
    assertTrue(keyValueTableManager.createKeyValueTable(scope, kvtName2, kvtConfig));
    // Create RG under the same scope
    assertTrue(readerGroupManager.createReaderGroup(groupName1, ReaderGroupConfig.builder().stream(getScopedStreamName(scope, streamName1)).build()));
    assertTrue(readerGroupManager.createReaderGroup(groupName2, ReaderGroupConfig.builder().stream(getScopedStreamName(scope, streamName2)).build()));
    // Call deleteScopeRecursive to delete the scope recursively
    assertTrue(streamManager.deleteScopeRecursive(scope));
    // Validate that the scope is deleted
    assertFalse(controller.checkScopeExists(scope).get());
    // Validate create operation of Stream/RG/KVT should throw error
    AssertExtensions.assertThrows("Failed to create Reader Group as Scope does not exits", () -> readerGroupManager.createReaderGroup(groupName3, ReaderGroupConfig.builder().stream(getScopedStreamName(scope, streamName2)).build()), e -> e instanceof IllegalArgumentException);
    AssertExtensions.assertThrows("Scope does not exist", () -> controller.createStream(scope, streamName4, config).get(), e -> e instanceof IllegalArgumentException);
    AssertExtensions.assertThrows("Scope does not exist", () -> keyValueTableManager.createKeyValueTable(scope, kvtName3, kvtConfig), e -> e instanceof IllegalArgumentException);
}
Also used : ConnectionPool(io.pravega.client.connection.impl.ConnectionPool) KeyValueTableManager(io.pravega.client.admin.KeyValueTableManager) ReaderGroupManager(io.pravega.client.admin.ReaderGroupManager) KeyValueTableConfiguration(io.pravega.client.tables.KeyValueTableConfiguration) ConnectionPoolImpl(io.pravega.client.connection.impl.ConnectionPoolImpl) StreamManagerImpl(io.pravega.client.admin.impl.StreamManagerImpl) Controller(io.pravega.client.control.impl.Controller) SocketConnectionFactoryImpl(io.pravega.client.connection.impl.SocketConnectionFactoryImpl) Cleanup(lombok.Cleanup) ConnectionFactory(io.pravega.client.connection.impl.ConnectionFactory) KeyValueTableManagerImpl(io.pravega.client.admin.impl.KeyValueTableManagerImpl) StreamManager(io.pravega.client.admin.StreamManager) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) ClientConfig(io.pravega.client.ClientConfig) ReaderGroupManagerImpl(io.pravega.client.admin.impl.ReaderGroupManagerImpl) Test(org.junit.Test)

Example 17 with KeyValueTableConfiguration

use of io.pravega.client.tables.KeyValueTableConfiguration in project pravega by pravega.

the class TableMetadataTasksTest method testWorkflowCompletionTimeout.

@Test(timeout = 30000)
public void testWorkflowCompletionTimeout() throws Exception {
    // Create a new KVTable
    String tableName = "kvtable2";
    long creationTime = System.currentTimeMillis();
    KeyValueTableConfiguration kvtConfig = KeyValueTableConfiguration.builder().partitionCount(2).primaryKeyLength(4).secondaryKeyLength(4).build();
    CompletableFuture<Controller.CreateKeyValueTableStatus.Status> createOperationFuture = kvtMetadataTasks.createKeyValueTable(SCOPE, tableName, kvtConfig, creationTime, 0L);
    assertTrue(Futures.await(processEvent((TableMetadataTasksTest.WriterMock) requestEventWriter)));
    assertEquals(CreateKeyValueTableStatus.Status.SUCCESS, createOperationFuture.join());
    // Create KVTable times out
    EventHelper helper = new EventHelper(executor, "host", ((AbstractKVTableMetadataStore) kvtStore).getHostTaskIndex());
    helper.setCompletionTimeoutMillis(50L);
    EventStreamWriter<ControllerEvent> eventWriter = new WriterMock();
    helper.setRequestEventWriter(eventWriter);
    TableMetadataTasks kvtTasks = spy(new TableMetadataTasks(kvtStore, segmentHelperMock, executor, executor, "host", GrpcAuthHelper.getDisabledAuthHelper(), helper));
    AssertExtensions.assertFutureThrows("create timedout", kvtTasks.createKeyValueTable(SCOPE, kvtable1, kvtConfig, creationTime, 0L), e -> Exceptions.unwrap(e) instanceof TimeoutException);
    // Delete KVTable times out
    AssertExtensions.assertFutureThrows("delete timedout", kvtTasks.deleteKeyValueTable(SCOPE, tableName, 0L), e -> Exceptions.unwrap(e) instanceof TimeoutException);
}
Also used : CreateScopeStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateScopeStatus) DeleteKVTableStatus(io.pravega.controller.stream.api.grpc.v1.Controller.DeleteKVTableStatus) CreateKeyValueTableStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateKeyValueTableStatus) KeyValueTableConfiguration(io.pravega.client.tables.KeyValueTableConfiguration) Controller(io.pravega.controller.stream.api.grpc.v1.Controller) ControllerEvent(io.pravega.shared.controller.event.ControllerEvent) EventHelper(io.pravega.controller.task.EventHelper) TimeoutException(java.util.concurrent.TimeoutException) Test(org.junit.Test)

Example 18 with KeyValueTableConfiguration

use of io.pravega.client.tables.KeyValueTableConfiguration in project pravega by pravega.

the class TableMetadataTasksTest method testDeleteKeyValueTable.

@Test(timeout = 30000)
public void testDeleteKeyValueTable() throws ExecutionException, InterruptedException {
    Assert.assertTrue(isScopeCreated);
    long creationTime = System.currentTimeMillis();
    KeyValueTableConfiguration kvtConfig = KeyValueTableConfiguration.builder().partitionCount(2).primaryKeyLength(4).secondaryKeyLength(4).build();
    CompletableFuture<Controller.CreateKeyValueTableStatus.Status> createOperationFuture = kvtMetadataTasks.createKeyValueTable(SCOPE, kvtable1, kvtConfig, creationTime, 0L);
    assertTrue(Futures.await(processEvent((TableMetadataTasksTest.WriterMock) requestEventWriter)));
    assertEquals(CreateKeyValueTableStatus.Status.SUCCESS, createOperationFuture.join());
    // delete KVTable
    CompletableFuture<DeleteKVTableStatus.Status> future = kvtMetadataTasks.deleteKeyValueTable(SCOPE, kvtable1, 0L);
    assertTrue(Futures.await(processEvent((TableMetadataTasksTest.WriterMock) requestEventWriter)));
    assertEquals(Controller.DeleteKVTableStatus.Status.SUCCESS, future.get());
    assertTrue(kvtMetadataTasks.isDeleted(SCOPE, kvtable1, null).join());
    assertFalse(kvtStore.checkTableExists(SCOPE, kvtable1, null, executor).join());
    assertFalse(kvtStore.isScopeSealed("testScope", null, executor).join());
}
Also used : CreateScopeStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateScopeStatus) DeleteKVTableStatus(io.pravega.controller.stream.api.grpc.v1.Controller.DeleteKVTableStatus) CreateKeyValueTableStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateKeyValueTableStatus) KeyValueTableConfiguration(io.pravega.client.tables.KeyValueTableConfiguration) Controller(io.pravega.controller.stream.api.grpc.v1.Controller) Test(org.junit.Test)

Example 19 with KeyValueTableConfiguration

use of io.pravega.client.tables.KeyValueTableConfiguration in project pravega by pravega.

the class ControllerServiceImplTest method kvtablesInScopeTest.

@Test
public void kvtablesInScopeTest() {
    KeyValueTableConfiguration config1 = KeyValueTableConfiguration.builder().partitionCount(3).primaryKeyLength(4).secondaryKeyLength(4).build();
    // Test Create KeyValueTable
    ResultObserver<CreateScopeStatus> result = new ResultObserver<>();
    ScopeInfo scopeInfo = ScopeInfo.newBuilder().setScope(SCOPE4).build();
    this.controllerService.createScope(scopeInfo, result);
    CreateScopeStatus createScopeStatus = result.get();
    assertEquals("Create Scope", CreateScopeStatus.Status.SUCCESS, createScopeStatus.getStatus());
    ResultObserver<CreateKeyValueTableStatus> result1 = new ResultObserver<>();
    this.controllerService.createKeyValueTable(ModelHelper.decode(SCOPE4, KVTABLE1, config1), result1);
    CreateKeyValueTableStatus createStatus = result1.get();
    assertEquals("Create KeyValueTable", CreateKeyValueTableStatus.Status.SUCCESS, createStatus.getStatus());
    ResultObserver<CreateKeyValueTableStatus> result2 = new ResultObserver<>();
    this.controllerService.createKeyValueTable(ModelHelper.decode(SCOPE4, KVTABLE2, config1), result2);
    createStatus = result2.get();
    assertEquals("Create KeyValueTable", CreateKeyValueTableStatus.Status.SUCCESS, createStatus.getStatus());
    ResultObserver<CreateKeyValueTableStatus> result3 = new ResultObserver<>();
    this.controllerService.createKeyValueTable(ModelHelper.decode(SCOPE4, KVTABLE3, config1), result3);
    createStatus = result3.get();
    assertEquals("Create KeyValueTable", CreateKeyValueTableStatus.Status.SUCCESS, createStatus.getStatus());
    ResultObserver<Controller.KVTablesInScopeResponse> kvtablesInScopeResponse1 = new ResultObserver<>();
    Controller.KVTablesInScopeRequest kvTablesInScopeRequest1 = Controller.KVTablesInScopeRequest.newBuilder().setScope(scopeInfo).setContinuationToken(Controller.ContinuationToken.newBuilder().build()).build();
    this.controllerService.listKeyValueTablesInScope(kvTablesInScopeRequest1, kvtablesInScopeResponse1);
    List<Controller.KeyValueTableInfo> list = kvtablesInScopeResponse1.get().getKvtablesList();
    // check continuation token
    assertEquals(kvtablesInScopeResponse1.get().getStatus(), Controller.KVTablesInScopeResponse.Status.SUCCESS);
    assertFalse(Strings.isNullOrEmpty(kvtablesInScopeResponse1.get().getContinuationToken().getToken()));
    assertEquals(2, list.size());
    ResultObserver<Controller.KVTablesInScopeResponse> kvtablesInScopeResponse2 = new ResultObserver<>();
    Controller.KVTablesInScopeRequest kvTablesInScopeRequest2 = Controller.KVTablesInScopeRequest.newBuilder().setScope(scopeInfo).setContinuationToken(kvtablesInScopeResponse1.get().getContinuationToken()).build();
    this.controllerService.listKeyValueTablesInScope(kvTablesInScopeRequest2, kvtablesInScopeResponse2);
    list = kvtablesInScopeResponse2.get().getKvtablesList();
    // check continuation token
    assertEquals(kvtablesInScopeResponse2.get().getStatus(), Controller.KVTablesInScopeResponse.Status.SUCCESS);
    assertFalse(Strings.isNullOrEmpty(kvtablesInScopeResponse2.get().getContinuationToken().getToken()));
    assertEquals(1, list.size());
    ResultObserver<Controller.KVTablesInScopeResponse> kvtablesInScopeResponse3 = new ResultObserver<>();
    Controller.KVTablesInScopeRequest kvTablesInScopeRequest3 = Controller.KVTablesInScopeRequest.newBuilder().setScope(scopeInfo).setContinuationToken(kvtablesInScopeResponse2.get().getContinuationToken()).build();
    this.controllerService.listKeyValueTablesInScope(kvTablesInScopeRequest3, kvtablesInScopeResponse3);
    list = kvtablesInScopeResponse3.get().getKvtablesList();
    // check continuation token
    assertEquals(kvtablesInScopeResponse3.get().getStatus(), Controller.KVTablesInScopeResponse.Status.SUCCESS);
    assertFalse(Strings.isNullOrEmpty(kvtablesInScopeResponse3.get().getContinuationToken().getToken()));
    assertEquals(0, list.size());
    List<Controller.KeyValueTableInfo> m = new LinkedList<>();
    m.addAll(kvtablesInScopeResponse1.get().getKvtablesList());
    m.addAll(kvtablesInScopeResponse2.get().getKvtablesList());
    m.addAll(kvtablesInScopeResponse3.get().getKvtablesList());
    // verify that all three streams have been found
    assertTrue(m.stream().anyMatch(x -> x.getKvtName().equals(KVTABLE1)));
    assertTrue(m.stream().anyMatch(x -> x.getKvtName().equals(KVTABLE2)));
    assertTrue(m.stream().anyMatch(x -> x.getKvtName().equals(KVTABLE3)));
    Controller.KVTablesInScopeRequest nonExistentScopeRequest = Controller.KVTablesInScopeRequest.newBuilder().setScope(ScopeInfo.newBuilder().setScope("NonExistent").build()).setContinuationToken(Controller.ContinuationToken.newBuilder().build()).build();
    ResultObserver<Controller.KVTablesInScopeResponse> nonExistentScopeResponse = new ResultObserver<>();
    this.controllerService.listKeyValueTablesInScope(nonExistentScopeRequest, nonExistentScopeResponse);
    assertEquals(Controller.KVTablesInScopeResponse.Status.SCOPE_NOT_FOUND, nonExistentScopeResponse.get().getStatus());
}
Also used : StreamCut(io.pravega.client.stream.StreamCut) ServerResponse(io.pravega.controller.stream.api.grpc.v1.Controller.ServerResponse) SneakyThrows(lombok.SneakyThrows) AssertExtensions(io.pravega.test.common.AssertExtensions) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) KeyValueTableConfiguration(io.pravega.client.tables.KeyValueTableConfiguration) SegmentRanges(io.pravega.controller.stream.api.grpc.v1.Controller.SegmentRanges) GetSegmentsRequest(io.pravega.controller.stream.api.grpc.v1.Controller.GetSegmentsRequest) StreamObserver(io.grpc.stub.StreamObserver) StoreException(io.pravega.controller.store.stream.StoreException) Stream(io.pravega.client.stream.Stream) Map(java.util.Map) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Status(io.grpc.Status) Controller(io.pravega.controller.stream.api.grpc.v1.Controller) ReaderGroupConfig(io.pravega.client.stream.ReaderGroupConfig) DeleteScopeStatus(io.pravega.controller.stream.api.grpc.v1.Controller.DeleteScopeStatus) CreateStreamStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateStreamStatus) ImmutableMap(com.google.common.collect.ImmutableMap) RequestTracker(io.pravega.common.tracing.RequestTracker) UUID(java.util.UUID) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) CreateTxnResponse(io.pravega.controller.stream.api.grpc.v1.Controller.CreateTxnResponse) Assert.assertFalse(org.junit.Assert.assertFalse) Futures(io.pravega.common.concurrent.Futures) GrpcAuthHelper(io.pravega.controller.server.security.auth.GrpcAuthHelper) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Segment(io.pravega.client.segment.impl.Segment) CreateReaderGroupResponse(io.pravega.controller.stream.api.grpc.v1.Controller.CreateReaderGroupResponse) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) CreateScopeStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateScopeStatus) NameUtils.computeSegmentId(io.pravega.shared.NameUtils.computeSegmentId) Exceptions(io.pravega.common.Exceptions) ModelHelper(io.pravega.client.control.impl.ModelHelper) ServerRequest(io.pravega.controller.stream.api.grpc.v1.Controller.ServerRequest) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ScopeInfo(io.pravega.controller.stream.api.grpc.v1.Controller.ScopeInfo) HashMap(java.util.HashMap) Mockito.spy(org.mockito.Mockito.spy) SuccessorResponse(io.pravega.controller.stream.api.grpc.v1.Controller.SuccessorResponse) UpdateSubscriberStatus(io.pravega.controller.stream.api.grpc.v1.Controller.UpdateSubscriberStatus) Strings(com.google.common.base.Strings) NodeUri(io.pravega.controller.stream.api.grpc.v1.Controller.NodeUri) ScaleRequest(io.pravega.controller.stream.api.grpc.v1.Controller.ScaleRequest) ReaderGroupConfiguration(io.pravega.controller.stream.api.grpc.v1.Controller.ReaderGroupConfiguration) DeleteKVTableStatus(io.pravega.controller.stream.api.grpc.v1.Controller.DeleteKVTableStatus) CreateTxnRequest(io.pravega.controller.stream.api.grpc.v1.Controller.CreateTxnRequest) StreamInfo(io.pravega.controller.stream.api.grpc.v1.Controller.StreamInfo) StreamCutImpl(io.pravega.client.stream.impl.StreamCutImpl) DeleteStreamStatus(io.pravega.controller.stream.api.grpc.v1.Controller.DeleteStreamStatus) Timeout(org.junit.rules.Timeout) LinkedList(java.util.LinkedList) ScaleResponse(io.pravega.controller.stream.api.grpc.v1.Controller.ScaleResponse) Before(org.junit.Before) ControllerService(io.pravega.controller.server.ControllerService) UpdateReaderGroupResponse(io.pravega.controller.stream.api.grpc.v1.Controller.UpdateReaderGroupResponse) NameUtils(io.pravega.shared.NameUtils) lombok.val(lombok.val) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) StatusRuntimeException(io.grpc.StatusRuntimeException) TimeUnit(java.util.concurrent.TimeUnit) Rule(org.junit.Rule) UpdateStreamStatus(io.pravega.controller.stream.api.grpc.v1.Controller.UpdateStreamStatus) SegmentsAtTime(io.pravega.controller.stream.api.grpc.v1.Controller.SegmentsAtTime) DeleteReaderGroupStatus(io.pravega.controller.stream.api.grpc.v1.Controller.DeleteReaderGroupStatus) CreateKeyValueTableStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateKeyValueTableStatus) Assert(org.junit.Assert) SegmentValidityResponse(io.pravega.controller.stream.api.grpc.v1.Controller.SegmentValidityResponse) ReaderGroupConfigResponse(io.pravega.controller.stream.api.grpc.v1.Controller.ReaderGroupConfigResponse) ScalingPolicy(io.pravega.client.stream.ScalingPolicy) Assert.assertEquals(org.junit.Assert.assertEquals) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) KeyValueTableConfiguration(io.pravega.client.tables.KeyValueTableConfiguration) ScopeInfo(io.pravega.controller.stream.api.grpc.v1.Controller.ScopeInfo) Controller(io.pravega.controller.stream.api.grpc.v1.Controller) LinkedList(java.util.LinkedList) CreateKeyValueTableStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateKeyValueTableStatus) CreateScopeStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateScopeStatus) Test(org.junit.Test)

Example 20 with KeyValueTableConfiguration

use of io.pravega.client.tables.KeyValueTableConfiguration in project pravega by pravega.

the class ControllerServiceTest method testControllerService.

@Test(timeout = 80000)
public void testControllerService() throws Exception {
    final String scope1 = "scope1";
    final String scope2 = "scope2";
    controllerWrapper.getControllerService().createScope("scope1", 0L).get();
    controllerWrapper.getControllerService().createScope("scope2", 0L).get();
    Controller controller = controllerWrapper.getController();
    final String streamName1 = "stream1";
    final String streamName2 = "stream2";
    final String streamName3 = "stream3";
    final ScalingPolicy scalingPolicy = ScalingPolicy.fixed(2);
    final StreamConfiguration config1 = StreamConfiguration.builder().scalingPolicy(scalingPolicy).build();
    final StreamConfiguration config2 = StreamConfiguration.builder().scalingPolicy(scalingPolicy).build();
    final StreamConfiguration config3 = StreamConfiguration.builder().scalingPolicy(ScalingPolicy.fixed(3)).build();
    createAStream(scope1, streamName1, controller, config1);
    // Same name in different scope
    createAStream(scope2, streamName1, controller, config2);
    // Different name in same scope
    createAStream(scope1, streamName2, controller, config3);
    createAStream(scope1, streamName3, controller, config3);
    final String kvtName1 = "kvtable1";
    final String kvtName2 = "kvtable2";
    final KeyValueTableConfiguration kvtConfig1 = KeyValueTableConfiguration.builder().partitionCount(2).primaryKeyLength(4).secondaryKeyLength(4).build();
    createAKeyValueTable(scope1, kvtName1, controller, kvtConfig1);
    // Same name in different scope
    createAKeyValueTable(scope2, kvtName1, controller, kvtConfig1);
    // Different name in different scope
    createAKeyValueTable(scope2, kvtName2, controller, kvtConfig1);
    final String scopeSeal = "scopeSeal";
    final String streamNameSeal = "streamSeal";
    sealAStream(controllerWrapper, controller, scalingPolicy, scopeSeal, streamNameSeal);
    sealASealedStream(controller, scopeSeal, streamNameSeal);
    sealNonExistantStream(controller, scopeSeal);
    streamDuplicationNotAllowed(scope1, streamName1, controller, config1);
    // update stream config section
    updateStreamName(controller, scope1, scalingPolicy);
    updateScalingPolicy(controller, scope1, streamName1);
    updateTargetRate(controller, scope1, streamName1);
    updateScaleFactor(controller, scope1, streamName1);
    updataMinSegmentes(controller, scope1, streamName1);
    updateConfigOfNonExistantStream(controller);
    // get currently active segments
    getActiveSegments(controller, scope1, streamName1);
    getActiveSegmentsForNonExistentStream(controller);
    // get positions at a given time stamp
    getSegmentsAtTime(controller, scope1, streamName1);
    getSegmentsAtTime(controller, scope1, streamName2);
    getSegmentsForNonExistentStream(controller);
    getSegmentsBeforeCreation(controller, scope1, streamName1);
    getSegmentsAfterCreation(controller, scope1, streamName1);
    readerGroupsTest(controller, scope1, streamName1, streamName2, streamName3);
    updateSubscriberStreamCutTest(controller, scope2, streamName1);
}
Also used : ScalingPolicy(io.pravega.client.stream.ScalingPolicy) KeyValueTableConfiguration(io.pravega.client.tables.KeyValueTableConfiguration) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) Controller(io.pravega.client.control.impl.Controller) Test(org.junit.Test)

Aggregations

KeyValueTableConfiguration (io.pravega.client.tables.KeyValueTableConfiguration)20 Test (org.junit.Test)16 Controller (io.pravega.controller.stream.api.grpc.v1.Controller)8 CreateKeyValueTableStatus (io.pravega.controller.stream.api.grpc.v1.Controller.CreateKeyValueTableStatus)8 StreamConfiguration (io.pravega.client.stream.StreamConfiguration)7 CreateScopeStatus (io.pravega.controller.stream.api.grpc.v1.Controller.CreateScopeStatus)7 DeleteKVTableStatus (io.pravega.controller.stream.api.grpc.v1.Controller.DeleteKVTableStatus)7 Exceptions (io.pravega.common.Exceptions)5 List (java.util.List)5 ClientConfig (io.pravega.client.ClientConfig)4 Controller (io.pravega.client.control.impl.Controller)4 ReaderGroupConfig (io.pravega.client.stream.ReaderGroupConfig)4 Futures (io.pravega.common.concurrent.Futures)4 UUID (java.util.UUID)4 CompletableFuture (java.util.concurrent.CompletableFuture)4 KeyValueTableManager (io.pravega.client.admin.KeyValueTableManager)3 StreamManager (io.pravega.client.admin.StreamManager)3 ConnectionFactory (io.pravega.client.connection.impl.ConnectionFactory)3 ConnectionPoolImpl (io.pravega.client.connection.impl.ConnectionPoolImpl)3 SocketConnectionFactoryImpl (io.pravega.client.connection.impl.SocketConnectionFactoryImpl)3