Search in sources :

Example 16 with RecordCursorResult

use of com.apple.foundationdb.record.RecordCursorResult in project fdb-record-layer by FoundationDB.

the class SortCursorTests method memorySortContinuations.

@Test
public void memorySortContinuations() throws Exception {
    final Function<byte[], RecordCursor<FDBQueriedRecord<Message>>> scanRecords = continuation -> {
        final ExecuteProperties executeProperties = ExecuteProperties.newBuilder().setScannedRecordsLimit(20).build();
        return recordStore.scanRecords(null, null, EndpointType.TREE_START, EndpointType.TREE_END, continuation, new ScanProperties(executeProperties)).map(FDBQueriedRecord::stored);
    };
    final MemoryAdapterBase adapter = new MemoryAdapterBase() {

        @Override
        public int getMaxRecordCountInMemory() {
            return 10;
        }
    };
    List<Integer> resultNums = new ArrayList<>();
    byte[] continuation = null;
    int transactionCount = 0;
    do {
        try (FDBRecordContext context = openContext()) {
            openSimpleRecordStore(context);
            try (RecordCursor<FDBQueriedRecord<Message>> cursor = MemorySortCursor.create(adapter, scanRecords, timer, continuation)) {
                while (true) {
                    RecordCursorResult<FDBQueriedRecord<Message>> result = cursor.getNext();
                    if (result.hasNext()) {
                        int num2 = TestRecords1Proto.MySimpleRecord.newBuilder().mergeFrom(result.get().getRecord()).getNumValue2();
                        resultNums.add(num2);
                    } else {
                        continuation = result.getContinuation().toBytes();
                        break;
                    }
                }
            }
            transactionCount++;
        }
    } while (continuation != null);
    assertEquals(110, transactionCount);
    assertEquals(sortedNums, resultNums);
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) FileSortAdapter(com.apple.foundationdb.record.sorting.FileSortAdapter) MemorySortAdapter(com.apple.foundationdb.record.sorting.MemorySortAdapter) FDBRecordContext(com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext) Random(java.util.Random) Function(java.util.function.Function) KeyGenerator(javax.crypto.KeyGenerator) ArrayList(java.util.ArrayList) Key(com.apple.foundationdb.record.metadata.Key) SecureRandom(java.security.SecureRandom) ExecuteProperties(com.apple.foundationdb.record.ExecuteProperties) FileSortCursor(com.apple.foundationdb.record.sorting.FileSortCursor) Tuple(com.apple.foundationdb.tuple.Tuple) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) EndpointType(com.apple.foundationdb.record.EndpointType) ScanProperties(com.apple.foundationdb.record.ScanProperties) SortedRecordSerializer(com.apple.foundationdb.record.provider.foundationdb.SortedRecordSerializer) Tag(org.junit.jupiter.api.Tag) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Nonnull(javax.annotation.Nonnull) CodedOutputStream(com.google.protobuf.CodedOutputStream) Nullable(javax.annotation.Nullable) KeyExpression(com.apple.foundationdb.record.metadata.expressions.KeyExpression) TestRecords1Proto(com.apple.foundationdb.record.TestRecords1Proto) MemorySortCursor(com.apple.foundationdb.record.sorting.MemorySortCursor) Tags(com.apple.test.Tags) IOException(java.io.IOException) CipherPool(com.apple.foundationdb.record.provider.common.CipherPool) File(java.io.File) FDBRecordStoreTestBase(com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreTestBase) Test(org.junit.jupiter.api.Test) List(java.util.List) CodedInputStream(com.google.protobuf.CodedInputStream) MemorySorter(com.apple.foundationdb.record.sorting.MemorySorter) FDBQueriedRecord(com.apple.foundationdb.record.provider.foundationdb.FDBQueriedRecord) Message(com.google.protobuf.Message) RecordCursor(com.apple.foundationdb.record.RecordCursor) SecretKey(javax.crypto.SecretKey) DynamicMessageRecordSerializer(com.apple.foundationdb.record.provider.common.DynamicMessageRecordSerializer) Collections(java.util.Collections) RecordCursor(com.apple.foundationdb.record.RecordCursor) Message(com.google.protobuf.Message) ArrayList(java.util.ArrayList) ExecuteProperties(com.apple.foundationdb.record.ExecuteProperties) FDBQueriedRecord(com.apple.foundationdb.record.provider.foundationdb.FDBQueriedRecord) FDBRecordContext(com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext) ScanProperties(com.apple.foundationdb.record.ScanProperties) Test(org.junit.jupiter.api.Test)

Example 17 with RecordCursorResult

use of com.apple.foundationdb.record.RecordCursorResult in project fdb-record-layer by FoundationDB.

the class FDBRecordStoreQueryTestBase method querySimpleRecordStoreWithContinuation.

/**
 * A query execution utility that can handle continuations. This is very similar to the above {@link #querySimpleRecordStore}
 * with the additional support for {@link ExecuteProperties} and continuation.
 * This method returns the last result encountered. In the case where the row limit was encountered, this would be the one
 * result that contains the continuation that should be used on the next call.
 * @param recordMetaDataHook Metadata hook to invoke while opening store
 * @param plan the plan to execute
 * @param contextSupplier provider method to get execution context
 * @param continuation execution continuation
 * @param executeProperties execution properties to pass into the execute method
 * @param checkNumRecords Consumer that verifies correct number of records returned
 * @param checkRecord Consumer that asserts every record retrieved
 * @param checkDiscarded Consumer that asserts the number of discarded records
 * @return the last result from the cursor
 * @throws Throwable any thrown exception, or its cause if the exception is a {@link ExecutionException}
 */
protected RecordCursorResult<FDBQueriedRecord<Message>> querySimpleRecordStoreWithContinuation(@Nonnull RecordMetaDataHook recordMetaDataHook, @Nonnull RecordQueryPlan plan, @Nonnull Supplier<EvaluationContext> contextSupplier, @Nullable byte[] continuation, @Nonnull ExecuteProperties executeProperties, @Nonnull Consumer<Integer> checkNumRecords, @Nonnull Consumer<TestRecords1Proto.MySimpleRecord.Builder> checkRecord, @Nonnull Consumer<FDBRecordContext> checkDiscarded) throws Throwable {
    try (FDBRecordContext context = openContext()) {
        openSimpleRecordStore(context, recordMetaDataHook);
        AtomicInteger i = new AtomicInteger(0);
        CompletableFuture<RecordCursorResult<FDBQueriedRecord<Message>>> lastResult;
        RecordCursor<FDBQueriedRecord<Message>> cursor = plan.execute(recordStore, contextSupplier.get(), continuation, executeProperties);
        lastResult = cursor.forEachResult(result -> {
            TestRecords1Proto.MySimpleRecord.Builder myrec = TestRecords1Proto.MySimpleRecord.newBuilder();
            myrec.mergeFrom(result.get().getRecord());
            checkRecord.accept(myrec);
            i.incrementAndGet();
        });
        lastResult.get();
        checkNumRecords.accept(i.get());
        checkDiscarded.accept(context);
        // TODO a hack until this gets refactored properly
        clearStoreCounter(context);
        return lastResult.get();
    } catch (ExecutionException ex) {
        throw ex.getCause();
    }
}
Also used : IntStream(java.util.stream.IntStream) Assertions.fail(org.junit.jupiter.api.Assertions.fail) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) TestRecords3Proto(com.apple.foundationdb.record.TestRecords3Proto) FDBRecordContext(com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext) CompletableFuture(java.util.concurrent.CompletableFuture) TestRecordsTupleFieldsProto(com.apple.foundationdb.record.TestRecordsTupleFieldsProto) RecordQueryPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) RecordQueryPlanner(com.apple.foundationdb.record.query.plan.RecordQueryPlanner) ExecuteProperties(com.apple.foundationdb.record.ExecuteProperties) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) TestHelpers(com.apple.foundationdb.record.TestHelpers) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Expressions.concatenateFields(com.apple.foundationdb.record.metadata.Key.Expressions.concatenateFields) RecordCursorIterator(com.apple.foundationdb.record.RecordCursorIterator) BiConsumer(java.util.function.BiConsumer) Expressions.concat(com.apple.foundationdb.record.metadata.Key.Expressions.concat) Nonnull(javax.annotation.Nonnull) Expressions.field(com.apple.foundationdb.record.metadata.Key.Expressions.field) Nullable(javax.annotation.Nullable) TestRecords4Proto(com.apple.foundationdb.record.TestRecords4Proto) KeyExpression(com.apple.foundationdb.record.metadata.expressions.KeyExpression) TestRecords1Proto(com.apple.foundationdb.record.TestRecords1Proto) RecordMetaDataBuilder(com.apple.foundationdb.record.RecordMetaDataBuilder) RecordTypeBuilder(com.apple.foundationdb.record.metadata.RecordTypeBuilder) TupleFieldsHelper(com.apple.foundationdb.record.metadata.expressions.TupleFieldsHelper) FanType(com.apple.foundationdb.record.metadata.expressions.KeyExpression.FanType) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) FDBRecordStoreTestBase(com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreTestBase) ExecutionException(java.util.concurrent.ExecutionException) Consumer(java.util.function.Consumer) Comparisons(com.apple.foundationdb.record.query.expressions.Comparisons) List(java.util.List) BindingMatcher(com.apple.foundationdb.record.query.plan.temp.matchers.BindingMatcher) TestRecords5Proto(com.apple.foundationdb.record.TestRecords5Proto) Index(com.apple.foundationdb.record.metadata.Index) EvaluationContext(com.apple.foundationdb.record.EvaluationContext) FDBQueriedRecord(com.apple.foundationdb.record.provider.foundationdb.FDBQueriedRecord) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) TestRecordsEnumProto(com.apple.foundationdb.record.TestRecordsEnumProto) Message(com.google.protobuf.Message) RecordCursor(com.apple.foundationdb.record.RecordCursor) TestRecordsWithHeaderProto(com.apple.foundationdb.record.TestRecordsWithHeaderProto) TestRecords1Proto(com.apple.foundationdb.record.TestRecords1Proto) Message(com.google.protobuf.Message) FDBQueriedRecord(com.apple.foundationdb.record.provider.foundationdb.FDBQueriedRecord) FDBRecordContext(com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) RecordMetaDataBuilder(com.apple.foundationdb.record.RecordMetaDataBuilder) RecordTypeBuilder(com.apple.foundationdb.record.metadata.RecordTypeBuilder) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) ExecutionException(java.util.concurrent.ExecutionException)

Example 18 with RecordCursorResult

use of com.apple.foundationdb.record.RecordCursorResult in project fdb-record-layer by FoundationDB.

the class FDBStoreTimerTest method timeoutCounterDifferenceTest.

@Test
public void timeoutCounterDifferenceTest() {
    RecordCursor<KeyValue> kvc = KeyValueCursor.Builder.withSubspace(subspace).setContext(context).setScanProperties(ScanProperties.FORWARD_SCAN).setRange(TupleRange.ALL).build();
    FDBStoreTimer latestTimer = context.getTimer();
    CompletableFuture<RecordCursorResult<KeyValue>> fkvr;
    RecordCursorResult<KeyValue> kvr;
    // record timeout
    latestTimer.recordTimeout(FDBStoreTimer.Waits.WAIT_ADVANCE_CURSOR, System.nanoTime() - 5000);
    // the latest timer should have recorded the one timeout event
    Map<String, Number> diffKVs;
    diffKVs = latestTimer.getKeysAndValues();
    assertEquals(1, diffKVs.get("wait_advance_cursor_timeout_count").intValue());
    assertTrue(diffKVs.get("wait_advance_cursor_timeout_micros").intValue() > 0);
    assertThat(diffKVs.get("wait_advance_cursor_timeout_micros").intValue(), greaterThan(0));
    // advance the cursor without timing out
    latestTimer.record(FDBStoreTimer.Waits.WAIT_ADVANCE_CURSOR, System.nanoTime());
    latestTimer.record(FDBStoreTimer.Waits.WAIT_ADVANCE_CURSOR, System.nanoTime());
    // record the state after the first timeout event and generate some more timeout events
    StoreTimerSnapshot savedTimer;
    savedTimer = StoreTimerSnapshot.from(latestTimer);
    final int numTimeouts = 3;
    for (int i = 0; i < numTimeouts; i++) {
        latestTimer.recordTimeout(FDBStoreTimer.Waits.WAIT_ADVANCE_CURSOR, System.nanoTime() - 5000);
    }
    // should have the additional timeout events in latestTimer
    diffKVs = latestTimer.getKeysAndValues();
    assertEquals(numTimeouts + 1, diffKVs.get("wait_advance_cursor_timeout_count").intValue());
    assertThat(diffKVs.get("wait_advance_cursor_timeout_micros").intValue(), greaterThan(0));
    // the savedTimer should only have recorded the first timeout event and hence the difference is the numTimeout events that occurred after that
    StoreTimer diffTimer;
    diffTimer = StoreTimer.getDifference(latestTimer, savedTimer);
    diffKVs = diffTimer.getKeysAndValues();
    assertEquals(numTimeouts, diffKVs.get("wait_advance_cursor_timeout_count").intValue());
    assertThat(diffKVs.get("wait_advance_cursor_timeout_micros").intValue(), greaterThan(0));
}
Also used : StoreTimer(com.apple.foundationdb.record.provider.common.StoreTimer) KeyValue(com.apple.foundationdb.KeyValue) StoreTimerSnapshot(com.apple.foundationdb.record.provider.common.StoreTimerSnapshot) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) Test(org.junit.jupiter.api.Test)

Example 19 with RecordCursorResult

use of com.apple.foundationdb.record.RecordCursorResult in project fdb-record-layer by FoundationDB.

the class ProbableIntersectionCursorTest method basicIntersection.

/**
 * Show that a basic intersection succeeds.
 */
@Test
public void basicIntersection() {
    final FDBStoreTimer timer = new FDBStoreTimer();
    final Iterator<Integer> iterator1 = IntStream.iterate(0, x -> x + 2).limit(150).iterator();
    final Iterator<Integer> iterator2 = IntStream.iterate(0, x -> x + 3).limit(100).iterator();
    final FirableCursor<Integer> cursor1 = new FirableCursor<>(RecordCursor.fromIterator(iterator1));
    final FirableCursor<Integer> cursor2 = new FirableCursor<>(RecordCursor.fromIterator(iterator2));
    final RecordCursor<Integer> intersectionCursor = ProbableIntersectionCursor.create(Collections::singletonList, Arrays.asList(bignore -> cursor1, bignore -> cursor2), null, timer);
    // Intersection consumes first cursor
    cursor1.fireAll();
    CompletableFuture<RecordCursorResult<Integer>> firstFuture = intersectionCursor.onNext();
    cursor2.fire();
    RecordCursorResult<Integer> firstResult = firstFuture.join();
    assertEquals(0, (int) firstResult.get());
    assertThat(firstResult.hasNext(), is(true));
    assertEquals(cursor1.getNext().getNoNextReason(), RecordCursor.NoNextReason.SOURCE_EXHAUSTED);
    // Intersection consumes second cursor as they come
    cursor2.fireAll();
    AtomicInteger falsePositives = new AtomicInteger();
    AsyncUtil.whileTrue(() -> intersectionCursor.onNext().thenApply(result -> {
        if (result.hasNext()) {
            int value = result.get();
            // every result *must* be divisible by 3
            assertEquals(0, value % 3);
            if (value % 2 != 0) {
                // most results should be divisible by 2
                falsePositives.incrementAndGet();
            }
            assertThat(result.getContinuation().isEnd(), is(false));
            assertNotNull(result.getContinuation().toBytes());
            try {
                RecordCursorProto.ProbableIntersectionContinuation protoContinuation = RecordCursorProto.ProbableIntersectionContinuation.parseFrom(result.getContinuation().toBytes());
                assertEquals(2, protoContinuation.getChildStateCount());
                assertThat(protoContinuation.getChildState(0).getExhausted(), is(true));
                assertThat(protoContinuation.getChildState(0).hasContinuation(), is(false));
                assertThat(protoContinuation.getChildState(1).getExhausted(), is(false));
                assertThat(protoContinuation.getChildState(1).hasContinuation(), is(true));
            } catch (InvalidProtocolBufferException e) {
                throw new RecordCoreException("error parsing proto continuation", e);
            }
        } else {
            assertThat(result.getNoNextReason().isSourceExhausted(), is(true));
            assertThat(result.getContinuation().isEnd(), is(true));
            assertNull(result.getContinuation().toBytes());
        }
        return result.hasNext();
    }), intersectionCursor.getExecutor()).join();
    assertThat(falsePositives.get(), lessThan(5));
    assertEquals(50 + falsePositives.get(), timer.getCount(FDBStoreTimer.Counts.QUERY_INTERSECTION_PLAN_MATCHES));
    assertEquals(200 - falsePositives.get(), timer.getCount(FDBStoreTimer.Counts.QUERY_INTERSECTION_PLAN_NONMATCHES));
}
Also used : IntStream(java.util.stream.IntStream) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) RowLimitedCursor(com.apple.foundationdb.record.cursors.RowLimitedCursor) LoggerFactory(org.slf4j.LoggerFactory) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) Random(java.util.Random) CompletableFuture(java.util.concurrent.CompletableFuture) AsyncUtil(com.apple.foundationdb.async.AsyncUtil) Function(java.util.function.Function) Iterators(com.google.common.collect.Iterators) HashSet(java.util.HashSet) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) KeyValueLogMessage(com.apple.foundationdb.record.logging.KeyValueLogMessage) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) TestLogMessageKeys(com.apple.foundationdb.record.logging.TestLogMessageKeys) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) FirableCursor(com.apple.foundationdb.record.cursors.FirableCursor) Matchers.lessThan(org.hamcrest.Matchers.lessThan) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Nonnull(javax.annotation.Nonnull) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) Matchers.lessThanOrEqualTo(org.hamcrest.Matchers.lessThanOrEqualTo) BloomFilter(com.google.common.hash.BloomFilter) Set(java.util.Set) Collectors(java.util.stream.Collectors) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) Test(org.junit.jupiter.api.Test) ExecutionException(java.util.concurrent.ExecutionException) List(java.util.List) Stream(java.util.stream.Stream) RecordCursorProto(com.apple.foundationdb.record.RecordCursorProto) RecordCursor(com.apple.foundationdb.record.RecordCursor) RecordCursorTest(com.apple.foundationdb.record.RecordCursorTest) Matchers.is(org.hamcrest.Matchers.is) Collections(java.util.Collections) FirableCursor(com.apple.foundationdb.record.cursors.FirableCursor) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) Collections(java.util.Collections) RecordCursorProto(com.apple.foundationdb.record.RecordCursorProto) Test(org.junit.jupiter.api.Test) RecordCursorTest(com.apple.foundationdb.record.RecordCursorTest)

Example 20 with RecordCursorResult

use of com.apple.foundationdb.record.RecordCursorResult in project fdb-record-layer by FoundationDB.

the class ProbableIntersectionCursorTest method errorAndLimitInChild.

@Test
public void errorAndLimitInChild() {
    CompletableFuture<Integer> future = new CompletableFuture<>();
    RecordCursor<Integer> cursor = ProbableIntersectionCursor.create(Collections::singletonList, Arrays.asList(continuation -> RecordCursor.fromList(Arrays.asList(1, 2), continuation).limitRowsTo(1), continuation -> RecordCursor.fromFuture(future)), null, null);
    CompletableFuture<RecordCursorResult<Integer>> cursorResultFuture = cursor.onNext();
    final RecordCoreException ex = new RecordCoreException("something bad happened!");
    future.completeExceptionally(ex);
    ExecutionException executionException = assertThrows(ExecutionException.class, cursorResultFuture::get);
    assertNotNull(executionException.getCause());
    assertSame(ex, executionException.getCause());
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) IntStream(java.util.stream.IntStream) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) RowLimitedCursor(com.apple.foundationdb.record.cursors.RowLimitedCursor) LoggerFactory(org.slf4j.LoggerFactory) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) Random(java.util.Random) CompletableFuture(java.util.concurrent.CompletableFuture) AsyncUtil(com.apple.foundationdb.async.AsyncUtil) Function(java.util.function.Function) Iterators(com.google.common.collect.Iterators) HashSet(java.util.HashSet) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) KeyValueLogMessage(com.apple.foundationdb.record.logging.KeyValueLogMessage) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) TestLogMessageKeys(com.apple.foundationdb.record.logging.TestLogMessageKeys) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) FirableCursor(com.apple.foundationdb.record.cursors.FirableCursor) Matchers.lessThan(org.hamcrest.Matchers.lessThan) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Nonnull(javax.annotation.Nonnull) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) Matchers.lessThanOrEqualTo(org.hamcrest.Matchers.lessThanOrEqualTo) BloomFilter(com.google.common.hash.BloomFilter) Set(java.util.Set) Collectors(java.util.stream.Collectors) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) Test(org.junit.jupiter.api.Test) ExecutionException(java.util.concurrent.ExecutionException) List(java.util.List) Stream(java.util.stream.Stream) RecordCursorProto(com.apple.foundationdb.record.RecordCursorProto) RecordCursor(com.apple.foundationdb.record.RecordCursor) RecordCursorTest(com.apple.foundationdb.record.RecordCursorTest) Matchers.is(org.hamcrest.Matchers.is) Collections(java.util.Collections) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) CompletableFuture(java.util.concurrent.CompletableFuture) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) Collections(java.util.Collections) ExecutionException(java.util.concurrent.ExecutionException) Test(org.junit.jupiter.api.Test) RecordCursorTest(com.apple.foundationdb.record.RecordCursorTest)

Aggregations

RecordCursorResult (com.apple.foundationdb.record.RecordCursorResult)42 RecordCursor (com.apple.foundationdb.record.RecordCursor)35 List (java.util.List)33 Nonnull (javax.annotation.Nonnull)31 Arrays (java.util.Arrays)30 Message (com.google.protobuf.Message)28 Collections (java.util.Collections)28 Test (org.junit.jupiter.api.Test)28 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)27 ExecuteProperties (com.apple.foundationdb.record.ExecuteProperties)25 Collectors (java.util.stream.Collectors)25 Index (com.apple.foundationdb.record.metadata.Index)24 Function (java.util.function.Function)23 ScanProperties (com.apple.foundationdb.record.ScanProperties)21 Tags (com.apple.test.Tags)21 ArrayList (java.util.ArrayList)21 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)21 Tag (org.junit.jupiter.api.Tag)21 CompletableFuture (java.util.concurrent.CompletableFuture)20 TupleRange (com.apple.foundationdb.record.TupleRange)18