Search in sources :

Example 61 with ColumnInfo

use of org.voltdb.VoltTable.ColumnInfo in project voltdb by VoltDB.

the class FloatParamToGetNiceComplaint method run.

public VoltTable run(float shouldReallyBeDouble) {
    ColumnInfo firstColumn = new ColumnInfo("floatie", VoltType.FLOAT);
    VoltTable vt = new VoltTable(firstColumn);
    vt.addRow(shouldReallyBeDouble);
    return vt;
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo) VoltTable(org.voltdb.VoltTable)

Example 62 with ColumnInfo

use of org.voltdb.VoltTable.ColumnInfo in project voltdb by VoltDB.

the class Summarize_Replica method run.

public VoltTable run(int cid, int ncid) {
    voltQueueSQL(dateSqlP, EXPECT_ZERO_OR_ONE_ROW, cid, cid + ncid);
    voltQueueSQL(dateSqlR, EXPECT_ZERO_OR_ONE_ROW, cid, cid + ncid);
    VoltTable[] results = voltExecuteSQL();
    long latest1 = results[0].getRowCount() > 0 ? results[0].asScalarLong() : 0;
    long latest2 = results[1].getRowCount() > 0 ? results[1].asScalarLong() : 0;
    long latest = Math.max(latest1, latest2);
    long sum = 0;
    for (int i = cid; i < cid + ncid; i++) {
        sum += countForCid(i);
    }
    VoltTable t = new VoltTable(new ColumnInfo("ts", VoltType.BIGINT), new ColumnInfo("count", VoltType.BIGINT));
    t.addRow(latest, sum);
    return t;
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo) VoltTable(org.voltdb.VoltTable)

Example 63 with ColumnInfo

use of org.voltdb.VoltTable.ColumnInfo in project voltdb by VoltDB.

the class CommandLogStats method populateColumnSchema.

@Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
    super.populateColumnSchema(columns);
    columns.add(new VoltTable.ColumnInfo(StatName.OUTSTANDING_BYTES.name(), VoltType.BIGINT));
    columns.add(new VoltTable.ColumnInfo(StatName.OUTSTANDING_TXNS.name(), VoltType.BIGINT));
    columns.add(new VoltTable.ColumnInfo(StatName.IN_USE_SEGMENT_COUNT.name(), VoltType.INTEGER));
    columns.add(new VoltTable.ColumnInfo(StatName.SEGMENT_COUNT.name(), VoltType.INTEGER));
    columns.add(new VoltTable.ColumnInfo(StatName.FSYNC_INTERVAL.name(), VoltType.INTEGER));
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Example 64 with ColumnInfo

use of org.voltdb.VoltTable.ColumnInfo in project voltdb by VoltDB.

the class CpuStats method populateColumnSchema.

@Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
    super.populateColumnSchema(columns);
    columns.add(new VoltTable.ColumnInfo("PERCENT_USED", VoltType.BIGINT));
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Example 65 with ColumnInfo

use of org.voltdb.VoltTable.ColumnInfo in project voltdb by VoltDB.

the class InitiatorStats method populateColumnSchema.

@Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
    super.populateColumnSchema(columns);
    columns.add(new ColumnInfo("CONNECTION_ID", VoltType.BIGINT));
    columns.add(new ColumnInfo("CONNECTION_HOSTNAME", VoltType.STRING));
    columns.add(new ColumnInfo("PROCEDURE_NAME", VoltType.STRING));
    columns.add(new ColumnInfo("INVOCATIONS", VoltType.BIGINT));
    columns.add(new ColumnInfo("AVG_EXECUTION_TIME", VoltType.INTEGER));
    columns.add(new ColumnInfo("MIN_EXECUTION_TIME", VoltType.INTEGER));
    columns.add(new ColumnInfo("MAX_EXECUTION_TIME", VoltType.INTEGER));
    columns.add(new ColumnInfo("ABORTS", VoltType.BIGINT));
    columns.add(new ColumnInfo("FAILURES", VoltType.BIGINT));
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Aggregations

ColumnInfo (org.voltdb.VoltTable.ColumnInfo)84 VoltTable (org.voltdb.VoltTable)40 Client (org.voltdb.client.Client)17 HashMap (java.util.HashMap)10 ByteBuffer (java.nio.ByteBuffer)6 DependencyPair (org.voltdb.DependencyPair)6 BigDecimal (java.math.BigDecimal)5 ArrayList (java.util.ArrayList)5 TimestampType (org.voltdb.types.TimestampType)5 Test (org.junit.Test)4 CSVWriter (au.com.bytecode.opencsv_voltpatches.CSVWriter)2 Map (java.util.Map)2 JSONObject (org.json_voltpatches.JSONObject)2 CatalogContext (org.voltdb.CatalogContext)2 CatalogSpecificPlanner (org.voltdb.CatalogSpecificPlanner)2 GeographyPointValue (org.voltdb.types.GeographyPointValue)2 GeographyValue (org.voltdb.types.GeographyValue)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 File (java.io.File)1 IOException (java.io.IOException)1