Search in sources :

Example 21 with EpochRecord

use of io.pravega.controller.store.stream.records.EpochRecord in project pravega by pravega.

the class ControllerMetadataJsonSerializerTest method testEpochRecord.

@Test
public void testEpochRecord() {
    List<StreamSegmentRecord> list = Lists.newArrayList(StreamSegmentRecord.newSegmentRecord(1, 0, 10L, 0.0, 1.0));
    EpochRecord record = new EpochRecord(10, 0, ImmutableList.copyOf(list), 10L, 0L, 0L);
    testRecordSerialization(record, EpochRecord.class);
}
Also used : StreamSegmentRecord(io.pravega.controller.store.stream.records.StreamSegmentRecord) EpochRecord(io.pravega.controller.store.stream.records.EpochRecord) Test(org.junit.Test)

Example 22 with EpochRecord

use of io.pravega.controller.store.stream.records.EpochRecord in project pravega by pravega.

the class PersistentStreamBase method scaleCreateNewEpoch.

@Override
public CompletableFuture<VersionedMetadata<EpochTransitionRecord>> scaleCreateNewEpoch(VersionedMetadata<EpochTransitionRecord> versionedMetadata, OperationContext context) {
    Preconditions.checkNotNull(context, "Operation context cannot be null");
    return getActiveEpochRecord(true, context).thenCompose(currentEpoch -> {
        // only perform idempotent update. If update is already completed, do nothing.
        if (currentEpoch.getEpoch() < versionedMetadata.getObject().getNewEpoch()) {
            EpochTransitionRecord epochTransition = versionedMetadata.getObject();
            // time
            long time = Math.max(epochTransition.getTime(), currentEpoch.getCreationTime() + 1);
            // new segments
            ImmutableList.Builder<StreamSegmentRecord> newSegmentsBuilder = ImmutableList.builder();
            epochTransition.getNewSegmentsWithRange().forEach((key, value) -> newSegmentsBuilder.add(newSegmentRecord(key, time, value.getKey(), value.getValue())));
            // sealed segments
            ImmutableList.Builder<StreamSegmentRecord> sealedSegmentsBuilder = ImmutableList.builder();
            epochTransition.getSegmentsToSeal().forEach(x -> sealedSegmentsBuilder.add(currentEpoch.getSegment(x)));
            // overall segments in epoch
            ImmutableList.Builder<StreamSegmentRecord> builder = ImmutableList.builder();
            currentEpoch.getSegments().forEach(x -> {
                if (!epochTransition.getSegmentsToSeal().contains(x.segmentId())) {
                    builder.add(x);
                }
            });
            ImmutableList<StreamSegmentRecord> newSegments = newSegmentsBuilder.build();
            builder.addAll(newSegments);
            ImmutableList<StreamSegmentRecord> newEpochSegments = builder.build();
            // epoch record
            return getSplitMergeCountsTillEpoch(currentEpoch, context).thenCompose(cumulativeSplitMergeCount -> {
                EpochRecord epochRecord = new EpochRecord(epochTransition.getNewEpoch(), epochTransition.getNewEpoch(), newEpochSegments, time, getNewEpochSplitCount(cumulativeSplitMergeCount.getKey(), currentEpoch.getSegments(), newEpochSegments), getNewEpochMergeCount(cumulativeSplitMergeCount.getValue(), currentEpoch.getSegments(), newEpochSegments));
                HistoryTimeSeriesRecord timeSeriesRecord = new HistoryTimeSeriesRecord(epochTransition.getNewEpoch(), epochTransition.getNewEpoch(), sealedSegmentsBuilder.build(), newSegments, epochRecord.getCreationTime());
                return createEpochRecord(epochRecord, context).thenCompose(x -> updateHistoryTimeSeries(timeSeriesRecord, context)).thenCompose(x -> createSegmentSealedEpochRecords(epochTransition.getSegmentsToSeal(), epochTransition.getNewEpoch(), context)).thenApply(x -> versionedMetadata);
            });
        } else {
            return CompletableFuture.completedFuture(versionedMetadata);
        }
    });
}
Also used : StreamSegmentRecord(io.pravega.controller.store.stream.records.StreamSegmentRecord) SneakyThrows(lombok.SneakyThrows) BiFunction(java.util.function.BiFunction) LoggerFactory(org.slf4j.LoggerFactory) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) TagLogger(io.pravega.common.tracing.TagLogger) VersionedMetadata(io.pravega.controller.store.VersionedMetadata) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) DataNotFoundException(io.pravega.controller.store.stream.StoreException.DataNotFoundException) EpochTransitionRecord(io.pravega.controller.store.stream.records.EpochTransitionRecord) ImmutableSet(com.google.common.collect.ImmutableSet) StreamCutReferenceRecord(io.pravega.controller.store.stream.records.StreamCutReferenceRecord) StreamTruncationRecord(io.pravega.controller.store.stream.records.StreamTruncationRecord) ImmutableMap(com.google.common.collect.ImmutableMap) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Set(java.util.Set) CompletionException(java.util.concurrent.CompletionException) ActiveTxnRecord(io.pravega.controller.store.stream.records.ActiveTxnRecord) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) List(java.util.List) CompletionStage(java.util.concurrent.CompletionStage) Optional(java.util.Optional) HistoryTimeSeries(io.pravega.controller.store.stream.records.HistoryTimeSeries) Futures(io.pravega.common.concurrent.Futures) IntStream(java.util.stream.IntStream) CompletedTxnRecord(io.pravega.controller.store.stream.records.CompletedTxnRecord) CommittingTransactionsRecord(io.pravega.controller.store.stream.records.CommittingTransactionsRecord) NameUtils.computeSegmentId(io.pravega.shared.NameUtils.computeSegmentId) Exceptions(io.pravega.common.Exceptions) HistoryTimeSeriesRecord(io.pravega.controller.store.stream.records.HistoryTimeSeriesRecord) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) RetentionSet(io.pravega.controller.store.stream.records.RetentionSet) DATA_NOT_FOUND_PREDICATE(io.pravega.controller.store.stream.AbstractStreamMetadataStore.DATA_NOT_FOUND_PREDICATE) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) NameUtils.getSegmentNumber(io.pravega.shared.NameUtils.getSegmentNumber) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) StateRecord(io.pravega.controller.store.stream.records.StateRecord) StreamSubscriber(io.pravega.controller.store.stream.records.StreamSubscriber) LinkedList(java.util.LinkedList) RecordHelper(io.pravega.controller.store.stream.records.RecordHelper) SimpleEntry(java.util.AbstractMap.SimpleEntry) LongSummaryStatistics(java.util.LongSummaryStatistics) CollectionHelpers(io.pravega.common.util.CollectionHelpers) SealedSegmentsMapShard(io.pravega.controller.store.stream.records.SealedSegmentsMapShard) NameUtils(io.pravega.shared.NameUtils) Executor(java.util.concurrent.Executor) WriterMark(io.pravega.controller.store.stream.records.WriterMark) lombok.val(lombok.val) StreamCutRecord(io.pravega.controller.store.stream.records.StreamCutRecord) AtomicLong(java.util.concurrent.atomic.AtomicLong) StreamConfigurationRecord(io.pravega.controller.store.stream.records.StreamConfigurationRecord) EpochRecord(io.pravega.controller.store.stream.records.EpochRecord) ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) Version(io.pravega.controller.store.Version) Preconditions(com.google.common.base.Preconditions) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Comparator(java.util.Comparator) Collections(java.util.Collections) StreamSegmentRecord(io.pravega.controller.store.stream.records.StreamSegmentRecord) EpochRecord(io.pravega.controller.store.stream.records.EpochRecord) EpochTransitionRecord(io.pravega.controller.store.stream.records.EpochTransitionRecord) HistoryTimeSeriesRecord(io.pravega.controller.store.stream.records.HistoryTimeSeriesRecord) ImmutableList(com.google.common.collect.ImmutableList)

Example 23 with EpochRecord

use of io.pravega.controller.store.stream.records.EpochRecord in project pravega by pravega.

the class PersistentStreamBase method getSuccessorsWithPredecessors.

@Override
public CompletableFuture<Map<StreamSegmentRecord, List<Long>>> getSuccessorsWithPredecessors(final long segmentId, OperationContext context) {
    Preconditions.checkNotNull(context, "Operation context cannot be null");
    // fetch segment sealed epoch record.
    return getSegmentSealedEpoch(segmentId, context).thenCompose(sealedEpoch -> {
        if (sealedEpoch < 0) {
            return getActiveEpoch(true, context).thenApply(activeSegments -> Collections.emptyMap());
        }
        // if sealed record exists. fetch its sealing epoch.
        // Note: sealed record is created even before the segment is sealed. So if client is requesting for successor,
        // we should find it.
        CompletableFuture<EpochRecord> sealedEpochFuture = getEpochRecord(sealedEpoch, context);
        // fetch previous epoch as well.
        CompletableFuture<EpochRecord> previousEpochFuture = getEpochRecord(sealedEpoch - 1, context);
        return CompletableFuture.allOf(sealedEpochFuture, previousEpochFuture).thenApply(x -> {
            EpochRecord sealedEpochRecord = sealedEpochFuture.join();
            EpochRecord previousEpochRecord = previousEpochFuture.join();
            Optional<StreamSegmentRecord> segmentOpt = previousEpochRecord.getSegments().stream().filter(r -> r.segmentId() == segmentId).findAny();
            assert segmentOpt.isPresent();
            StreamSegmentRecord segment = segmentOpt.get();
            List<StreamSegmentRecord> successors = sealedEpochRecord.getSegments().stream().filter(r -> r.overlaps(segment)).collect(Collectors.toList());
            return successors.stream().collect(Collectors.toMap(record -> record, z -> previousEpochRecord.getSegments().stream().filter(predecessor -> predecessor.overlaps(z)).map(StreamSegmentRecord::segmentId).collect(Collectors.toList())));
        });
    });
}
Also used : StreamSegmentRecord(io.pravega.controller.store.stream.records.StreamSegmentRecord) SneakyThrows(lombok.SneakyThrows) BiFunction(java.util.function.BiFunction) LoggerFactory(org.slf4j.LoggerFactory) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) TagLogger(io.pravega.common.tracing.TagLogger) VersionedMetadata(io.pravega.controller.store.VersionedMetadata) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) DataNotFoundException(io.pravega.controller.store.stream.StoreException.DataNotFoundException) EpochTransitionRecord(io.pravega.controller.store.stream.records.EpochTransitionRecord) ImmutableSet(com.google.common.collect.ImmutableSet) StreamCutReferenceRecord(io.pravega.controller.store.stream.records.StreamCutReferenceRecord) StreamTruncationRecord(io.pravega.controller.store.stream.records.StreamTruncationRecord) ImmutableMap(com.google.common.collect.ImmutableMap) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Set(java.util.Set) CompletionException(java.util.concurrent.CompletionException) ActiveTxnRecord(io.pravega.controller.store.stream.records.ActiveTxnRecord) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) List(java.util.List) CompletionStage(java.util.concurrent.CompletionStage) Optional(java.util.Optional) HistoryTimeSeries(io.pravega.controller.store.stream.records.HistoryTimeSeries) Futures(io.pravega.common.concurrent.Futures) IntStream(java.util.stream.IntStream) CompletedTxnRecord(io.pravega.controller.store.stream.records.CompletedTxnRecord) CommittingTransactionsRecord(io.pravega.controller.store.stream.records.CommittingTransactionsRecord) NameUtils.computeSegmentId(io.pravega.shared.NameUtils.computeSegmentId) Exceptions(io.pravega.common.Exceptions) HistoryTimeSeriesRecord(io.pravega.controller.store.stream.records.HistoryTimeSeriesRecord) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) RetentionSet(io.pravega.controller.store.stream.records.RetentionSet) DATA_NOT_FOUND_PREDICATE(io.pravega.controller.store.stream.AbstractStreamMetadataStore.DATA_NOT_FOUND_PREDICATE) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) NameUtils.getSegmentNumber(io.pravega.shared.NameUtils.getSegmentNumber) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) StateRecord(io.pravega.controller.store.stream.records.StateRecord) StreamSubscriber(io.pravega.controller.store.stream.records.StreamSubscriber) LinkedList(java.util.LinkedList) RecordHelper(io.pravega.controller.store.stream.records.RecordHelper) SimpleEntry(java.util.AbstractMap.SimpleEntry) LongSummaryStatistics(java.util.LongSummaryStatistics) CollectionHelpers(io.pravega.common.util.CollectionHelpers) SealedSegmentsMapShard(io.pravega.controller.store.stream.records.SealedSegmentsMapShard) NameUtils(io.pravega.shared.NameUtils) Executor(java.util.concurrent.Executor) WriterMark(io.pravega.controller.store.stream.records.WriterMark) lombok.val(lombok.val) StreamCutRecord(io.pravega.controller.store.stream.records.StreamCutRecord) AtomicLong(java.util.concurrent.atomic.AtomicLong) StreamConfigurationRecord(io.pravega.controller.store.stream.records.StreamConfigurationRecord) EpochRecord(io.pravega.controller.store.stream.records.EpochRecord) ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) Version(io.pravega.controller.store.Version) Preconditions(com.google.common.base.Preconditions) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Comparator(java.util.Comparator) Collections(java.util.Collections) StreamSegmentRecord(io.pravega.controller.store.stream.records.StreamSegmentRecord) EpochRecord(io.pravega.controller.store.stream.records.EpochRecord)

Example 24 with EpochRecord

use of io.pravega.controller.store.stream.records.EpochRecord in project pravega by pravega.

the class PersistentStreamBase method isStreamCutValidInternal.

private boolean isStreamCutValidInternal(Map<Long, Long> streamCut, int epochLow, List<EpochRecord> epochs) {
    Set<StreamSegmentRecord> segmentsInStreamCut = new HashSet<>();
    Set<StreamSegmentRecord> futureSegment = new HashSet<>();
    boolean isValid = true;
    // for each segment get its epoch and the segment record
    streamCut.forEach((key, value) -> {
        int epoch = NameUtils.getEpoch(key);
        int index = epoch - epochLow;
        EpochRecord epochRecord = epochs.get(index);
        StreamSegmentRecord segmentRecord = epochRecord.getSegment(key);
        if (value < 0) {
            futureSegment.add(segmentRecord);
        } else {
            segmentsInStreamCut.add(segmentRecord);
        }
    });
    isValid = futureSegment.stream().allMatch(x -> segmentsInStreamCut.stream().filter(y -> y.overlaps(x)).allMatch(y -> y.segmentId() < x.segmentId()));
    if (isValid) {
        List<StreamSegmentRecord> sorted = segmentsInStreamCut.stream().sorted(Comparator.comparingDouble(StreamSegmentRecord::getKeyStart)).collect(Collectors.toList());
        // all future segments should have a predecessor and all missing ranges should be covered by a future segment.
        Map<Double, Double> missingRanges = new HashMap<>();
        StreamSegmentRecord previous = sorted.get(0);
        BiFunction<Double, Double, Boolean> validate = (start, end) -> futureSegment.stream().anyMatch(x -> x.overlaps(start, end));
        if (previous.getKeyStart() > 0.0) {
            double start = 0.0;
            double end = previous.getKeyStart();
            missingRanges.put(start, end);
            // missing range should be covered by a future segment
            isValid = validate.apply(start, end);
        }
        for (int i = 1; i < sorted.size(); i++) {
            StreamSegmentRecord next = sorted.get(i);
            if (previous.getKeyEnd() < next.getKeyStart()) {
                double start = previous.getKeyEnd();
                double end = next.getKeyStart();
                missingRanges.put(start, end);
                // missing range should be covered by a future segment
                isValid = validate.apply(start, end);
                if (!isValid) {
                    break;
                }
            } else if (previous.getKeyEnd() > next.getKeyStart()) {
                isValid = false;
                break;
            }
            previous = next;
        }
        if (previous.getKeyEnd() < 1.0) {
            double start = previous.getKeyEnd();
            double end = 1.0;
            missingRanges.put(start, end);
            isValid = validate.apply(start, end);
        }
        if (isValid) {
            List<StreamSegmentRecord> toCheck = new ArrayList<>();
            Set<StreamSegmentRecord> fullyReadFrom = new HashSet<>();
            // now traverse the stream for missing ranges and verify that we can reach those future segments
            // in logically consistent fashion for the missing ranges.
            missingRanges.entrySet().forEach(x -> toCheck.addAll(findSegmentsForMissingRange(epochs.get(0), x)));
            while (!toCheck.isEmpty()) {
                StreamSegmentRecord segmentRecord = toCheck.get(0);
                if (!(fullyReadFrom.contains(segmentRecord) || segmentsInStreamCut.contains(segmentRecord) || futureSegment.contains(segmentRecord))) {
                    for (StreamSegmentRecord s : segmentsInStreamCut) {
                        if (s.overlaps(segmentRecord)) {
                            if (s.segmentId() < segmentRecord.segmentId()) {
                                // if segment record has a predecessor, then it should have been in future segment.
                                if (!futureSegment.contains(segmentRecord)) {
                                    return false;
                                } else {
                                    // segment record is a predecessor of a previous segment.
                                    fullyReadFrom.add(segmentRecord);
                                }
                            } else {
                                // if segment is predecessor of another segment in the stream cut then it has to be
                                // fully read
                                fullyReadFrom.add(segmentRecord);
                                // find successors of segmentRecord and add it to tocheck list
                                int segmentEpoch = NameUtils.getEpoch(segmentRecord.segmentId());
                                int index = segmentEpoch - epochLow;
                                for (int i = index; i < epochs.size(); i++) {
                                    if (!epochs.get(i).containsSegment(segmentRecord.segmentId())) {
                                        epochs.get(i).getSegments().forEach(x -> {
                                            if (x.overlaps(segmentRecord)) {
                                                toCheck.add(x);
                                            }
                                        });
                                        break;
                                    }
                                }
                            }
                        }
                    }
                }
                toCheck.remove(segmentRecord);
            }
        }
    }
    return isValid;
}
Also used : StreamSegmentRecord(io.pravega.controller.store.stream.records.StreamSegmentRecord) SneakyThrows(lombok.SneakyThrows) BiFunction(java.util.function.BiFunction) LoggerFactory(org.slf4j.LoggerFactory) StreamConfiguration(io.pravega.client.stream.StreamConfiguration) TagLogger(io.pravega.common.tracing.TagLogger) VersionedMetadata(io.pravega.controller.store.VersionedMetadata) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) DataNotFoundException(io.pravega.controller.store.stream.StoreException.DataNotFoundException) EpochTransitionRecord(io.pravega.controller.store.stream.records.EpochTransitionRecord) ImmutableSet(com.google.common.collect.ImmutableSet) StreamCutReferenceRecord(io.pravega.controller.store.stream.records.StreamCutReferenceRecord) StreamTruncationRecord(io.pravega.controller.store.stream.records.StreamTruncationRecord) ImmutableMap(com.google.common.collect.ImmutableMap) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Set(java.util.Set) CompletionException(java.util.concurrent.CompletionException) ActiveTxnRecord(io.pravega.controller.store.stream.records.ActiveTxnRecord) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) List(java.util.List) CompletionStage(java.util.concurrent.CompletionStage) Optional(java.util.Optional) HistoryTimeSeries(io.pravega.controller.store.stream.records.HistoryTimeSeries) Futures(io.pravega.common.concurrent.Futures) IntStream(java.util.stream.IntStream) CompletedTxnRecord(io.pravega.controller.store.stream.records.CompletedTxnRecord) CommittingTransactionsRecord(io.pravega.controller.store.stream.records.CommittingTransactionsRecord) NameUtils.computeSegmentId(io.pravega.shared.NameUtils.computeSegmentId) Exceptions(io.pravega.common.Exceptions) HistoryTimeSeriesRecord(io.pravega.controller.store.stream.records.HistoryTimeSeriesRecord) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) RetentionSet(io.pravega.controller.store.stream.records.RetentionSet) DATA_NOT_FOUND_PREDICATE(io.pravega.controller.store.stream.AbstractStreamMetadataStore.DATA_NOT_FOUND_PREDICATE) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) NameUtils.getSegmentNumber(io.pravega.shared.NameUtils.getSegmentNumber) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) StateRecord(io.pravega.controller.store.stream.records.StateRecord) StreamSubscriber(io.pravega.controller.store.stream.records.StreamSubscriber) LinkedList(java.util.LinkedList) RecordHelper(io.pravega.controller.store.stream.records.RecordHelper) SimpleEntry(java.util.AbstractMap.SimpleEntry) LongSummaryStatistics(java.util.LongSummaryStatistics) CollectionHelpers(io.pravega.common.util.CollectionHelpers) SealedSegmentsMapShard(io.pravega.controller.store.stream.records.SealedSegmentsMapShard) NameUtils(io.pravega.shared.NameUtils) Executor(java.util.concurrent.Executor) WriterMark(io.pravega.controller.store.stream.records.WriterMark) lombok.val(lombok.val) StreamCutRecord(io.pravega.controller.store.stream.records.StreamCutRecord) AtomicLong(java.util.concurrent.atomic.AtomicLong) StreamConfigurationRecord(io.pravega.controller.store.stream.records.StreamConfigurationRecord) EpochRecord(io.pravega.controller.store.stream.records.EpochRecord) ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) Version(io.pravega.controller.store.Version) Preconditions(com.google.common.base.Preconditions) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Comparator(java.util.Comparator) Collections(java.util.Collections) EpochRecord(io.pravega.controller.store.stream.records.EpochRecord) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) StreamSegmentRecord(io.pravega.controller.store.stream.records.StreamSegmentRecord) HashSet(java.util.HashSet)

Example 25 with EpochRecord

use of io.pravega.controller.store.stream.records.EpochRecord in project pravega by pravega.

the class PersistentStreamBase method startScale.

@Override
public CompletableFuture<VersionedMetadata<EpochTransitionRecord>> startScale(boolean isManualScale, VersionedMetadata<EpochTransitionRecord> record, VersionedMetadata<State> state, OperationContext context) {
    Preconditions.checkNotNull(context, "Operation context cannot be null");
    Preconditions.checkArgument(state.getObject().equals(State.SCALING));
    return getCurrentEpochRecordData(true, context).thenCompose(currentEpoch -> {
        EpochRecord currentEpochRecord = currentEpoch.getObject();
        if (isManualScale) {
            return migrateManualScaleToNewEpoch(record, state, currentEpochRecord, context);
        } else {
            // epoch transition record and reset the state to active.
            return discardInconsistentEpochTransition(record, state, currentEpochRecord, context);
        }
    });
}
Also used : EpochRecord(io.pravega.controller.store.stream.records.EpochRecord)

Aggregations

EpochRecord (io.pravega.controller.store.stream.records.EpochRecord)29 StreamConfiguration (io.pravega.client.stream.StreamConfiguration)21 UUID (java.util.UUID)21 Test (org.junit.Test)20 VersionedMetadata (io.pravega.controller.store.VersionedMetadata)19 EpochTransitionRecord (io.pravega.controller.store.stream.records.EpochTransitionRecord)19 ArrayList (java.util.ArrayList)19 StreamSegmentRecord (io.pravega.controller.store.stream.records.StreamSegmentRecord)18 Exceptions (io.pravega.common.Exceptions)17 Futures (io.pravega.common.concurrent.Futures)17 CommittingTransactionsRecord (io.pravega.controller.store.stream.records.CommittingTransactionsRecord)17 NameUtils.computeSegmentId (io.pravega.shared.NameUtils.computeSegmentId)17 HashMap (java.util.HashMap)17 List (java.util.List)17 Map (java.util.Map)17 Collectors (java.util.stream.Collectors)17 ImmutableMap (com.google.common.collect.ImmutableMap)16 Lists (com.google.common.collect.Lists)16 Version (io.pravega.controller.store.Version)16 StreamConfigurationRecord (io.pravega.controller.store.stream.records.StreamConfigurationRecord)16