当前位置: 首页>>代码示例>>Java>>正文


Java DefaultSnapshotDataTarget类代码示例

本文整理汇总了Java中org.voltdb.DefaultSnapshotDataTarget的典型用法代码示例。如果您正苦于以下问题:Java DefaultSnapshotDataTarget类的具体用法?Java DefaultSnapshotDataTarget怎么用?Java DefaultSnapshotDataTarget使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultSnapshotDataTarget类属于org.voltdb包,在下文中一共展示了DefaultSnapshotDataTarget类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.voltdb.DefaultSnapshotDataTarget; //导入依赖的package包/类
@Override
public void setUp() {
    deleteTestFiles();
    deleteCommandLogDir();
    super.setUp();
    DefaultSnapshotDataTarget.m_simulateFullDiskWritingChunk = false;
    DefaultSnapshotDataTarget.m_simulateFullDiskWritingHeader = false;
    org.voltdb.sysprocs.SnapshotRegistry.clear();
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:10,代码来源:TestSStoreLogicalRecovery.java

示例2: setUp

import org.voltdb.DefaultSnapshotDataTarget; //导入依赖的package包/类
@Override
public void setUp() {
    deleteTestFiles();
    super.setUp();
    DefaultSnapshotDataTarget.m_simulateFullDiskWritingChunk = false;
    DefaultSnapshotDataTarget.m_simulateFullDiskWritingHeader = false;
    org.voltdb.sysprocs.SnapshotRegistry.clear();
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:9,代码来源:TestSnapshotSaveAndRestorePartitionedTable.java

示例3: setUp

import org.voltdb.DefaultSnapshotDataTarget; //导入依赖的package包/类
public void setUp(String nonce) throws Exception
{
    File tempDir = new File(TMPDIR);
    if (!tempDir.exists()) {
        assertTrue(tempDir.mkdirs());
    }
    deleteTestFiles(nonce);
    super.setUp();
    DefaultSnapshotDataTarget.m_simulateFullDiskWritingChunk = false;
    DefaultSnapshotDataTarget.m_simulateFullDiskWritingHeader = false;
    org.voltdb.sysprocs.SnapshotRegistry.clear();
}
 
开发者ID:anhnv-3991,项目名称:VoltDB,代码行数:13,代码来源:SaveRestoreBase.java

示例4: testSaveAndRestorePartitionedTable

import org.voltdb.DefaultSnapshotDataTarget; //导入依赖的package包/类
public void testSaveAndRestorePartitionedTable() throws IOException, InterruptedException, ProcCallException {
    System.out.println("Starting testSaveAndRestorePartitionedTable");       
    
    deleteTestFiles();
    setUpSnapshotDir();     
    
    int num_partitioned_items_per_chunk = 2; 
    int num_partitioned_chunks = 2;
    Client client = getClient();
    VoltTable[] results = null;
    
    
    loadLargePartitionedTable(client, "PARTITION_TESTER", num_partitioned_items_per_chunk, num_partitioned_chunks);

    VoltTable[] results_tmp = null;
    results_tmp = client.callProcedure("@Statistics", "table", 0).getResults();

    System.out.println("@Statistics before saveTables :");
    System.out.println(results_tmp[0]);
    
    DefaultSnapshotDataTarget.m_simulateFullDiskWritingHeader = false;
    results = saveTables(client);

    validateSnapshot(true);

    while (results[0].advanceRow()) {
        if (!results[0].getString("RESULT").equals("SUCCESS")) {
            System.out.println(results[0].getString("ERR_MSG"));
        }
        assertTrue(results[0].getString("RESULT").equals("SUCCESS"));
    }

    results_tmp = client.callProcedure("@Statistics", "table", 0).getResults();

    System.out.println("@Statistics after saveTables :");
    System.out.println(results_tmp[0]);

    
    // Kill and restart all the execution sites.
    m_config.shutDown();
    m_config.startUp();        
    
    
    client = getClient();

    try {
        results = client.callProcedure("@SnapshotRestore", TMPDIR, TESTNONCE, ALLOWEXPORT).getResults();

        System.out.println(results[0]);

        while (results[0].advanceRow()) {
            if (results[0].getString("RESULT").equals("FAILURE")) {
                fail(results[0].getString("ERR_MSG"));
            }
        }
    } catch (Exception ex) {
        ex.printStackTrace();
        fail("SnapshotRestore exception: " + ex.getMessage());
    }

    System.out.println("@Statistics after restore:");
    results = client.callProcedure("@Statistics", "table", 0).getResults();
    System.out.println(results[0]);

    checkTable(client, "PARTITION_TESTER", "PT_ID", num_partitioned_items_per_chunk * num_partitioned_chunks);

    int foundItem = 0;
    while (results[0].advanceRow()) {
        if (results[0].getString("TABLE_NAME").equals("PARTITION_TESTER")) {
            ++foundItem;
            assertEquals((num_partitioned_items_per_chunk * num_partitioned_chunks)/(NUM_SITES*NUM_PARTITIONS), results[0].getLong("TUPLE_COUNT"));
        }
    }

    // make sure all sites were loaded
    //assertEquals(2, foundItem);
    validateSnapshot(true);               
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:79,代码来源:TestSnapshotSaveAndRestorePartitionedTable.java


注:本文中的org.voltdb.DefaultSnapshotDataTarget类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。