public FasterKV(long size, IDevice logDevice, IDevice objectLogDevice, string checkpointDir = null) { if (checkpointDir != null) { Config.CheckpointDirectory = checkpointDir; } hlog = new PersistentMemoryMalloc(logDevice, objectLogDevice); var recordSize = Layout.EstimatePhysicalSize(null, null); Initialize(size, hlog.GetSectorSize()); _systemState = default(SystemState); _systemState.phase = Phase.REST; _systemState.version = 1; _checkpointType = CheckpointType.HYBRID_LOG_ONLY; }
/// <summary> /// Create FASTER instance /// </summary> /// <param name="size"></param> /// <param name="logSettings"></param> /// <param name="checkpointSettings"></param> public FasterKV(long size, LogSettings logSettings, CheckpointSettings checkpointSettings = null) { if (checkpointSettings == null) { checkpointSettings = new CheckpointSettings(); } Config.CheckpointDirectory = checkpointSettings.CheckpointDir; FoldOverSnapshot = checkpointSettings.CheckPointType == core.CheckpointType.FoldOver; hlog = new PersistentMemoryMalloc(logSettings, this); var recordSize = Layout.EstimatePhysicalSize(null, null); Initialize(size, hlog.GetSectorSize()); _systemState = default(SystemState); _systemState.phase = Phase.REST; _systemState.version = 1; _checkpointType = CheckpointType.HYBRID_LOG_ONLY; }