Search in sources :

Example 56 with ColumnInfo

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

the class ImporterStatsCollector method populateColumnSchema.

@Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
    super.populateColumnSchema(columns);
    columns.add(new ColumnInfo(IMPORTER_NAME_COL, VoltType.STRING));
    columns.add(new ColumnInfo(PROC_NAME_COL, VoltType.STRING));
    columns.add(new ColumnInfo(SUCCESS_COUNT_COL, VoltType.BIGINT));
    columns.add(new ColumnInfo(FAILURE_COUNT_COL, VoltType.BIGINT));
    columns.add(new ColumnInfo(PENDING_COUNT_COL, VoltType.BIGINT));
    columns.add(new ColumnInfo(RETRY_COUNT_COL, VoltType.BIGINT));
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Example 57 with ColumnInfo

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

the class KSafetyStats method populateColumnSchema.

@Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
    columns.add(new ColumnInfo(Constants.TIMESTAMP, VoltType.BIGINT));
    columns.add(new ColumnInfo(Constants.PARTITION_ID, VoltType.INTEGER));
    columns.add(new ColumnInfo(Constants.MISSING_REPLICA, VoltType.INTEGER));
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo)

Example 58 with ColumnInfo

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

the class JDBC4DatabaseMetaData method getImportedKeys.

// Retrieves a description of the primary key columns that are referenced by the given table's foreign key columns (the primary keys imported by a table) throws SQLException.
@Override
public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException {
    checkClosed();
    VoltTable vtable = new VoltTable(new ColumnInfo("PKTABLE_CAT", VoltType.STRING), new ColumnInfo("PKTABLE_SCHEM", VoltType.STRING), new ColumnInfo("PKTABLE_NAME", VoltType.STRING), new ColumnInfo("PKCOLUMN_NAME", VoltType.STRING), new ColumnInfo("FKTABLE_CAT", VoltType.STRING), new ColumnInfo("FKTABLE_SCHEM", VoltType.STRING), new ColumnInfo("FKTABLE_NAME", VoltType.STRING), new ColumnInfo("FKCOLUMN_NAME", VoltType.STRING), new ColumnInfo("KEY_SEQ", VoltType.SMALLINT), new ColumnInfo("UPDATE_RULE", VoltType.SMALLINT), new ColumnInfo("DELETE_RULE", VoltType.SMALLINT), new ColumnInfo("FK_NAME", VoltType.STRING), new ColumnInfo("PK_NAME", VoltType.STRING), new ColumnInfo("DEFERRABILITY", VoltType.SMALLINT));
    //NB: @SystemCatalog(?) will need additional support if we want to
    // populate the table.
    JDBC4ResultSet res = new JDBC4ResultSet(this.sysCatalog, vtable);
    return res;
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo) VoltTable(org.voltdb.VoltTable)

Example 59 with ColumnInfo

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

the class JDBC4DatabaseMetaData method getSchemas.

// Retrieves the schema names available in this database.
@Override
public ResultSet getSchemas() throws SQLException {
    checkClosed();
    VoltTable vtable = new VoltTable(new ColumnInfo("TABLE_SCHEM", VoltType.STRING), new ColumnInfo("TABLE_CATALOG", VoltType.STRING));
    JDBC4ResultSet res = new JDBC4ResultSet(this.sysCatalog, vtable);
    return res;
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo) VoltTable(org.voltdb.VoltTable)

Example 60 with ColumnInfo

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

the class ValidatePartitioning method constructPartitioningResultsTable.

private VoltTable constructPartitioningResultsTable() {
    ColumnInfo[] result_columns = new ColumnInfo[5];
    int ii = 0;
    result_columns[ii++] = new ColumnInfo(CNAME_HOST_ID, CTYPE_ID);
    result_columns[ii++] = new ColumnInfo(CNAME_SITE_ID, CTYPE_ID);
    result_columns[ii++] = new ColumnInfo(CNAME_PARTITION_ID, CTYPE_ID);
    result_columns[ii++] = new ColumnInfo("TABLE", VoltType.STRING);
    result_columns[ii++] = new ColumnInfo("MISPARTITIONED_ROWS", VoltType.BIGINT);
    return new VoltTable(result_columns);
}
Also used : ColumnInfo(org.voltdb.VoltTable.ColumnInfo) VoltTable(org.voltdb.VoltTable)

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