Search in sources :

Example 71 with ColumnInfo

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

the class SnapshotScanAgent method constructDiskFreeResultsTable.

private VoltTable constructDiskFreeResultsTable() {
    ColumnInfo[] result_columns = new ColumnInfo[8];
    int ii = 0;
    result_columns[ii++] = new ColumnInfo(VoltSystemProcedure.CNAME_HOST_ID, VoltSystemProcedure.CTYPE_ID);
    result_columns[ii++] = new ColumnInfo("HOSTNAME", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("PATH", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("TOTAL", VoltType.BIGINT);
    result_columns[ii++] = new ColumnInfo("FREE", VoltType.BIGINT);
    result_columns[ii++] = new ColumnInfo("USED", VoltType.BIGINT);
    result_columns[ii++] = new ColumnInfo("RESULT", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("ERR_MSG", VoltType.STRING);
    return new VoltTable(result_columns);
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Example 72 with ColumnInfo

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

the class SnapshotScanAgent method constructFragmentResultsTable.

private VoltTable constructFragmentResultsTable() {
    ColumnInfo[] result_columns = new ColumnInfo[16];
    int ii = 0;
    result_columns[ii++] = new ColumnInfo(VoltSystemProcedure.CNAME_HOST_ID, VoltSystemProcedure.CTYPE_ID);
    result_columns[ii++] = new ColumnInfo("HOSTNAME", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("PATH", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("NAME", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("TXNID", VoltType.BIGINT);
    result_columns[ii++] = new ColumnInfo("CREATED", VoltType.BIGINT);
    result_columns[ii++] = new ColumnInfo("TABLE", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("COMPLETED", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("SIZE", VoltType.BIGINT);
    result_columns[ii++] = new ColumnInfo("IS_REPLICATED", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("PARTITIONS", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("TOTAL_PARTITIONS", VoltType.BIGINT);
    result_columns[ii++] = new ColumnInfo("READABLE", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("RESULT", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("ERR_MSG", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("PATHTYPE", VoltType.STRING);
    return new VoltTable(result_columns);
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Example 73 with ColumnInfo

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

the class SnapshotDeleteAgent method collectStatsImpl.

@Override
protected void collectStatsImpl(Connection c, long clientHandle, OpsSelector selector, ParameterSet params) throws Exception {
    JSONObject obj = new JSONObject();
    obj.put("selector", "SNAPSHOTDELETE");
    String err = null;
    if (selector == OpsSelector.SNAPSHOTDELETE) {
        err = parseParams(params, obj);
    } else {
        err = "SnapshotDeleteAgent received non-SNAPSHOTDELETE selector: " + selector.name();
    }
    if (err != null) {
        // Maintain old @SnapshotDelete 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)

Example 74 with ColumnInfo

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

the class PartitionCountStats method populateColumnSchema.

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

Example 75 with ColumnInfo

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

the class PlannerStatsCollector method populateColumnSchema.

/**
     * Specifies the columns of statistics that are added by this class to the schema of a statistical results.
     * @param columns List of columns that are in a stats row.
     */
@Override
protected void populateColumnSchema(ArrayList<VoltTable.ColumnInfo> columns) {
    super.populateColumnSchema(columns);
    columns.add(new ColumnInfo(VoltSystemProcedure.CNAME_SITE_ID, VoltSystemProcedure.CTYPE_ID));
    columns.add(new ColumnInfo("PARTITION_ID", VoltType.INTEGER));
    columns.add(new ColumnInfo("CACHE1_LEVEL", VoltType.INTEGER));
    columns.add(new ColumnInfo("CACHE2_LEVEL", VoltType.INTEGER));
    columns.add(new ColumnInfo("CACHE1_HITS", VoltType.BIGINT));
    columns.add(new ColumnInfo("CACHE2_HITS", VoltType.BIGINT));
    columns.add(new ColumnInfo("CACHE_MISSES", VoltType.BIGINT));
    columns.add(new ColumnInfo("PLAN_TIME_MIN", VoltType.BIGINT));
    columns.add(new ColumnInfo("PLAN_TIME_MAX", VoltType.BIGINT));
    columns.add(new ColumnInfo("PLAN_TIME_AVG", 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