Examples of resetRowPosition()


Examples of org.voltdb.VoltTable.resetRowPosition()

        int k = -1;

        ClientResponse cr = callROProcedureWithRetry("@SystemInformation", "DEPLOYMENT");
        assert(cr.getStatus() == ClientResponse.SUCCESS);
        VoltTable result = cr.getResults()[0];
        result.resetRowPosition();
        while (result.advanceRow()) {
            String key = result.getString(0);
            String value = result.getString(1);
            if (key.equals("hostcount")) {
                hosts = Integer.parseInt(value);
View Full Code Here

Examples of org.voltdb.VoltTable.resetRowPosition()

        ClientResponse cr = callROProcedureWithRetry("@AdHoc",
                String.format("select * from %s where pkey >= %d order by pkey limit 100;",
                        TableHelper.getTableName(t), offset));
        assert(cr.getStatus() == ClientResponse.SUCCESS);
        VoltTable result = cr.getResults()[0];
        result.resetRowPosition();
        while (result.advanceRow()) {
            t2.add(result);
        }

        return t2;
View Full Code Here

Examples of org.voltdb.VoltTable.resetRowPosition()

    }

    public static String didSnapshotRequestFailWithErr(VoltTable results[]) {
        if (results.length < 1) return "HAD NO RESULT TABLES";
        final VoltTable result = results[0];
        result.resetRowPosition();
        //Crazy old code would return one column with an error message.
        //Not sure any of it exists anymore
        if (result.getColumnCount() == 1) {
            if (result.advanceRow()) {
                return result.getString(0);
View Full Code Here

Examples of org.voltdb.VoltTable.resetRowPosition()

        while (result.advanceRow()) {
            if (!result.getString("RESULT").equals("SUCCESS")) {
                err = result.getString("ERR_MSG");
            }
        }
        result.resetRowPosition();
        return err;
    }

    public static boolean didSnapshotRequestSucceed(VoltTable result[]) {
        return didSnapshotRequestFailWithErr(result) == null;
View Full Code Here

Examples of org.voltdb.VoltTable.resetRowPosition()

        return didSnapshotRequestFailWithErr(result) == null;
    }

    public static boolean isSnapshotInProgress(VoltTable results[]) {
        final VoltTable result = results[0];
        result.resetRowPosition();
        if (result.getColumnCount() == 1) {
            return false;
        }

        boolean inprogress = false;
View Full Code Here

Examples of org.voltdb.VoltTable.resetRowPosition()

        return inprogress;
    }

    public static boolean isSnapshotQueued(VoltTable results[]) {
        final VoltTable result = results[0];
        result.resetRowPosition();
        if (result.getColumnCount() == 1) {
            return false;
        }

        boolean queued = false;
View Full Code Here

Examples of org.voltdb.VoltTable.resetRowPosition()

                    resp = client.callProcedure("get_all_target_r_rows");
                }
                assertEquals(prefix + "could not fetch rows of target table", ClientResponse.SUCCESS, resp.getStatus());
                actualRows = resp.getResults()[0];

                expectedRows.resetRowPosition();
                assertTablesAreEqual(prefix, expectedRows, actualRows);
                actualNumRows = actualRows.getRowCount();
                assertEquals(prefix + "insert statement returned " + numRowsInserted + " but only " + actualNumRows + " rows selected from target table",
                        actualNumRows, numRowsInserted);
            }
View Full Code Here

Examples of org.voltdb.VoltTable.resetRowPosition()

                        result.add(vt);
                    }
                }
            }

            result.resetRowPosition();
        }

        return result;
    }
View Full Code Here

Examples of org.voltdb.VoltTable.resetRowPosition()

        assert(client != null);
        long rssMax = 0;
        try {
            ClientResponse r = client.callProcedure("@Statistics", "MEMORY", 0);
            VoltTable stats = r.getResults()[0];
            stats.resetRowPosition();
            while (stats.advanceRow()) {
                long rss = stats.getLong("RSS") / 1024;
                if (rss > rssMax) {
                    rssMax = rss;
                }
View Full Code Here

Examples of org.voltdb.VoltTable.resetRowPosition()

                    assert(stats.getColumnName(9).equals("TUPLE_DATA_MEMORY"));
                    tupleDataMem += (int) stats.getLong(9);
                    assert(stats.getColumnName(10).equals("STRING_DATA_MEMORY"));
                    stringMem += (int) stats.getLong(10);
                }
                stats.resetRowPosition();

                m_tableStats.setStatsTable(stats);
            }

            // update index stats
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.