use of org.voltdb.compiler.VoltProjectBuilder in project voltdb by VoltDB.
the class TestShutdown method getBuilderForTest.
static VoltProjectBuilder getBuilderForTest() throws IOException {
VoltProjectBuilder builder = new VoltProjectBuilder();
builder.addLiteralSchema("");
return builder;
}
use of org.voltdb.compiler.VoltProjectBuilder in project voltdb by VoltDB.
the class TestShutdownSaveNoCommandLog method suite.
public static junit.framework.Test suite() throws Exception {
final MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestShutdownSaveNoCommandLog.class);
Map<String, String> additionalEnv = new HashMap<String, String>();
VoltProjectBuilder project = new VoltProjectBuilder();
project.addSchema(ArbitraryDurationProc.class.getResource("clientfeatures.sql"));
project.addProcedures(ArbitraryDurationProc.class);
project.setUseDDLSchema(true);
project.addPartitionInfo("indexme", "pkey");
LocalCluster config = new LocalCluster("prepare_shutdown_importer.jar", 4, HOST_COUNT, 0, BackendTarget.NATIVE_EE_JNI, LocalCluster.FailureState.ALL_RUNNING, true, false, additionalEnv);
config.setHasLocalServer(false);
boolean compile = config.compileWithAdminMode(project, -1, false);
assertTrue(compile);
builder.addServerConfig(config);
return builder;
}
use of org.voltdb.compiler.VoltProjectBuilder in project voltdb by VoltDB.
the class TestSqlAggregateSuite method suite.
public static junit.framework.Test suite() {
VoltServerConfig config = null;
MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestSqlAggregateSuite.class);
VoltProjectBuilder project = new VoltProjectBuilder();
project.addSchema(Insert.class.getResource("aggregate-sql-ddl.sql"));
project.addPartitionInfo("P1", "ID");
project.addProcedures(PROCEDURES);
config = new LocalCluster("sqlaggregate-onesite.jar", 1, 1, 0, BackendTarget.NATIVE_EE_JNI);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
config = new LocalCluster("sqlaggregate-twosites.jar", 2, 1, 0, BackendTarget.NATIVE_EE_JNI);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
config = new LocalCluster("sqlaggregate-twosites.jar", 2, 3, 1, BackendTarget.NATIVE_EE_JNI);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
// HSQL backend testing fails a few cases,
// probably due to differences in null representation -- it doesn't support MIN_VALUE as null
// These specific cases are qualified with if ( ! isHSQL()).
config = new LocalCluster("sqlaggregate-hsql.jar", 1, 1, 0, BackendTarget.HSQLDB_BACKEND);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
return builder;
}
use of org.voltdb.compiler.VoltProjectBuilder in project voltdb by VoltDB.
the class TestSqlDeleteSuite method suite.
public static junit.framework.Test suite() {
VoltServerConfig config = null;
MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestSqlDeleteSuite.class);
VoltProjectBuilder project = new VoltProjectBuilder();
project.addSchema(Insert.class.getResource("sql-update-ddl.sql"));
project.addProcedures(PROCEDURES);
config = new LocalCluster("sqldelete-onesite.jar", 1, 1, 0, BackendTarget.NATIVE_EE_JNI);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
config = new LocalCluster("sqldelete-hsql.jar", 1, 1, 0, BackendTarget.HSQLDB_BACKEND);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
// Cluster
config = new LocalCluster("sqldelete-cluster.jar", 2, 3, 1, BackendTarget.NATIVE_EE_JNI);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
return builder;
}
use of org.voltdb.compiler.VoltProjectBuilder in project voltdb by VoltDB.
the class TestSqlInsertSuite method suite.
public static junit.framework.Test suite() {
VoltServerConfig config = null;
MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestSqlInsertSuite.class);
VoltProjectBuilder project = new VoltProjectBuilder();
final String literalSchema = "CREATE TABLE P1 ( " + "ccc bigint default 10 not null, " + "bbb bigint default 11, " + "aaa bigint default 12, " + "zzz bigint not null, " + "yyy bigint default 14, " + // default null
"xxx bigint " + ");" + "PARTITION TABLE P1 ON COLUMN ccc;" + "CREATE INDEX IDX_P1 ON P1(1/ccc);" + "" + "CREATE TABLE R1 ( " + "ccc bigint default 10 not null, " + "bbb bigint default 11, " + "aaa bigint default 12, " + "zzz bigint not null, " + "yyy bigint default 14, " + // default null
"xxx bigint " + ");" + "" + "CREATE TABLE R2 ( " + "ccc bigint default 10 not null, " + "bbb bigint default 11, " + "aaa bigint default 12, " + "zzz bigint not null, " + "yyy bigint default 14, " + // default null
"xxx bigint " + ");" + "";
try {
project.addLiteralSchema(literalSchema);
} catch (IOException e) {
assertFalse(true);
}
boolean success;
config = new LocalCluster("sqlinsert-onesite.jar", 2, 1, 0, BackendTarget.NATIVE_EE_JNI);
success = config.compile(project);
assert (success);
builder.addServerConfig(config);
// Cluster
config = new LocalCluster("sqlinsert-cluster.jar", 2, 3, 1, BackendTarget.NATIVE_EE_JNI);
success = config.compile(project);
assert (success);
builder.addServerConfig(config);
return builder;
}
Aggregations