Search in sources :

Example 66 with ColumnInfo

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

the class LatencyStats method populateColumnSchema.

@Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
    // timestamp is milliseconds
    super.populateColumnSchema(columns);
    // milliseconds
    columns.add(new ColumnInfo("INTERVAL", VoltType.INTEGER));
    // samples
    columns.add(new ColumnInfo("COUNT", VoltType.INTEGER));
    // samples per second
    columns.add(new ColumnInfo("TPS", VoltType.INTEGER));
    // microseconds
    columns.add(new ColumnInfo("P50", VoltType.BIGINT));
    // microseconds
    columns.add(new ColumnInfo("P95", VoltType.BIGINT));
    // microseconds
    columns.add(new ColumnInfo("P99", VoltType.BIGINT));
    // microseconds
    columns.add(new ColumnInfo("P99.9", VoltType.BIGINT));
    // microseconds
    columns.add(new ColumnInfo("P99.99", VoltType.BIGINT));
    // microseconds
    columns.add(new ColumnInfo("P99.999", VoltType.BIGINT));
    // microseconds
    columns.add(new ColumnInfo("MAX", VoltType.BIGINT));
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Example 67 with ColumnInfo

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

the class LatencyUncompressedHistogramStats method populateColumnSchema.

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

Example 68 with ColumnInfo

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

the class IndexStats method populateColumnSchema.

// Generally we fill in this schema from the EE, but we'll provide
// this so that we can fill in an empty table before the EE has
// provided us with a table.  Make sure that any changes to the EE
// schema are reflected here (sigh).
@Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
    super.populateColumnSchema(columns);
    columns.add(new ColumnInfo("PARTITION_ID", VoltType.BIGINT));
    columns.add(new ColumnInfo("INDEX_NAME", VoltType.STRING));
    columns.add(new ColumnInfo("TABLE_NAME", VoltType.STRING));
    columns.add(new ColumnInfo("INDEX_TYPE", VoltType.STRING));
    columns.add(new ColumnInfo("IS_UNIQUE", VoltType.TINYINT));
    columns.add(new ColumnInfo("IS_COUNTABLE", VoltType.TINYINT));
    columns.add(new ColumnInfo("ENTRY_COUNT", VoltType.BIGINT));
    columns.add(new ColumnInfo("MEMORY_ESTIMATE", VoltType.BIGINT));
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Example 69 with ColumnInfo

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

the class IOStats 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("BYTES_READ", VoltType.BIGINT));
    columns.add(new ColumnInfo("MESSAGES_READ", VoltType.BIGINT));
    columns.add(new ColumnInfo("BYTES_WRITTEN", VoltType.BIGINT));
    columns.add(new ColumnInfo("MESSAGES_WRITTEN", VoltType.BIGINT));
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Example 70 with ColumnInfo

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

the class SnapshotScanAgent method collectStatsImpl.

@Override
protected void collectStatsImpl(Connection c, long clientHandle, OpsSelector selector, ParameterSet params) throws Exception {
    JSONObject obj = new JSONObject();
    obj.put("selector", "SNAPSHOTSCAN");
    String err = null;
    if (selector == OpsSelector.SNAPSHOTSCAN) {
        err = parseParams(params, obj);
    } else {
        err = "SnapshotScanAgent received non-SNAPSHOTSCAN selector: " + selector.name();
    }
    if (err != null) {
        // Maintain old @SnapshotScan behavior.
        ColumnInfo[] result_columns = new ColumnInfo[1];
        result_columns[0] = new ColumnInfo("ERR_MSG", VoltType.STRING);
        VoltTable[] results = new VoltTable[] { new VoltTable(result_columns) };
        results[0].addRow(err);
        ClientResponseImpl errorResponse = new ClientResponseImpl(ClientResponse.SUCCESS, ClientResponse.UNINITIALIZED_APP_STATUS_CODE, null, results, err);
        errorResponse.setClientHandle(clientHandle);
        ByteBuffer buf = ByteBuffer.allocate(errorResponse.getSerializedSize() + 4);
        buf.putInt(buf.capacity() - 4);
        errorResponse.flattenToBuffer(buf).flip();
        c.writeStream().enqueue(buf);
        return;
    }
    String subselector = obj.getString("subselector");
    PendingOpsRequest psr = new PendingOpsRequest(selector, subselector, c, clientHandle, System.currentTimeMillis(), obj);
    distributeOpsWork(psr, obj);
}
Also used : JSONObject(org.json_voltpatches.JSONObject) ColumnInfo(org.voltdb.VoltTable.ColumnInfo) ByteBuffer(java.nio.ByteBuffer)

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