Search in sources :

Example 6 with StreamCutReferenceRecord

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

the class ControllerMetadataJsonSerializerTest method testRetentionSet.

@Test
public void testRetentionSet() {
    StreamCutReferenceRecord refRecord1 = StreamCutReferenceRecord.builder().recordingSize(0L).recordingTime(10L).build();
    StreamCutReferenceRecord refRecord2 = StreamCutReferenceRecord.builder().recordingSize(1L).recordingTime(11L).build();
    RetentionSet record = new RetentionSet(ImmutableList.of(refRecord1, refRecord2));
    testRecordSerialization(record, RetentionSet.class);
}
Also used : StreamCutReferenceRecord(io.pravega.controller.store.stream.records.StreamCutReferenceRecord) RetentionSet(io.pravega.controller.store.stream.records.RetentionSet) Test(org.junit.Test)

Aggregations

StreamCutReferenceRecord (io.pravega.controller.store.stream.records.StreamCutReferenceRecord)6 RetentionSet (io.pravega.controller.store.stream.records.RetentionSet)5 StreamConfiguration (io.pravega.client.stream.StreamConfiguration)4 VisibleForTesting (com.google.common.annotations.VisibleForTesting)3 Preconditions (com.google.common.base.Preconditions)3 ImmutableMap (com.google.common.collect.ImmutableMap)3 ImmutableSet (com.google.common.collect.ImmutableSet)3 RetentionPolicy (io.pravega.client.stream.RetentionPolicy)3 ScalingPolicy (io.pravega.client.stream.ScalingPolicy)3 Exceptions (io.pravega.common.Exceptions)3 Futures (io.pravega.common.concurrent.Futures)3 TagLogger (io.pravega.common.tracing.TagLogger)3 VersionedMetadata (io.pravega.controller.store.VersionedMetadata)3 EpochRecord (io.pravega.controller.store.stream.records.EpochRecord)3 EpochTransitionRecord (io.pravega.controller.store.stream.records.EpochTransitionRecord)3 StreamCutRecord (io.pravega.controller.store.stream.records.StreamCutRecord)3 HashMap (java.util.HashMap)3 AtomicLong (java.util.concurrent.atomic.AtomicLong)3 AtomicReference (java.util.concurrent.atomic.AtomicReference)3 EventStreamClientFactory (io.pravega.client.EventStreamClientFactory)2