Search in sources :

Example 96 with Controller

use of io.pravega.client.control.impl.Controller in project pravega by pravega.

the class ControllerFailoverTest method failoverTest.

@Test
public void failoverTest() throws InterruptedException, ExecutionException {
    String scope = "testFailoverScope" + RandomStringUtils.randomAlphabetic(5);
    String stream = "testFailoverStream" + RandomStringUtils.randomAlphabetic(5);
    int initialSegments = 1;
    List<Long> segmentsToSeal = Collections.singletonList(0L);
    Map<Double, Double> newRangesToCreate = new HashMap<>();
    newRangesToCreate.put(0.0, 1.0);
    ClientConfig clientConfig = Utils.buildClientConfig(controllerURIDirect);
    // Connect with first controller instance.
    final Controller controller1 = new ControllerImpl(ControllerImplConfig.builder().clientConfig(clientConfig).build(), executorService);
    // Create scope, stream, and a transaction with high timeout value.
    controller1.createScope(scope).join();
    log.info("Scope {} created successfully", scope);
    createStream(controller1, scope, stream, ScalingPolicy.fixed(initialSegments));
    log.info("Stream {}/{} created successfully", scope, stream);
    long txnCreationTimestamp = System.nanoTime();
    StreamImpl stream1 = new StreamImpl(scope, stream);
    // Initiate scale operation. It will block until ongoing transaction is complete.
    controller1.startScale(stream1, segmentsToSeal, newRangesToCreate).join();
    // Now stop the controller instance executing scale operation.
    Futures.getAndHandleExceptions(controllerService.scaleService(0), ExecutionException::new);
    log.info("Successfully stopped one instance of controller service");
    // restart controller service
    Futures.getAndHandleExceptions(controllerService.scaleService(1), ExecutionException::new);
    log.info("Successfully stopped one instance of controller service");
    List<URI> controllerUris = controllerService.getServiceDetails();
    // Fetch all the RPC endpoints and construct the client URIs.
    final List<String> uris = controllerUris.stream().filter(ISGRPC).map(URI::getAuthority).collect(Collectors.toList());
    controllerURIDirect = URI.create((Utils.TLS_AND_AUTH_ENABLED ? TLS : TCP) + String.join(",", uris));
    log.info("Controller Service direct URI: {}", controllerURIDirect);
    ClientConfig clientConf = Utils.buildClientConfig(controllerURIDirect);
    // Connect to another controller instance.
    @Cleanup final Controller controller2 = new ControllerImpl(ControllerImplConfig.builder().clientConfig(clientConf).build(), executorService);
    // Note: if scale does not complete within desired time, test will timeout.
    boolean scaleStatus = controller2.checkScaleStatus(stream1, 0).join();
    while (!scaleStatus) {
        scaleStatus = controller2.checkScaleStatus(stream1, 0).join();
        Thread.sleep(30000);
    }
    segmentsToSeal = Collections.singletonList(NameUtils.computeSegmentId(1, 1));
    newRangesToCreate = new HashMap<>();
    newRangesToCreate.put(0.0, 0.5);
    newRangesToCreate.put(0.5, 1.0);
    controller2.scaleStream(stream1, segmentsToSeal, newRangesToCreate, executorService).getFuture().join();
    log.info("Checking whether scale operation succeeded by fetching current segments");
    StreamSegments streamSegments = controller2.getCurrentSegments(scope, stream).join();
    log.info("Current segment count= {}", streamSegments.getSegments().size());
    Assert.assertEquals(2, streamSegments.getSegments().size());
}
Also used : HashMap(java.util.HashMap) ControllerImpl(io.pravega.client.control.impl.ControllerImpl) Controller(io.pravega.client.control.impl.Controller) URI(java.net.URI) Cleanup(lombok.Cleanup) StreamImpl(io.pravega.client.stream.impl.StreamImpl) ClientConfig(io.pravega.client.ClientConfig) ExecutionException(java.util.concurrent.ExecutionException) StreamSegments(io.pravega.client.stream.impl.StreamSegments) Test(org.junit.Test)

Example 97 with Controller

use of io.pravega.client.control.impl.Controller in project pravega by pravega.

the class ReadWithAutoScaleTest method scaleTestsWithReader.

@Test
public void scaleTestsWithReader() {
    URI controllerUri = getControllerURI();
    Controller controller = getController();
    testState = new TestState(true);
    final AtomicBoolean stopWriteFlag = new AtomicBoolean(false);
    final AtomicBoolean stopReadFlag = new AtomicBoolean(false);
    @Cleanup EventStreamClientFactory clientFactory = getClientFactory();
    // 1. Start writing events to the Stream.
    List<CompletableFuture<Void>> writers = new ArrayList<>();
    writers.add(startWritingIntoTxn(clientFactory.createTransactionalEventWriter("initWriter", STREAM_NAME, new JavaSerializer<>(), EventWriterConfig.builder().transactionTimeoutTime(25000).build()), stopWriteFlag));
    // 2. Start a reader group with 2 readers (The stream is configured with 2 segments.)
    // 2.1 Create a reader group.
    log.info("Creating Reader group : {}", READER_GROUP_NAME);
    @Cleanup ReaderGroupManager readerGroupManager = ReaderGroupManager.withScope(SCOPE, Utils.buildClientConfig(controllerUri));
    readerGroupManager.createReaderGroup(READER_GROUP_NAME, ReaderGroupConfig.builder().stream(Stream.of(SCOPE, STREAM_NAME)).build());
    // 2.2 Create readers.
    CompletableFuture<Void> reader1 = startReading(clientFactory.createReader("reader1", READER_GROUP_NAME, new JavaSerializer<>(), ReaderConfig.builder().build()), stopReadFlag);
    CompletableFuture<Void> reader2 = startReading(clientFactory.createReader("reader2", READER_GROUP_NAME, new JavaSerializer<>(), ReaderConfig.builder().build()), stopReadFlag);
    // 3 Now increase the number of TxnWriters to trigger scale operation.
    log.info("Increasing the number of writers to 6");
    for (int i = 0; i < 5; i++) {
        writers.add(startWritingIntoTxn(clientFactory.createTransactionalEventWriter("writer-" + i, STREAM_NAME, new JavaSerializer<>(), EventWriterConfig.builder().transactionTimeoutTime(25000).build()), stopWriteFlag));
    }
    // 4 Wait until the scale operation is triggered (else time out)
    // validate the data read by the readers ensuring all the events are read and there are no duplicates.
    CompletableFuture<Void> testResult = Retry.withExpBackoff(10, 10, 40, ofSeconds(10).toMillis()).retryingOn(ScaleOperationNotDoneException.class).throwingOn(RuntimeException.class).runAsync(() -> controller.getCurrentSegments(SCOPE, STREAM_NAME).thenAccept(x -> {
        int currentNumOfSegments = x.getSegments().size();
        if (currentNumOfSegments == 2) {
            log.info("The current number of segments is equal to 2, ScaleOperation did not happen");
            // Scaling operation did not happen, retry operation.
            throw new ScaleOperationNotDoneException();
        } else if (currentNumOfSegments > 2) {
            // scale operation successful.
            log.info("Current Number of segments is {}", currentNumOfSegments);
            stopWriteFlag.set(true);
        } else {
            Assert.fail("Current number of Segments reduced to less than 2. Failure of test");
        }
    }), scaleExecutorService).thenCompose(v -> Futures.allOf(writers)).thenRun(this::waitForTxnsToComplete).thenCompose(v -> {
        stopReadFlag.set(true);
        log.info("All writers have stopped. Setting Stop_Read_Flag. Event Written Count:{}, Event Read " + "Count: {}", testState.writtenEvents, testState.readEvents);
        return CompletableFuture.allOf(reader1, reader2);
    }).thenRun(this::validateResults);
    Futures.getAndHandleExceptions(testResult.whenComplete((r, e) -> {
        recordResult(testResult, "ScaleUpWithTxnWithReaderGroup");
    }), RuntimeException::new);
    readerGroupManager.deleteReaderGroup(READER_GROUP_NAME);
}
Also used : Retry(io.pravega.common.util.Retry) URISyntaxException(java.net.URISyntaxException) RunWith(org.junit.runner.RunWith) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Cleanup(lombok.Cleanup) CompletableFuture(java.util.concurrent.CompletableFuture) JavaSerializer(io.pravega.client.stream.impl.JavaSerializer) Duration.ofSeconds(java.time.Duration.ofSeconds) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) ArrayList(java.util.ArrayList) ReaderGroupManager(io.pravega.client.admin.ReaderGroupManager) Stream(io.pravega.client.stream.Stream) After(org.junit.After) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) Timeout(org.junit.rules.Timeout) EventStreamClientFactory(io.pravega.client.EventStreamClientFactory) URI(java.net.URI) Utils(io.pravega.test.system.framework.Utils) ReaderGroupConfig(io.pravega.client.stream.ReaderGroupConfig) Before(org.junit.Before) EventWriterConfig(io.pravega.client.stream.EventWriterConfig) Environment(io.pravega.test.system.framework.Environment) Test(org.junit.Test) ExecutionException(java.util.concurrent.ExecutionException) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) Rule(org.junit.Rule) ReaderConfig(io.pravega.client.stream.ReaderConfig) ExecutorServiceHelpers(io.pravega.common.concurrent.ExecutorServiceHelpers) RandomFactory(io.pravega.common.hash.RandomFactory) Assert(org.junit.Assert) Controller(io.pravega.client.control.impl.Controller) ScalingPolicy(io.pravega.client.stream.ScalingPolicy) Futures(io.pravega.common.concurrent.Futures) SystemTestRunner(io.pravega.test.system.framework.SystemTestRunner) ReaderGroupManager(io.pravega.client.admin.ReaderGroupManager) ArrayList(java.util.ArrayList) EventStreamClientFactory(io.pravega.client.EventStreamClientFactory) Controller(io.pravega.client.control.impl.Controller) URI(java.net.URI) Cleanup(lombok.Cleanup) JavaSerializer(io.pravega.client.stream.impl.JavaSerializer) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) CompletableFuture(java.util.concurrent.CompletableFuture) Test(org.junit.Test)

Example 98 with Controller

use of io.pravega.client.control.impl.Controller in project pravega by pravega.

the class LargeEventWriter method writeLargeEvent.

/**
 * Write the provided list of events (atomically) to the provided segment.
 *
 * @param segment The segment to write to
 * @param events The events to append
 * @param tokenProvider A token provider
 * @param config Used for retry configuration parameters
 * @throws NoSuchSegmentException If the provided segment does not exit.
 * @throws SegmentSealedException If the segment is sealed.
 * @throws AuthenticationException If the token can't be used for this segment.
 * @throws UnsupportedOperationException If the server does not support large events.
 */
public void writeLargeEvent(Segment segment, List<ByteBuffer> events, DelegationTokenProvider tokenProvider, EventWriterConfig config) throws NoSuchSegmentException, AuthenticationException, SegmentSealedException {
    List<ByteBuf> payloads = createBufs(events);
    int attempts = 1 + Math.max(0, config.getRetryAttempts());
    Retry.withExpBackoff(config.getInitialBackoffMillis(), config.getBackoffMultiple(), attempts, config.getMaxBackoffMillis()).retryWhen(t -> {
        Throwable ex = Exceptions.unwrap(t);
        if (ex instanceof ConnectionFailedException) {
            log.info("Connection failure while sending large event: {}. Retrying", ex.getMessage());
            return true;
        } else if (ex instanceof TokenExpiredException) {
            tokenProvider.signalTokenExpired();
            log.info("Authentication token expired while writing large event to segment {}. Retrying", segment);
            return true;
        } else {
            return false;
        }
    }).run(() -> {
        @Cleanup RawClient client = new RawClient(controller, connectionPool, segment);
        write(segment, payloads, client, tokenProvider);
        return null;
    });
}
Also used : Segment(io.pravega.client.segment.impl.Segment) TokenExpiredException(io.pravega.auth.TokenExpiredException) Retry(io.pravega.common.util.Retry) ConnectionFailedException(io.pravega.shared.protocol.netty.ConnectionFailedException) Reply(io.pravega.shared.protocol.netty.Reply) Exceptions(io.pravega.common.Exceptions) ConditionalCheckFailed(io.pravega.shared.protocol.netty.WireCommands.ConditionalCheckFailed) RequiredArgsConstructor(lombok.RequiredArgsConstructor) SegmentIsTruncated(io.pravega.shared.protocol.netty.WireCommands.SegmentIsTruncated) Cleanup(lombok.Cleanup) CompletableFuture(java.util.concurrent.CompletableFuture) SegmentSealedException(io.pravega.client.segment.impl.SegmentSealedException) ByteBuffer(java.nio.ByteBuffer) Unpooled(io.netty.buffer.Unpooled) CreateTransientSegment(io.pravega.shared.protocol.netty.WireCommands.CreateTransientSegment) ArrayList(java.util.ArrayList) RawClient(io.pravega.client.connection.impl.RawClient) ConditionalBlockEnd(io.pravega.shared.protocol.netty.WireCommands.ConditionalBlockEnd) SetupAppend(io.pravega.shared.protocol.netty.WireCommands.SetupAppend) ByteBuf(io.netty.buffer.ByteBuf) AuthTokenCheckFailed(io.pravega.shared.protocol.netty.WireCommands.AuthTokenCheckFailed) MergeSegments(io.pravega.shared.protocol.netty.WireCommands.MergeSegments) SegmentCreated(io.pravega.shared.protocol.netty.WireCommands.SegmentCreated) Futures.getThrowingException(io.pravega.common.concurrent.Futures.getThrowingException) WireCommandType(io.pravega.shared.protocol.netty.WireCommandType) Nonnull(javax.annotation.Nonnull) SegmentAlreadyExists(io.pravega.shared.protocol.netty.WireCommands.SegmentAlreadyExists) EventWriterConfig(io.pravega.client.stream.EventWriterConfig) Serializer(io.pravega.client.stream.Serializer) SegmentsMerged(io.pravega.shared.protocol.netty.WireCommands.SegmentsMerged) ConnectionPool(io.pravega.client.connection.impl.ConnectionPool) NoSuchSegmentException(io.pravega.client.segment.impl.NoSuchSegmentException) AppendSetup(io.pravega.shared.protocol.netty.WireCommands.AppendSetup) lombok.val(lombok.val) AuthenticationException(io.pravega.auth.AuthenticationException) UUID(java.util.UUID) WireCommands(io.pravega.shared.protocol.netty.WireCommands) WrongHost(io.pravega.shared.protocol.netty.WireCommands.WrongHost) DelegationTokenProvider(io.pravega.client.security.auth.DelegationTokenProvider) InvalidEventNumber(io.pravega.shared.protocol.netty.WireCommands.InvalidEventNumber) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) OperationUnsupported(io.pravega.shared.protocol.netty.WireCommands.OperationUnsupported) VisibleForTesting(com.google.common.annotations.VisibleForTesting) DataAppended(io.pravega.shared.protocol.netty.WireCommands.DataAppended) SegmentIsSealed(io.pravega.shared.protocol.netty.WireCommands.SegmentIsSealed) Controller(io.pravega.client.control.impl.Controller) TokenExpiredException(io.pravega.auth.TokenExpiredException) RawClient(io.pravega.client.connection.impl.RawClient) ByteBuf(io.netty.buffer.ByteBuf) ConnectionFailedException(io.pravega.shared.protocol.netty.ConnectionFailedException) Cleanup(lombok.Cleanup)

Example 99 with Controller

use of io.pravega.client.control.impl.Controller in project pravega by pravega.

the class EndToEndTransactionOrderTest method waitTillCommitted.

private CompletableFuture<Void> waitTillCommitted(Controller controller, Stream s, UUID key, ConcurrentSkipListSet<UUID> uncommitted) {
    AtomicBoolean committed = new AtomicBoolean(false);
    AtomicInteger counter = new AtomicInteger(0);
    // check 6 times with 5 second gap until transaction is committed. if it is not committed, declare it uncommitted
    return Futures.loop(() -> !committed.get() && counter.getAndIncrement() < 5, () -> Futures.delayedFuture(() -> controller.checkTransactionStatus(s, key).thenAccept(status -> {
        committed.set(status.equals(Transaction.Status.COMMITTED));
    }), 5000, executor), executor).thenAccept(v -> {
        if (!committed.get()) {
            uncommitted.add(key);
        }
    });
}
Also used : TableStore(io.pravega.segmentstore.contracts.tables.TableStore) AutoScaleMonitor(io.pravega.segmentstore.server.host.stat.AutoScaleMonitor) ReaderGroupManagerImpl(io.pravega.client.admin.impl.ReaderGroupManagerImpl) Cleanup(lombok.Cleanup) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) ServiceBuilderConfig(io.pravega.segmentstore.server.store.ServiceBuilderConfig) EventRead(io.pravega.client.stream.EventRead) ServiceBuilder(io.pravega.segmentstore.server.store.ServiceBuilder) ClientFactoryImpl(io.pravega.client.stream.impl.ClientFactoryImpl) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ReaderGroupManager(io.pravega.client.admin.ReaderGroupManager) Stream(io.pravega.client.stream.Stream) Duration(java.time.Duration) Map(java.util.Map) After(org.junit.After) PravegaConnectionListener(io.pravega.segmentstore.server.host.handler.PravegaConnectionListener) Transaction(io.pravega.client.stream.Transaction) Triple(org.apache.commons.lang3.tuple.Triple) ReaderGroupConfig(io.pravega.client.stream.ReaderGroupConfig) StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) AutoScalerConfig(io.pravega.segmentstore.server.host.stat.AutoScalerConfig) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) CompletionException(java.util.concurrent.CompletionException) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) IntegerSerializer(io.pravega.test.integration.utils.IntegerSerializer) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) Config(io.pravega.controller.util.Config) TestUtils(io.pravega.test.common.TestUtils) ControllerWrapper(io.pravega.test.integration.demo.ControllerWrapper) Controller(io.pravega.client.control.impl.Controller) MockClientFactory(io.pravega.client.stream.mock.MockClientFactory) Futures(io.pravega.common.concurrent.Futures) ConnectionFactory(io.pravega.client.connection.impl.ConnectionFactory) StreamImpl(io.pravega.client.stream.impl.StreamImpl) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) TestingServerStarter(io.pravega.test.common.TestingServerStarter) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) TestingServer(org.apache.curator.test.TestingServer) LinkedList(java.util.LinkedList) SocketConnectionFactoryImpl(io.pravega.client.connection.impl.SocketConnectionFactoryImpl) TransactionalEventStreamWriter(io.pravega.client.stream.TransactionalEventStreamWriter) Before(org.junit.Before) EventWriterConfig(io.pravega.client.stream.EventWriterConfig) NameUtils(io.pravega.shared.NameUtils) ImmutableTriple(org.apache.commons.lang3.tuple.ImmutableTriple) Assert.assertTrue(org.junit.Assert.assertTrue) EventStreamReader(io.pravega.client.stream.EventStreamReader) Test(org.junit.Test) SecurityConfigDefaults(io.pravega.test.common.SecurityConfigDefaults) ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) Ignore(org.junit.Ignore) ReaderConfig(io.pravega.client.stream.ReaderConfig) ExecutorServiceHelpers(io.pravega.common.concurrent.ExecutorServiceHelpers) Collections(java.util.Collections) ScalingPolicy(io.pravega.client.stream.ScalingPolicy) SECONDS(java.util.concurrent.TimeUnit.SECONDS) Assert.assertEquals(org.junit.Assert.assertEquals) ClientConfig(io.pravega.client.ClientConfig) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) AtomicInteger(java.util.concurrent.atomic.AtomicInteger)

Example 100 with Controller

use of io.pravega.client.control.impl.Controller in project pravega by pravega.

the class EndToEndTransactionOrderTest method testOrder.

@Ignore
@Test(timeout = 100000)
public void testOrder() throws Exception {
    final AtomicBoolean done = new AtomicBoolean(false);
    CompletableFuture<Void> writer1 = startWriter("1", clientFactory, done);
    CompletableFuture<Void> writer2 = startWriter("2", clientFactory, done);
    CompletableFuture<Void> writer3 = startWriter("3", clientFactory, done);
    CompletableFuture<Void> writer4 = startWriter("4", clientFactory, done);
    // perform multiple scale stream operations so that rolling transactions may happen
    Stream s = new StreamImpl("test", "test");
    Map<Double, Double> map = new HashMap<>();
    map.put(0.0, 1.0);
    @Cleanup("shutdownNow") ScheduledExecutorService executor = ExecutorServiceHelpers.newScheduledThreadPool(1, "order");
    controller.scaleStream(s, Collections.singletonList(0L), map, executor).getFuture().get();
    controller.scaleStream(s, Collections.singletonList(NameUtils.computeSegmentId(1, 1)), map, executor).getFuture().get();
    controller.scaleStream(s, Collections.singletonList(NameUtils.computeSegmentId(2, 2)), map, executor).getFuture().get();
    // stop writers
    done.set(true);
    CompletableFuture.allOf(writer1, writer2, writer3, writer4).join();
    // wait for all transactions to commit
    Futures.allOf(eventToTxnMap.entrySet().stream().map(x -> waitTillCommitted(controller, s, x.getValue(), uncommitted)).collect(Collectors.toList())).join();
    assertTrue(uncommitted.isEmpty());
    // read all events using a single reader and verify the order
    List<Triple<Integer, UUID, String>> eventOrder = new LinkedList<>();
    // create a reader
    while (!eventToTxnMap.isEmpty()) {
        EventRead<Integer> integerEventRead = reader.readNextEvent(SECONDS.toMillis(60));
        if (integerEventRead.getEvent() != null) {
            int event1 = integerEventRead.getEvent();
            UUID txnId = eventToTxnMap.remove(event1);
            String writerId = txnToWriter.get(txnId);
            UUID first = writersList.get(writerId).remove(0);
            eventOrder.add(new ImmutableTriple<>(event1, txnId, writerId));
            assertEquals(first, txnId);
        }
    }
}
Also used : TableStore(io.pravega.segmentstore.contracts.tables.TableStore) AutoScaleMonitor(io.pravega.segmentstore.server.host.stat.AutoScaleMonitor) ReaderGroupManagerImpl(io.pravega.client.admin.impl.ReaderGroupManagerImpl) Cleanup(lombok.Cleanup) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) ServiceBuilderConfig(io.pravega.segmentstore.server.store.ServiceBuilderConfig) EventRead(io.pravega.client.stream.EventRead) ServiceBuilder(io.pravega.segmentstore.server.store.ServiceBuilder) ClientFactoryImpl(io.pravega.client.stream.impl.ClientFactoryImpl) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ReaderGroupManager(io.pravega.client.admin.ReaderGroupManager) Stream(io.pravega.client.stream.Stream) Duration(java.time.Duration) Map(java.util.Map) After(org.junit.After) PravegaConnectionListener(io.pravega.segmentstore.server.host.handler.PravegaConnectionListener) Transaction(io.pravega.client.stream.Transaction) Triple(org.apache.commons.lang3.tuple.Triple) ReaderGroupConfig(io.pravega.client.stream.ReaderGroupConfig) StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) AutoScalerConfig(io.pravega.segmentstore.server.host.stat.AutoScalerConfig) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) CompletionException(java.util.concurrent.CompletionException) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) IntegerSerializer(io.pravega.test.integration.utils.IntegerSerializer) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) Config(io.pravega.controller.util.Config) TestUtils(io.pravega.test.common.TestUtils) ControllerWrapper(io.pravega.test.integration.demo.ControllerWrapper) Controller(io.pravega.client.control.impl.Controller) MockClientFactory(io.pravega.client.stream.mock.MockClientFactory) Futures(io.pravega.common.concurrent.Futures) ConnectionFactory(io.pravega.client.connection.impl.ConnectionFactory) StreamImpl(io.pravega.client.stream.impl.StreamImpl) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) TestingServerStarter(io.pravega.test.common.TestingServerStarter) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) TestingServer(org.apache.curator.test.TestingServer) LinkedList(java.util.LinkedList) SocketConnectionFactoryImpl(io.pravega.client.connection.impl.SocketConnectionFactoryImpl) TransactionalEventStreamWriter(io.pravega.client.stream.TransactionalEventStreamWriter) Before(org.junit.Before) EventWriterConfig(io.pravega.client.stream.EventWriterConfig) NameUtils(io.pravega.shared.NameUtils) ImmutableTriple(org.apache.commons.lang3.tuple.ImmutableTriple) Assert.assertTrue(org.junit.Assert.assertTrue) EventStreamReader(io.pravega.client.stream.EventStreamReader) Test(org.junit.Test) SecurityConfigDefaults(io.pravega.test.common.SecurityConfigDefaults) ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) Ignore(org.junit.Ignore) ReaderConfig(io.pravega.client.stream.ReaderConfig) ExecutorServiceHelpers(io.pravega.common.concurrent.ExecutorServiceHelpers) Collections(java.util.Collections) ScalingPolicy(io.pravega.client.stream.ScalingPolicy) SECONDS(java.util.concurrent.TimeUnit.SECONDS) Assert.assertEquals(org.junit.Assert.assertEquals) ClientConfig(io.pravega.client.ClientConfig) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) Cleanup(lombok.Cleanup) LinkedList(java.util.LinkedList) Triple(org.apache.commons.lang3.tuple.Triple) ImmutableTriple(org.apache.commons.lang3.tuple.ImmutableTriple) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) StreamImpl(io.pravega.client.stream.impl.StreamImpl) Stream(io.pravega.client.stream.Stream) UUID(java.util.UUID) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Controller (io.pravega.client.control.impl.Controller)120 Test (org.junit.Test)95 Cleanup (lombok.Cleanup)81 Segment (io.pravega.client.segment.impl.Segment)53 EventWriterConfig (io.pravega.client.stream.EventWriterConfig)50 StreamConfiguration (io.pravega.client.stream.StreamConfiguration)47 Stream (io.pravega.client.stream.Stream)37 CompletableFuture (java.util.concurrent.CompletableFuture)35 SegmentOutputStreamFactory (io.pravega.client.segment.impl.SegmentOutputStreamFactory)34 SocketConnectionFactoryImpl (io.pravega.client.connection.impl.SocketConnectionFactoryImpl)33 HashMap (java.util.HashMap)29 ClientConfig (io.pravega.client.ClientConfig)28 ClientFactoryImpl (io.pravega.client.stream.impl.ClientFactoryImpl)28 StreamImpl (io.pravega.client.stream.impl.StreamImpl)25 ReaderGroupManager (io.pravega.client.admin.ReaderGroupManager)24 Slf4j (lombok.extern.slf4j.Slf4j)24 Before (org.junit.Before)23 ConnectionFactory (io.pravega.client.connection.impl.ConnectionFactory)22 ConnectionPoolImpl (io.pravega.client.connection.impl.ConnectionPoolImpl)21 ScalingPolicy (io.pravega.client.stream.ScalingPolicy)21