本文整理汇总了Java中org.vanilladb.core.storage.tx.recovery.CheckpointTask类的典型用法代码示例。如果您正苦于以下问题:Java CheckpointTask类的具体用法?Java CheckpointTask怎么用?Java CheckpointTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CheckpointTask类属于org.vanilladb.core.storage.tx.recovery包,在下文中一共展示了CheckpointTask类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: executeSql
import org.vanilladb.core.storage.tx.recovery.CheckpointTask; //导入依赖的package包/类
@Override
protected void executeSql(Map<RecordKey, CachedRecord> readings) {
if (logger.isLoggable(Level.INFO))
logger.info("Start loading testbed...");
// turn off logging set value to speed up loading process
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(false);
// Load testbed
loadTestbed();
if (logger.isLoggable(Level.INFO))
logger.info("Loading completed. Flush all loading data to disks...");
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(true);
// Create a checkpoint
CheckpointTask cpt = new CheckpointTask();
cpt.createCheckpoint();
// Delete the log file and create a new one
VanillaDb.logMgr().removeAndCreateNewLog();
if (logger.isLoggable(Level.INFO))
logger.info("Loading procedure finished.");
}
示例2: executeSql
import org.vanilladb.core.storage.tx.recovery.CheckpointTask; //导入依赖的package包/类
@Override
protected void executeSql(Map<RecordKey, CachedRecord> readings) {
if (logger.isLoggable(Level.INFO))
logger.info("Start loading testbed...");
// turn off logging set value to speed up loading process
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(false);
// Generate item records
generateItems(1, TpccConstants.NUM_ITEMS);
// Generate warehouse
int wPerPart = TpccConstants.NUM_WAREHOUSES / PartitionMetaMgr.NUM_PARTITIONS;
int startWid = Elasql.serverId() * wPerPart + 1;
int endWid = (Elasql.serverId() + 1) * wPerPart;
for (int wid = startWid; wid <= endWid; wid++)
generateWarehouseInstance(wid);
if (logger.isLoggable(Level.INFO))
logger.info("Loading completed. Flush all loading data to disks...");
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(true);
// Create a checkpoint
CheckpointTask cpt = new CheckpointTask();
cpt.createCheckpoint();
// Delete the log file and create a new one
VanillaDb.logMgr().removeAndCreateNewLog();
if (logger.isLoggable(Level.INFO))
logger.info("Loading procedure finished.");
}
示例3: executeSql
import org.vanilladb.core.storage.tx.recovery.CheckpointTask; //导入依赖的package包/类
@Override
protected void executeSql(Map<RecordKey, CachedRecord> readings) {
if (logger.isLoggable(Level.INFO))
logger.info("Start loading testbed...");
// turn off logging set value to speed up loading process
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(false);
// Generate item records
int startIId = Elasql.serverId() * ElasqlMicrobenchConstants.NUM_ITEMS_PER_NODE + 1;
int endIId = (Elasql.serverId() + 1) * ElasqlMicrobenchConstants.NUM_ITEMS_PER_NODE;
generateItems(startIId, endIId);
if (logger.isLoggable(Level.INFO))
logger.info("Loading completed. Flush all loading data to disks...");
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(true);
// Create a checkpoint
CheckpointTask cpt = new CheckpointTask();
cpt.createCheckpoint();
// Delete the log file and create a new one
VanillaDb.logMgr().removeAndCreateNewLog();
if (logger.isLoggable(Level.INFO))
logger.info("Loading procedure finished.");
}
示例4: executeSql
import org.vanilladb.core.storage.tx.recovery.CheckpointTask; //导入依赖的package包/类
@Override
protected void executeSql() {
if (logger.isLoggable(Level.INFO))
logger.info("Start loading testbed...");
// turn off logging set value to speed up loading process
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(false);
// Load testbed
loadTestbed();
if (logger.isLoggable(Level.INFO))
logger.info("Loading completed. Flush all loading data to disks...");
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(true);
// Create a checkpoint
CheckpointTask cpt = new CheckpointTask();
cpt.createCheckpoint();
// Delete the log file and create a new one
VanillaDb.logMgr().removeAndCreateNewLog();
if (logger.isLoggable(Level.INFO))
logger.info("Loading procedure finished.");
}
示例5: executeSql
import org.vanilladb.core.storage.tx.recovery.CheckpointTask; //导入依赖的package包/类
@Override
protected void executeSql() {
if (logger.isLoggable(Level.INFO))
logger.info("Start loading testbed...");
// turn off logging set value to speed up loading process
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(false);
// Generate item records
generateItems(1, TpccConstants.NUM_ITEMS);
// Generate warehouse
for (int wid = 1; wid <= TpccConstants.NUM_WAREHOUSES; wid++)
generateWarehouseInstance(wid);
if (logger.isLoggable(Level.INFO))
logger.info("Loading completed. Flush all loading data to disks...");
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(true);
// Create a checkpoint
CheckpointTask cpt = new CheckpointTask();
cpt.createCheckpoint();
// Delete the log file and create a new one
VanillaDb.logMgr().removeAndCreateNewLog();
if (logger.isLoggable(Level.INFO))
logger.info("Loading procedure finished.");
}
示例6: executeSql
import org.vanilladb.core.storage.tx.recovery.CheckpointTask; //导入依赖的package包/类
@Override
protected void executeSql() {
if (logger.isLoggable(Level.INFO))
logger.info("Start loading testbed...");
// turn off logging set value to speed up loading process
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(false);
// Generate item records
generateItems(1, MicrobenchConstants.NUM_ITEMS);
if (logger.isLoggable(Level.INFO))
logger.info("Loading completed. Flush all loading data to disks...");
// TODO: remove this hack code in the future
RecoveryMgr.enableLogging(true);
// Create a checkpoint
CheckpointTask cpt = new CheckpointTask();
cpt.createCheckpoint();
// Delete the log file and create a new one
VanillaDb.logMgr().removeAndCreateNewLog();
if (logger.isLoggable(Level.INFO))
logger.info("Loading procedure finished.");
}
示例7: initCheckpointingTask
import org.vanilladb.core.storage.tx.recovery.CheckpointTask; //导入依赖的package包/类
/**
* Initialize a background checkpointing task.
*/
public static void initCheckpointingTask() {
taskMgr.runTask(new CheckpointTask());
}