Package org.voltdb

Examples of org.voltdb.VoltTable.advanceRow()


           
            // ITEM Result Tables
            for (int i = idx; i < results.length; i++) {
                VoltTable vt = results[i];
                assert(vt != null);
                while (vt.advanceRow()) {
                    ItemId itemId = this.processItemRecord(vt);
                    assert(itemId != null);
                } // WHILE
            } // FOR
        }
View Full Code Here


            assert(results.length == 2) :
                String.format("Unexpected result set with %d tables", results.length);

            // FLIGHT INFORMATION
            VoltTable flightInfo = results[0];
            boolean adv = flightInfo.advanceRow();
            assert(adv);
            long flight_id = flightInfo.getLong("F_ID");
            assert(flight_id == element.longValue());

            // OPEN SEAT INFORMATION
View Full Code Here

   
            // Store pending reservations in our queue for a later transaction           
            BitSet seats = getSeatsBitSet(element);
           
            int clientId = getClientId();
            while (seatInfo.advanceRow()) {
                int seatnum = (int)seatInfo.getLong(1);
                if (seatnum < SEATSConstants.FLIGHTS_RESERVED_SEATS) {
                    continue;
                }
             
View Full Code Here

            if (scanResults.getString("RESULT").equals("SUCCESS") && scanResults.getString("READABLE").equals("TRUE") && scanResults.getString("COMPLETED").equals("TRUE")) {
                hashToSnapshot(scanResults, aggregates);
            }
        }

        while (digestScanResults.advanceRow()) {
            if (digestScanResults.getString("RESULT").equals("SUCCESS")) {
                hashDigestToSnapshot(digestScanResults, aggregates);
            }
        }
View Full Code Here

                if (debug)
                    LOG.debug(String.format("Updated Status for Item %d => %s", itemId, status));
               
                if (with_bids[i]) {
                    final VoltTable vt = bidResults[bidResultsCtr++];
                    boolean adv = vt.advanceRow();
                    assert(adv);
                    long bidId = vt.getLong(0);
                    long buyerId = vt.getLong(1);
                   
                    output_rows[i][RESULT_COLS.length-2] = bidId;   // imb_ib_id
View Full Code Here

                }
            }else{
                vt = ee.antiCacheEvictBlock(tables[i], blockSizes[i], numBlocks[i]);   
            }
           
            boolean adv = vt.advanceRow();
           
            if (!adv) {
                String msg = String.format("antiCacheEvictBlock failed to return any rows.");
                throw new VoltAbortException(msg);
            }
View Full Code Here

    {
        ArrayList<Result> results = new ArrayList<Result>();
        voltQueueSQL(resultStmt);
        VoltTable summary = voltExecuteSQL()[0];
        String state = "";
        while(summary.advanceRow()) {
            if (!summary.getString(1).equals(state)) {
                state = summary.getString(1);
                if (summary.getLong(0) == contestantNumber)
                    results.add(new Result(state, summary.getLong(2)));
            }
View Full Code Here

        ArrayList<Result> results = new ArrayList<Result>();
        voltQueueSQL(resultStmt);
        VoltTable summary = voltExecuteSQL()[0];
        String state = "";
   
        while(summary.advanceRow()) {
            if (!summary.getString(1).equals(state)) {
                state = summary.getString(1);
                results.add(new Result(state, (int)summary.getLong(0), summary.getLong(2), (byte)1));
            }
            else {
View Full Code Here

        System.err.println(VoltTableUtil.format(evictResult));
        assertNotNull(evictResult);
        assertEquals(2, evictResult.getRowCount());
        //assertNotSame(results[0].getColumnCount(), evictResult.getColumnCount());
        evictResult.resetRowPosition();
        boolean adv = evictResult.advanceRow();
        assertTrue(adv);
          return (evictResult);
    }

    // --------------------------------------------------------------------------------------------
View Full Code Here

        assertEquals(2, resultTable.getRowCount());
        resultTable.resetRowPosition();
        System.err.println("-------------------------------");
        System.err.println(VoltTableUtil.format(results));

        resultTable.advanceRow();
        for (String col : statsFields) {
            assertEquals(col, evictResult.getLong(col), resultTable.getLong(col));
            if (col == "BLOCKS_EVICTED") {
                assertEquals(col, 1, resultTable.getLong(col));
            } else {
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.