use of org.voltdb.compiler.VoltProjectBuilder in project voltdb by VoltDB.
the class TestStartWithSchema method setUp.
@Before
public void setUp() throws Exception {
// Creates a cluster on the local machine using NewCLI, staging the specified schema.
// Catalog compilation is taken care of by VoltDB itself - no need to do so explicitly.
cluster = new LocalCluster(schema, null, siteCount, hostCount, kfactor, clusterID, BackendTarget.NATIVE_EE_JNI, FailureState.ALL_RUNNING, false, false, null);
cluster.setHasLocalServer(false);
cluster.overrideAnyRequestForValgrind();
VoltProjectBuilder builder = new VoltProjectBuilder();
builder.setUseDDLSchema(true);
cluster.compileDeploymentOnly(builder);
new File(builder.getPathToDeployment()).deleteOnExit();
// positive tests should succeed; negative tests look for the exception
cluster.setExpectedToCrash(false);
}
use of org.voltdb.compiler.VoltProjectBuilder in project voltdb by VoltDB.
the class TestStopNode 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 TestSqlLikeRegressionSuite method suite.
public static junit.framework.Test suite() {
VoltServerConfig config = null;
MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestSqlLikeRegressionSuite.class);
VoltProjectBuilder project = new VoltProjectBuilder();
try {
project.addLiteralSchema(TestLikeQueries.schema);
} catch (IOException e) {
e.printStackTrace();
}
project.addPartitionInfo("STRINGS", "ID");
config = new LocalCluster("sqllike-onesite.jar", 1, 1, 0, BackendTarget.NATIVE_EE_JNI);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
config = new LocalCluster("sqllike-twosites.jar", 2, 1, 0, BackendTarget.NATIVE_EE_JNI);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
// This config works for TestSqlAggregateSuite, but not here? Don't know why.
// It seems to get confused in leader election and start down some unwanted RECOVERY code path.
// Any multi-host config, even single site per host seems to be hanging.
// Disabling for now.
// config = new LocalCluster("sqllike-twosites.jar", 2, 3, 1, BackendTarget.NATIVE_EE_JNI);
// if (!config.compile(project)) fail();
// builder.addServerConfig(config);
config = new LocalCluster("sqllike-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 TestSqlLogicOperatorsSuite method suite.
public static junit.framework.Test suite() {
VoltServerConfig config = null;
MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestSqlLogicOperatorsSuite.class);
VoltProjectBuilder project = new VoltProjectBuilder();
project.addSchema(Insert.class.getResource("sql-update-ddl.sql"));
project.addProcedures(PROCEDURES);
config = new LocalCluster("sqllogic-onesite.jar", 1, 1, 0, BackendTarget.NATIVE_EE_JNI);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
config = new LocalCluster("sqllogic-hsql.jar", 1, 1, 0, BackendTarget.HSQLDB_BACKEND);
if (!config.compile(project))
fail();
builder.addServerConfig(config);
config = new LocalCluster("sqllogic-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 TestStopNode2NK1PartitionDetectionOff method suite.
public static Test suite() throws IOException {
// the suite made here will all be using the tests from this class
MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestStopNode2NK1PartitionDetectionOff.class);
// build up a project builder for the workload
VoltProjectBuilder project = getBuilderForTest();
boolean success;
//Lets tolerate 3 node failures.
if (!MiscUtils.isPro()) {
kfactor = 0;
}
m_config = new LocalCluster("decimal-default.jar", 4, 2, kfactor, BackendTarget.NATIVE_EE_JNI);
m_config.setHasLocalServer(true);
success = m_config.compile(project);
assertTrue(success);
// add this config to the set of tests to run
builder.addServerConfig(m_config);
return builder;
}
Aggregations