Package org.voltdb

Examples of org.voltdb.VoltTable.addRow()


        VoltTable vt = CatalogUtil.getVoltTable(catalog_tbl);
        assertNotNull(vt);
        for (int i = 0; i < NUM_TUPLES; i++) {
            Object row[] = VoltTableUtil.getRandomRow(catalog_tbl);
            row[0] = i;
            vt.addRow(row);
            if (i == 1) readBackTracker = row[1].toString();
        } // FOR
        this.executor.loadTable(1000l, catalog_tbl, vt, false);
       
        VoltTable stats[] = this.ee.getStats(SysProcSelector.TABLE, this.locators, false, 0L);
View Full Code Here


        results[0].advanceRow();
        results[1].advanceRow();
        double total = results[0].getDouble(0) + results[1].getDouble(0);
       
        final VoltTable finalResult = new VoltTable(RESULT_COLS);
        finalResult.addRow(total);
        return (finalResult);
    }
}
View Full Code Here

        int expectedNumItems = 10;
        VoltTable vt = CatalogUtil.getVoltTable(catalog_tbl);
        for (int i = 0; i < expectedNumItems; i++) {
            Object row[] = VoltTableUtil.getRandomRow(catalog_tbl);
            row[0] = i;
            vt.addRow(row);
        } // FOR
        RegressionSuiteUtil.load(client, catalog_tbl, vt);
       
        long numItems = RegressionSuiteUtil.getRowCount(client, catalog_tbl);
        assertEquals(expectedNumItems, numItems);
View Full Code Here

            col+=3; // disregard OL_I_ID,OL_SUPPLY_W_ID,OL_DELIVERY_D
            row[col++] = i * 2;
            row[col++] = 1.2 * i;
            row[col++] = "null message";
            assertEquals(col, 10);
            vt.addRow(row);
        } // FOR
       
        ClientResponse cr = client.callProcedure("@LoadMultipartitionTable", catalog_tbl.getName(), vt);
        assertEquals(Status.OK, cr.getStatus());
       
View Full Code Here

                    if (row[col].toString().length() >= maxSizes[col]) {
                        row[col] = row[col].toString().substring(0, maxSizes[col]-1);
                    }
                }
            } // FOR (col)
            vt.addRow(row);
        } // FOR (row)
        // System.err.printf("Loading %d rows for %s\n%s\n\n", vt.getRowCount(), catalog_tbl, vt.toString());
        load(client, catalog_tbl, vt);
    }
View Full Code Here

            final VoltTable table = new VoltTable(new VoltTable.ColumnInfo[] {
                    new VoltTable.ColumnInfo("foo", VoltType.STRING),
                    new VoltTable.ColumnInfo("foo", VoltType.STRING),
                    new VoltTable.ColumnInfo("foo", VoltType.STRING)
            });
            table.addRow(returnString, returnString, returnString);

            return new VoltTable[] {table};
        } else {
            return new VoltTable[0];
        }
View Full Code Here

            Object[] row = new Object[] { i, stringVal, i, new Double(i) };
            if (sb != null) {
                sb.append(i).append(delimeter).append(escapedVal).append(delimeter);
                sb.append(i).append(delimeter).append(new Double(i).toString()).append('\n');
            }
            repl_table.addRow(row);
        }
        return repl_table;
    }

    private VoltTable createPartitionedTable(int numberOfItems, int indexBase) {
View Full Code Here

        VoltTable partition_table = new VoltTable(new ColumnInfo("PT_ID", VoltType.INTEGER), new ColumnInfo("PT_NAME", VoltType.STRING), new ColumnInfo("PT_INTVAL", VoltType.INTEGER), new ColumnInfo(
                "PT_FLOATVAL", VoltType.FLOAT));

        for (int i = indexBase; i < numberOfItems + indexBase; i++) {
            Object[] row = new Object[] { i, "name_" + i, i, new Double(i) };
            partition_table.addRow(row);
        }

        return partition_table;
    }
View Full Code Here

            Object[] row = new Object[] { i, stringVal, i, new Double(i) };
            if (sb != null) {
                sb.append(i).append(delimeter).append(escapedVal).append(delimeter);
                sb.append(i).append(delimeter).append(new Double(i).toString()).append('\n');
            }
            repl_table.addRow(row);
        }
        return repl_table;
    }

    private VoltTable createPartitionedTable(int numberOfItems, int indexBase) {
View Full Code Here

        VoltTable partition_table = new VoltTable(new ColumnInfo("PT_ID", VoltType.INTEGER), new ColumnInfo("PT_NAME", VoltType.STRING), new ColumnInfo("PT_INTVAL", VoltType.INTEGER), new ColumnInfo(
                "PT_FLOATVAL", VoltType.FLOAT));

        for (int i = indexBase; i < numberOfItems + indexBase; i++) {
            Object[] row = new Object[] { i, "name_" + i, i, new Double(i) };
            partition_table.addRow(row);
        }

        return partition_table;
    }
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.