當前位置: 首頁>>代碼示例>>Java>>正文


Java TestPlansGroupBy類代碼示例

本文整理匯總了Java中org.voltdb.planner.TestPlansGroupBy的典型用法代碼示例。如果您正苦於以下問題:Java TestPlansGroupBy類的具體用法?Java TestPlansGroupBy怎麽用?Java TestPlansGroupBy使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TestPlansGroupBy類屬於org.voltdb.planner包,在下文中一共展示了TestPlansGroupBy類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: suite

import org.voltdb.planner.TestPlansGroupBy; //導入依賴的package包/類
static public junit.framework.Test suite() {
    VoltServerConfig config = null;
    MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(
            TestGroupBySuite.class);
    VoltProjectBuilder project = new VoltProjectBuilder();

    project.addSchema(TestPlansGroupBy.class
            .getResource("testplans-groupby-ddl.sql"));
    project.addProcedures(PROCEDURES);
    project.addStmtProcedure("T1Insert", "INSERT INTO T1 VALUES (?, ?);");
    project.addStmtProcedure("BInsert", "INSERT INTO B VALUES (?, ?);");

    // config = new LocalSingleProcessServer("plansgroupby-ipc.jar", 1, BackendTarget.NATIVE_EE_IPC);
    // config.compile(project);
    // builder.addServerConfig(config);

    config = new LocalCluster("plansgroupby-onesite.jar", 1, 1, 0, BackendTarget.NATIVE_EE_JNI);
    boolean success = config.compile(project);
    assertTrue(success);
    builder.addServerConfig(config);

    config = new LocalCluster("plansgroupby-hsql.jar", 1, 1, 0, BackendTarget.HSQLDB_BACKEND);
    success = config.compile(project);
    assertTrue(success);
    builder.addServerConfig(config);

    // Cluster
    config = new LocalCluster("plansgroupby-cluster.jar", 2, 3, 1, BackendTarget.NATIVE_EE_JNI);
    success = config.compile(project);
    assertTrue(success);

    return builder;
}
 
開發者ID:anhnv-3991,項目名稱:VoltDB,代碼行數:34,代碼來源:TestGroupBySuite.java

示例2: suite

import org.voltdb.planner.TestPlansGroupBy; //導入依賴的package包/類
static public junit.framework.Test suite() {
    VoltServerConfig config = null;
    MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(
            TestPlansGroupBySuite.class);
    VoltProjectBuilder project = new VoltProjectBuilder("testplans");

    project.addSchema(TestPlansGroupBy.class
            .getResource("testplans-groupby-ddl.sql"));
    project.addTablePartitionInfo("T1", "PKEY");
    project.addTablePartitionInfo("F", "F_PKEY");
    project.addProcedures(PROCEDURES);
    project.addStmtProcedure("T1Insert", "INSERT INTO T1 VALUES (?, ?);");
    
    boolean success;
    
    /////////////////////////////////////////////////////////////
    // CONFIG #1: 1 Local Site/Partition
    /////////////////////////////////////////////////////////////
    config = new LocalSingleProcessServer(PREFIX + "-1part.jar", 1, BackendTarget.NATIVE_EE_JNI);
    success = config.compile(project);
    assert(success);
    builder.addServerConfig(config);
    
    /////////////////////////////////////////////////////////////
    // CONFIG #2: 1 Local Site with 2 Partitions running on JNI backend
    /////////////////////////////////////////////////////////////
    config = new LocalSingleProcessServer(PREFIX + "-2part.jar", 2, BackendTarget.NATIVE_EE_JNI);
    success = config.compile(project);
    assert(success);
    builder.addServerConfig(config);
    
    /////////////////////////////////////////////////////////////
    // CONFIG #3: 1 Local Site with 3 Partitions running on JNI backend
    /////////////////////////////////////////////////////////////
    config = new LocalSingleProcessServer(PREFIX + "-3part.jar", 2, BackendTarget.NATIVE_EE_JNI);
    success = config.compile(project);
    assert(success);
    builder.addServerConfig(config);

    ////////////////////////////////////////////////////////////
    // CONFIG #4: cluster of 2 nodes running 2 site each, one replica
    ////////////////////////////////////////////////////////////
    config = new LocalCluster(PREFIX + "-cluster.jar", 2, 2, 1, BackendTarget.NATIVE_EE_JNI);
    success = config.compile(project);
    assert(success);

    builder.addServerConfig(config);


    return builder;
}
 
開發者ID:s-store,項目名稱:sstore-soft,代碼行數:52,代碼來源:TestPlansGroupBySuite.java


注:本文中的org.voltdb.planner.TestPlansGroupBy類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。