Search in sources :

Example 1 with Controller

use of io.pravega.controller.stream.api.grpc.v1.Controller in project pravega by pravega.

the class ControllerImpl method getSegmentsAtTime.

@Override
public CompletableFuture<Map<Segment, Long>> getSegmentsAtTime(final Stream stream, final long timestamp) {
    Exceptions.checkNotClosed(closed.get(), this);
    Preconditions.checkNotNull(stream, "stream");
    long traceId = LoggerHelpers.traceEnter(log, "getSegmentsAtTime", stream, timestamp);
    final CompletableFuture<SegmentsAtTime> result = this.retryConfig.runAsync(() -> {
        RPCAsyncCallback<SegmentsAtTime> callback = new RPCAsyncCallback<>();
        StreamInfo streamInfo = ModelHelper.createStreamInfo(stream.getScope(), stream.getStreamName());
        GetSegmentsRequest request = GetSegmentsRequest.newBuilder().setStreamInfo(streamInfo).setTimestamp(timestamp).build();
        client.getSegments(request, callback);
        return callback.getFuture();
    }, this.executor);
    return result.thenApply(segments -> {
        log.debug("Received the following data from the controller {}", segments.getSegmentsList());
        return segments.getSegmentsList().stream().collect(Collectors.toMap(location -> ModelHelper.encode(location.getSegmentId()), location -> location.getOffset()));
    }).whenComplete((x, e) -> {
        if (e != null) {
            log.warn("getSegmentsAtTime failed: ", e);
        }
        LoggerHelpers.traceLeave(log, "getSegmentsAtTime", traceId);
    });
}
Also used : StreamCut(io.pravega.client.stream.StreamCut) ManagedChannel(io.grpc.ManagedChannel) Retry(io.pravega.common.util.Retry) NegotiationType(io.grpc.netty.NegotiationType) MoreCallCredentials(io.grpc.auth.MoreCallCredentials) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) PingTxnRequest(io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnRequest) 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) Stream(io.pravega.client.stream.Stream) Map(java.util.Map) Collectors.summarizingInt(java.util.stream.Collectors.summarizingInt) PravegaNodeUri(io.pravega.shared.protocol.netty.PravegaNodeUri) Transaction(io.pravega.client.stream.Transaction) DeleteScopeStatus(io.pravega.controller.stream.api.grpc.v1.Controller.DeleteScopeStatus) CreateStreamStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateStreamStatus) Collection(java.util.Collection) Set(java.util.Set) CompletionException(java.util.concurrent.CompletionException) UUID(java.util.UUID) NavigableMap(java.util.NavigableMap) Collectors(java.util.stream.Collectors) List(java.util.List) SSLException(javax.net.ssl.SSLException) Slf4j(lombok.extern.slf4j.Slf4j) CreateTxnResponse(io.pravega.controller.stream.api.grpc.v1.Controller.CreateTxnResponse) PingTxnStatus(io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnStatus) Futures(io.pravega.common.concurrent.Futures) Segment(io.pravega.client.segment.impl.Segment) CreateScopeStatus(io.pravega.controller.stream.api.grpc.v1.Controller.CreateScopeStatus) ScaleStatusRequest(io.pravega.controller.stream.api.grpc.v1.Controller.ScaleStatusRequest) Exceptions(io.pravega.common.Exceptions) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ScaleStatusResponse(io.pravega.controller.stream.api.grpc.v1.Controller.ScaleStatusResponse) ScopeInfo(io.pravega.controller.stream.api.grpc.v1.Controller.ScopeInfo) TxnState(io.pravega.controller.stream.api.grpc.v1.Controller.TxnState) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) SuccessorResponse(io.pravega.controller.stream.api.grpc.v1.Controller.SuccessorResponse) PingFailedException(io.pravega.client.stream.PingFailedException) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) 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) CreateTxnRequest(io.pravega.controller.stream.api.grpc.v1.Controller.CreateTxnRequest) StreamInfo(io.pravega.controller.stream.api.grpc.v1.Controller.StreamInfo) DeleteStreamStatus(io.pravega.controller.stream.api.grpc.v1.Controller.DeleteStreamStatus) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) ControllerServiceGrpc(io.pravega.controller.stream.api.grpc.v1.ControllerServiceGrpc) ScaleResponse(io.pravega.controller.stream.api.grpc.v1.Controller.ScaleResponse) LoggerHelpers(io.pravega.common.LoggerHelpers) Futures.getAndHandleExceptions(io.pravega.common.concurrent.Futures.getAndHandleExceptions) lombok.val(lombok.val) SegmentRange(io.pravega.controller.stream.api.grpc.v1.Controller.SegmentRange) File(java.io.File) StatusRuntimeException(io.grpc.StatusRuntimeException) NettyChannelBuilder(io.grpc.netty.NettyChannelBuilder) TimeUnit(java.util.concurrent.TimeUnit) ManagedChannelBuilder(io.grpc.ManagedChannelBuilder) TreeMap(java.util.TreeMap) UpdateStreamStatus(io.pravega.controller.stream.api.grpc.v1.Controller.UpdateStreamStatus) TxnStatus(io.pravega.controller.stream.api.grpc.v1.Controller.TxnStatus) SslContextBuilder(io.netty.handler.ssl.SslContextBuilder) InvalidStreamException(io.pravega.client.stream.InvalidStreamException) Preconditions(com.google.common.base.Preconditions) RoundRobinLoadBalancerFactory(io.grpc.util.RoundRobinLoadBalancerFactory) SegmentsAtTime(io.pravega.controller.stream.api.grpc.v1.Controller.SegmentsAtTime) VisibleForTesting(com.google.common.annotations.VisibleForTesting) TxnFailedException(io.pravega.client.stream.TxnFailedException) TxnRequest(io.pravega.controller.stream.api.grpc.v1.Controller.TxnRequest) ArrayDeque(java.util.ArrayDeque) SegmentValidityResponse(io.pravega.controller.stream.api.grpc.v1.Controller.SegmentValidityResponse) Collections(java.util.Collections) GrpcSslContexts(io.grpc.netty.GrpcSslContexts) GetSegmentsRequest(io.pravega.controller.stream.api.grpc.v1.Controller.GetSegmentsRequest) StreamInfo(io.pravega.controller.stream.api.grpc.v1.Controller.StreamInfo) SegmentsAtTime(io.pravega.controller.stream.api.grpc.v1.Controller.SegmentsAtTime)

Example 2 with Controller

use of io.pravega.controller.stream.api.grpc.v1.Controller in project pravega by pravega.

the class StreamTransactionMetadataTasks method createTxnBody.

/**
 * Creates txn on the specified stream.
 *
 * Post-condition:
 * 1. If txn creation succeeds, then
 *     (a) txn node is created in the store,
 *     (b) txn segments are successfully created on respective segment stores,
 *     (c) txn is present in the host-txn index of current host,
 *     (d) txn's timeout is being tracked in timeout service.
 *
 * 2. If process fails after creating txn node, but before responding to the client, then since txn is
 * present in the host-txn index, some other controller process shall abort the txn after maxLeaseValue
 *
 * 3. If timeout service tracks timeout of specified txn,
 * then txn is also present in the host-txn index of current process.
 *
 * Invariant:
 * The following invariants are maintained throughout the execution of createTxn, pingTxn and sealTxn methods.
 * 1. If timeout service tracks timeout of a txn, then txn is also present in the host-txn index of current process.
 * 2. If txn znode is updated, then txn is also present in the host-txn index of current process.
 *
 * @param scope               scope name.
 * @param stream              stream name.
 * @param lease               txn lease.
 * @param scaleGracePeriod    amount of time for which txn may remain open after scale operation is initiated.
 * @param ctx                 context.
 * @return                    identifier of the created txn.
 */
CompletableFuture<Pair<VersionedTransactionData, List<Segment>>> createTxnBody(final String scope, final String stream, final long lease, final long scaleGracePeriod, final OperationContext ctx) {
    // Step 1. Validate parameters.
    CompletableFuture<Void> validate = validate(lease, scaleGracePeriod);
    long maxExecutionPeriod = Math.min(MAX_EXECUTION_TIME_MULTIPLIER * lease, Duration.ofDays(1).toMillis());
    UUID txnId = UUID.randomUUID();
    TxnResource resource = new TxnResource(scope, stream, txnId);
    // Step 2. Add txn to host-transaction index.
    CompletableFuture<Void> addIndex = validate.thenComposeAsync(ignore -> streamMetadataStore.addTxnToIndex(hostId, resource, 0), executor).whenComplete((v, e) -> {
        if (e != null) {
            log.debug("Txn={}, failed adding txn to host-txn index of host={}", txnId, hostId);
        } else {
            log.debug("Txn={}, added txn to host-txn index of host={}", txnId, hostId);
        }
    });
    // Step 3. Create txn node in the store.
    CompletableFuture<VersionedTransactionData> txnFuture = addIndex.thenComposeAsync(ignore -> streamMetadataStore.createTransaction(scope, stream, txnId, lease, maxExecutionPeriod, scaleGracePeriod, ctx, executor), executor).whenComplete((v, e) -> {
        if (e != null) {
            log.debug("Txn={}, failed creating txn in store", txnId);
        } else {
            log.debug("Txn={}, created in store", txnId);
        }
    });
    // Step 4. Notify segment stores about new txn.
    CompletableFuture<List<Segment>> segmentsFuture = txnFuture.thenComposeAsync(txnData -> streamMetadataStore.getActiveSegments(scope, stream, txnData.getEpoch(), ctx, executor), executor);
    CompletableFuture<Void> notify = segmentsFuture.thenComposeAsync(activeSegments -> notifyTxnCreation(scope, stream, activeSegments, txnId), executor).whenComplete((v, e) -> log.debug("Txn={}, notified segments stores", txnId));
    // Step 5. Start tracking txn in timeout service
    return notify.whenCompleteAsync((result, ex) -> {
        int version = 0;
        long executionExpiryTime = System.currentTimeMillis() + maxExecutionPeriod;
        if (!txnFuture.isCompletedExceptionally()) {
            version = txnFuture.join().getVersion();
            executionExpiryTime = txnFuture.join().getMaxExecutionExpiryTime();
        }
        timeoutService.addTxn(scope, stream, txnId, version, lease, executionExpiryTime, scaleGracePeriod);
        log.debug("Txn={}, added to timeout service on host={}", txnId, hostId);
    }, executor).thenApplyAsync(v -> new ImmutablePair<>(txnFuture.join(), segmentsFuture.join()), executor);
}
Also used : CommitEvent(io.pravega.shared.controller.event.CommitEvent) OperationContext(io.pravega.controller.store.stream.OperationContext) ControllerEventProcessors(io.pravega.controller.server.eventProcessor.ControllerEventProcessors) Getter(lombok.Getter) EventStreamWriter(io.pravega.client.stream.EventStreamWriter) SegmentHelper(io.pravega.controller.server.SegmentHelper) PravegaInterceptor(io.pravega.controller.server.rpc.auth.PravegaInterceptor) CompletableFuture(java.util.concurrent.CompletableFuture) TimeoutServiceConfig(io.pravega.controller.timeout.TimeoutServiceConfig) Status(io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnStatus.Status) AbortEvent(io.pravega.shared.controller.event.AbortEvent) Pair(org.apache.commons.lang3.tuple.Pair) Duration(java.time.Duration) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) RETRYABLE_PREDICATE(io.pravega.controller.util.RetryHelper.RETRYABLE_PREDICATE) Segment(io.pravega.controller.store.stream.Segment) TimerWheelTimeoutService(io.pravega.controller.timeout.TimerWheelTimeoutService) ConnectionFactory(io.pravega.client.netty.impl.ConnectionFactory) EventWriterConfig(io.pravega.client.stream.EventWriterConfig) RetryHelper.withRetriesAsync(io.pravega.controller.util.RetryHelper.withRetriesAsync) ControllerEventProcessorConfig(io.pravega.controller.server.eventProcessor.ControllerEventProcessorConfig) BlockingQueue(java.util.concurrent.BlockingQueue) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) TxnResource(io.pravega.controller.store.task.TxnResource) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) TimeUnit(java.util.concurrent.TimeUnit) CountDownLatch(java.util.concurrent.CountDownLatch) AbstractMap(java.util.AbstractMap) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) Config(io.pravega.controller.util.Config) HostControllerStore(io.pravega.controller.store.host.HostControllerStore) TxnStatus(io.pravega.controller.store.stream.TxnStatus) ClientFactory(io.pravega.client.ClientFactory) VersionedTransactionData(io.pravega.controller.store.stream.VersionedTransactionData) Optional(java.util.Optional) TimeoutService(io.pravega.controller.timeout.TimeoutService) VisibleForTesting(com.google.common.annotations.VisibleForTesting) StreamMetadataStore(io.pravega.controller.store.stream.StreamMetadataStore) PingTxnStatus(io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnStatus) Futures(io.pravega.common.concurrent.Futures) List(java.util.List) UUID(java.util.UUID) VersionedTransactionData(io.pravega.controller.store.stream.VersionedTransactionData) TxnResource(io.pravega.controller.store.task.TxnResource)

Example 3 with Controller

use of io.pravega.controller.stream.api.grpc.v1.Controller in project pravega by pravega.

the class StreamTransactionMetadataTasks method sealTxnBody.

/**
 * Seals a txn and transitions it to COMMITTING (resp. ABORTING) state if commit param is true (resp. false).
 *
 * Post-condition:
 * 1. If seal completes successfully, then
 *     (a) txn state is COMMITTING/ABORTING,
 *     (b) CommitEvent/AbortEvent is present in the commit stream/abort stream,
 *     (c) txn is removed from host-txn index,
 *     (d) txn is removed from the timeout service.
 *
 * 2. If process fails after transitioning txn to COMMITTING/ABORTING state, but before responding to client, then
 * since txn is present in the host-txn index, some other controller process shall put CommitEvent/AbortEvent to
 * commit stream/abort stream.
 *
 * @param host    host id. It is different from hostId iff invoked from TxnSweeper for aborting orphaned txn.
 * @param scope   scope name.
 * @param stream  stream name.
 * @param commit  boolean indicating whether to commit txn.
 * @param txnId   txn id.
 * @param version expected version of txn node in store.
 * @param ctx     context.
 * @return        Txn status after sealing it.
 */
CompletableFuture<TxnStatus> sealTxnBody(final String host, final String scope, final String stream, final boolean commit, final UUID txnId, final Integer version, final OperationContext ctx) {
    TxnResource resource = new TxnResource(scope, stream, txnId);
    Optional<Integer> versionOpt = Optional.ofNullable(version);
    // Step 1. Add txn to current host's index, if it is not already present
    CompletableFuture<Void> addIndex = host.equals(hostId) && !timeoutService.containsTxn(scope, stream, txnId) ? // then txn would no longer be open.
    streamMetadataStore.addTxnToIndex(hostId, resource, Integer.MAX_VALUE) : CompletableFuture.completedFuture(null);
    addIndex.whenComplete((v, e) -> {
        if (e != null) {
            log.debug("Txn={}, already present/newly added to host-txn index of host={}", txnId, hostId);
        } else {
            log.debug("Txn={}, added txn to host-txn index of host={}", txnId, hostId);
        }
    });
    // Step 2. Seal txn
    CompletableFuture<AbstractMap.SimpleEntry<TxnStatus, Integer>> sealFuture = addIndex.thenComposeAsync(x -> streamMetadataStore.sealTransaction(scope, stream, txnId, commit, versionOpt, ctx, executor), executor).whenComplete((v, e) -> {
        if (e != null) {
            log.debug("Txn={}, failed sealing txn", txnId);
        } else {
            log.debug("Txn={}, sealed successfully, commit={}", txnId, commit);
        }
    });
    // Step 3. write event to corresponding stream.
    return sealFuture.thenComposeAsync(pair -> {
        TxnStatus status = pair.getKey();
        switch(status) {
            case COMMITTING:
                return writeCommitEvent(scope, stream, pair.getValue(), txnId, status);
            case ABORTING:
                return writeAbortEvent(scope, stream, pair.getValue(), txnId, status);
            case ABORTED:
            case COMMITTED:
                return CompletableFuture.completedFuture(status);
            case OPEN:
            case UNKNOWN:
            default:
                // exception would be thrown.
                return CompletableFuture.completedFuture(status);
        }
    }, executor).thenComposeAsync(status -> {
        // Step 4. Remove txn from timeoutService, and from the index.
        timeoutService.removeTxn(scope, stream, txnId);
        log.debug("Txn={}, removed from timeout service", txnId);
        return streamMetadataStore.removeTxnFromIndex(host, resource, true).whenComplete((v, e) -> {
            if (e != null) {
                log.debug("Txn={}, failed removing txn from host-txn index of host={}", txnId, hostId);
            } else {
                log.debug("Txn={}, removed txn from host-txn index of host={}", txnId, hostId);
            }
        }).thenApply(x -> status);
    }, executor);
}
Also used : CommitEvent(io.pravega.shared.controller.event.CommitEvent) OperationContext(io.pravega.controller.store.stream.OperationContext) ControllerEventProcessors(io.pravega.controller.server.eventProcessor.ControllerEventProcessors) Getter(lombok.Getter) EventStreamWriter(io.pravega.client.stream.EventStreamWriter) SegmentHelper(io.pravega.controller.server.SegmentHelper) PravegaInterceptor(io.pravega.controller.server.rpc.auth.PravegaInterceptor) CompletableFuture(java.util.concurrent.CompletableFuture) TimeoutServiceConfig(io.pravega.controller.timeout.TimeoutServiceConfig) Status(io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnStatus.Status) AbortEvent(io.pravega.shared.controller.event.AbortEvent) Pair(org.apache.commons.lang3.tuple.Pair) Duration(java.time.Duration) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) RETRYABLE_PREDICATE(io.pravega.controller.util.RetryHelper.RETRYABLE_PREDICATE) Segment(io.pravega.controller.store.stream.Segment) TimerWheelTimeoutService(io.pravega.controller.timeout.TimerWheelTimeoutService) ConnectionFactory(io.pravega.client.netty.impl.ConnectionFactory) EventWriterConfig(io.pravega.client.stream.EventWriterConfig) RetryHelper.withRetriesAsync(io.pravega.controller.util.RetryHelper.withRetriesAsync) ControllerEventProcessorConfig(io.pravega.controller.server.eventProcessor.ControllerEventProcessorConfig) BlockingQueue(java.util.concurrent.BlockingQueue) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) TxnResource(io.pravega.controller.store.task.TxnResource) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) TimeUnit(java.util.concurrent.TimeUnit) CountDownLatch(java.util.concurrent.CountDownLatch) AbstractMap(java.util.AbstractMap) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) Config(io.pravega.controller.util.Config) HostControllerStore(io.pravega.controller.store.host.HostControllerStore) TxnStatus(io.pravega.controller.store.stream.TxnStatus) ClientFactory(io.pravega.client.ClientFactory) VersionedTransactionData(io.pravega.controller.store.stream.VersionedTransactionData) Optional(java.util.Optional) TimeoutService(io.pravega.controller.timeout.TimeoutService) VisibleForTesting(com.google.common.annotations.VisibleForTesting) StreamMetadataStore(io.pravega.controller.store.stream.StreamMetadataStore) PingTxnStatus(io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnStatus) Futures(io.pravega.common.concurrent.Futures) TxnResource(io.pravega.controller.store.task.TxnResource) TxnStatus(io.pravega.controller.store.stream.TxnStatus) PingTxnStatus(io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnStatus)

Example 4 with Controller

use of io.pravega.controller.stream.api.grpc.v1.Controller in project pravega by pravega.

the class SegmentHelper method sealSegment.

/**
 * This method sends segment sealed message for the specified segment.
 * It owns up the responsibility of retrying the operation on failures until success.
 *
 * @param scope               stream scope
 * @param stream              stream name
 * @param segmentNumber       number of segment to be sealed
 * @param hostControllerStore host controller store
 * @param clientCF            connection factory
 * @param delegationToken     the token to be presented to segmentstore.
 * @return void
 */
public CompletableFuture<Boolean> sealSegment(final String scope, final String stream, final int segmentNumber, final HostControllerStore hostControllerStore, final ConnectionFactory clientCF, String delegationToken) {
    final Controller.NodeUri uri = getSegmentUri(scope, stream, segmentNumber, hostControllerStore);
    final CompletableFuture<Boolean> result = new CompletableFuture<>();
    final WireCommandType type = WireCommandType.SEAL_SEGMENT;
    final FailingReplyProcessor replyProcessor = new FailingReplyProcessor() {

        @Override
        public void connectionDropped() {
            log.warn("sealSegment {}/{}/{} connectionDropped", scope, stream, segmentNumber);
            result.completeExceptionally(new WireCommandFailedException(type, WireCommandFailedException.Reason.ConnectionDropped));
        }

        @Override
        public void wrongHost(WireCommands.WrongHost wrongHost) {
            log.warn("sealSegment {}/{}/{} wrongHost", scope, stream, segmentNumber);
            result.completeExceptionally(new WireCommandFailedException(type, WireCommandFailedException.Reason.UnknownHost));
        }

        @Override
        public void segmentSealed(WireCommands.SegmentSealed segmentSealed) {
            log.info("sealSegment {}/{}/{} segmentSealed", scope, stream, segmentNumber);
            result.complete(true);
        }

        @Override
        public void segmentIsSealed(WireCommands.SegmentIsSealed segmentIsSealed) {
            log.info("sealSegment {}/{}/{} SegmentIsSealed", scope, stream, segmentNumber);
            result.complete(true);
        }

        @Override
        public void processingFailure(Exception error) {
            log.error("sealSegment {}/{}/{} failed", scope, stream, segmentNumber, error);
            result.completeExceptionally(error);
        }

        @Override
        public void authTokenCheckFailed(WireCommands.AuthTokenCheckFailed authTokenCheckFailed) {
            result.completeExceptionally(new WireCommandFailedException(new AuthenticationException(authTokenCheckFailed.toString()), type, WireCommandFailedException.Reason.AuthFailed));
        }
    };
    WireCommands.SealSegment request = new WireCommands.SealSegment(idGenerator.get(), Segment.getScopedName(scope, stream, segmentNumber), delegationToken);
    sendRequestAsync(request, replyProcessor, result, clientCF, ModelHelper.encode(uri));
    return result;
}
Also used : AuthenticationException(io.pravega.common.auth.AuthenticationException) FailingReplyProcessor(io.pravega.shared.protocol.netty.FailingReplyProcessor) WireCommandType(io.pravega.shared.protocol.netty.WireCommandType) Controller(io.pravega.controller.stream.api.grpc.v1.Controller) AuthenticationException(io.pravega.common.auth.AuthenticationException) ConnectionFailedException(io.pravega.shared.protocol.netty.ConnectionFailedException) CompletableFuture(java.util.concurrent.CompletableFuture) WireCommands(io.pravega.shared.protocol.netty.WireCommands)

Aggregations

CompletableFuture (java.util.concurrent.CompletableFuture)4 VisibleForTesting (com.google.common.annotations.VisibleForTesting)3 Futures (io.pravega.common.concurrent.Futures)3 PingTxnStatus (io.pravega.controller.stream.api.grpc.v1.Controller.PingTxnStatus)3 List (java.util.List)3 UUID (java.util.UUID)3 ClientFactory (io.pravega.client.ClientFactory)2 ConnectionFactory (io.pravega.client.netty.impl.ConnectionFactory)2 EventStreamWriter (io.pravega.client.stream.EventStreamWriter)2 EventWriterConfig (io.pravega.client.stream.EventWriterConfig)2 SegmentHelper (io.pravega.controller.server.SegmentHelper)2 ControllerEventProcessorConfig (io.pravega.controller.server.eventProcessor.ControllerEventProcessorConfig)2 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)2 TimeUnit (java.util.concurrent.TimeUnit)2 Collectors (java.util.stream.Collectors)2 Slf4j (lombok.extern.slf4j.Slf4j)2 Preconditions (com.google.common.base.Preconditions)1 Strings (com.google.common.base.Strings)1 ManagedChannel (io.grpc.ManagedChannel)1 ManagedChannelBuilder (io.grpc.ManagedChannelBuilder)1