Examples of closeTopLevel()


Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

                SortOption.PRESERVE_DUPLICATES);
        Cursor cursor = cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();
        while (cursor.next() != null) {
        }
        cursor.closeTopLevel();
        if (print) {
            System.out.println("---------------------------------------------------------------------");
            System.out.println(String.format("Sort %s on field %s", n, field == 0 ? "id" : "rand"));
            TapReport[] reports = Tap.getReport(OPERATOR_TAPS);
            for (TapReport report : reports) {
View Full Code Here

Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

            cursor.openTopLevel();
            for (int s = 0; s < sequentialAccessesPerRandom; s++) {
                Row row = cursor.next();
                assert row != null;
            }
            cursor.closeTopLevel();
        }
        long end = System.nanoTime();
        if (label != null) {
            double averageMsec = (double) (end - start) / (1000 * runs);
            System.out.println(String.format("%s:  %s usec", label, averageMsec));
View Full Code Here

Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

        for (int s = 0; s < SCANS; s++) {
            Cursor cursor = cursor(plan, queryContext, queryBindings);
            cursor.openTopLevel();
            while (cursor.next() != null) {
            }
            cursor.closeTopLevel();
        }
        TapReport[] reports = Tap.getReport(".*");
        for (TapReport report : reports) {
            System.out.println(report);
        }
View Full Code Here

Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

                            case 1: to(Stage.SCAN_FIRST_ROW); break;
                            case 2: to(Stage.SCAN_SECOND_ROW); break;
                        }
                    }
                } finally {
                    cursor.closeTopLevel();
                }
                to(Stage.POST_SCAN);

                to(Stage.PRE_COMMIT);
                getServiceHolder().getTransactionService().commitTransaction(session);
View Full Code Here

Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

                    valueHolder.putString((String) key, null);
                }
                cursor.openTopLevel();
                Row row = cursor.next();
                assert row != null;
                cursor.closeTopLevel();
            }
        }
        long endTime = System.nanoTime();
        if (label != null) {
            double averageUsec = (endTime - startTime) / (1000.0 * runs * sequentialAccessesPerRandom);
 
View Full Code Here

Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

                    Row row;
                    while((row = cursor.next()) != null) {
                        rows.add(row);
                    }
                } finally {
                    cursor.closeTopLevel();
                }
                return rows;
            }
        });
    }
View Full Code Here

Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

            while((row = cursor.next()) != null) {
                output.add(row);
            }
            return output;
        } finally {
            cursor.closeTopLevel();
        }
    }

    protected static Set<Integer> set(Integer... items) {
        return new HashSet<>(Arrays.asList(items));
View Full Code Here

Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

        for (int s = 0; s < SCANS; s++) {
            Cursor cursor = cursor(plan, queryContext, queryBindings);
            cursor.openTopLevel();
            while (cursor.next() != null) {
            }
            cursor.closeTopLevel();
        }
        long end = System.nanoTime();
        double sec = (end - start) / (1000.0 * 1000 * 1000);
        System.out.println(String.format("scans: %s, db: %s/%s/%s, time: %s",
                                         SCANS, CUSTOMERS, ORDERS_PER_CUSTOMER, ITEMS_PER_ORDER, sec));
View Full Code Here

Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

            Operator plan = indexScan_Default(idxRowType, bounded(1, 11, true, 13, true), ordering);
            Cursor cursor = cursor(plan, queryContext, queryBindings);
            cursor.openTopLevel();
            testJump(cursor, idOrdering, 0);
            testJump(cursor, idOrdering, -1);
            cursor.closeTopLevel();
        }
        {
            Operator plan = indexScan_Default(idxRowType, bounded(1, 11, true, 13, false), ordering);
            Cursor cursor = cursor(plan, queryContext, queryBindings);
            cursor.openTopLevel();
View Full Code Here

Examples of com.foundationdb.qp.operator.Cursor.closeTopLevel()

            Operator plan = indexScan_Default(idxRowType, bounded(1, 11, true, 13, false), ordering);
            Cursor cursor = cursor(plan, queryContext, queryBindings);
            cursor.openTopLevel();
            testJump(cursor, first4(idOrdering), 0);
            testJump(cursor, first4(idOrdering), -1);
            cursor.closeTopLevel();
        }
        {
            Operator plan = indexScan_Default(idxRowType, bounded(1, 11, false, 13, true), ordering);
            Cursor cursor = cursor(plan, queryContext, queryBindings);
            cursor.openTopLevel();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.