Package org.voltdb

Examples of org.voltdb.VoltTable.advanceRow()


            vt.addRow(row);
        } // FOR
        assertEquals(num_rows, vt.getRowCount());
       
        vt.resetRowPosition();
        while (vt.advanceRow()) {
            VoltTableRow row = vt.getRow();
           
            String w_name = row.getString(catalog_col.getIndex());
            int name_p = p_estimator.getHasher().hash(w_name);
            assert(name_p >= 0 && name_p <= NUM_PARTITIONS);
View Full Code Here


            byte blobBytes[] = sb.toString().getBytes("UTF-8");
            for (long ii = 0; ii < m_partitionCount; ii++) {
                System.err.println("Loading blob ID " + ii);
                try {
                    VoltTable vt = this.getClientHandle().callProcedure("InsertBlob", ii, blobBytes).getResults()[0];
                    vt.advanceRow();
                    final byte bytes[] = vt.getStringAsBytes(1);
                    if (bytes.length != m_blobSize) {
                        System.err.println("Returned blob size was not correct. Expected "
                                + m_blobSize + " but got " + bytes.length);
                        System.exit(-1);
View Full Code Here

            f.delimiter_rows = new String[rows.length];
            for (int i = 0; i < rows.length; i++) {
                rows[i] = new Object[header.length];
                f.delimiter_rows[i] = "-";
               
                boolean adv = vt.advanceRow();
                assert(adv);
                for (int j = 0; j < header.length; j++) {
                    rows[i][j] = vt.get(j);
                    if (vt.wasNull()) {
                        rows[i][j] = null;
View Full Code Here

            } // FOR
           
            // DATA
            this.output[i] = new Object[vt.getRowCount()][vt.getColumnCount()];
            int j = 0;
            while (vt.advanceRow()) {
                VoltTableRow row = vt.getRow();
                for (int k = 0; k < this.output[i][j].length; k++) {
                    this.output[i][j][k] = row.get(k);
                } // FOR (columns)
                j++;
View Full Code Here

           
            VoltTable.ColumnInfo cols[] = Arrays.copyOfRange(VoltTableUtil.extractColumnInfo(vt), offset, vt.getColumnCount());
            Map<String, Object[]> totalRows = new TreeMap<String, Object[]>();
            Map<String, List<Double>[]> stdevRows = new HashMap<String, List<Double>[]>();
           
            while (vt.advanceRow()) {
                String procName = vt.getString(offset);
                Object row[] = totalRows.get(procName);
                List<Double> stdevs[] = stdevRows.get(procName);
                if (row == null) {
                    row = new Object[cols.length];
View Full Code Here

                VoltTable vt = clientResponse.getResults()[0];
                long totals[] = new long[vt.getColumnCount()];
                Arrays.fill(totals, 0);
                int colOffsets[] = null;
               
                while (vt.advanceRow()) {
                    if (colOffsets == null) {
                        colOffsets = new int[MemoryStats.COLUMNS.length];
                        for (int i = 0; i < MemoryStats.COLUMNS.length; i++) {
                            ColumnInfo col = MemoryStats.COLUMNS[i];
                            colOffsets[i] = vt.getColumnIndex(col.getName());
View Full Code Here

            orig_position = table.getActiveRowIndex();
            table.resetRowPosition();

            // Iterate through all rows and check if they satisfy the
            // constraints.
            while (isSatisfied && table.advanceRow()) {
                isSatisfied = Verification.checkRow(m_constraints.get(key), table);
            }

            // Have to reset the position to its original position.
            if (orig_position < 0)
View Full Code Here

                   
                // CALCULATE DELAY
                long timestamp = System.currentTimeMillis();
                long delay = timestamp - br.getLastTimestamp();
               
                while (vt.advanceRow()) {
                  Object row[] = new Object[COLUMNS.length];
                    int idx = 0;
                    row[idx++] = interval;
                    row[idx++] = br.getElapsedTime() + delay;                   
                    row[idx++] = timestamp;
View Full Code Here

        if (s1 != null) {
            VoltTable stats = s1[0];
            assert(stats != null);

            // rollup the table memory stats for this site
            while (stats.advanceRow()) {
                int idx = 7;
                tupleCount += stats.getLong("TUPLE_COUNT");
                tupleAccessCount += stats.getLong("TUPLE_ACCESSES");
                tupleAllocatedMem += (int) stats.getLong("TUPLE_ALLOCATED_MEMORY");
                tupleDataMem += (int) stats.getLong("TUPLE_DATA_MEMORY");
View Full Code Here

        VoltTable vt = cresponse.getResults()[0];
        System.err.println(VoltTableUtil.format(vt));
        assertEquals(NUM_PARTITONS, vt.getRowCount());
        PartitionExecutorProfiler profiler = this.executor.getDebugContext().getProfiler();
        assertNotNull(profiler);
        while (vt.advanceRow()) {
            int partition = (int)vt.getLong("PARTITION");
            assertTrue(partition >= 0);
            assertTrue(partition < NUM_PARTITONS);
           
            // We expect the following things:
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.