/** * * @return boolean indicating whether the disk region compaction is on or not */ boolean isCompactionEnabled() { return getAutoCompact(); }
/** * * @return boolean indicating whether the disk region compaction is on or not */ boolean isCompactionEnabled() { return getAutoCompact(); }
/** * This constructor will get invoked only in case of persistent region when it * is recovering an oplog. * * @param oplogId * @param parent */ Oplog(long oplogId, PersistentOplogSet parent) { // @todo have the crf and drf use different directories. if (oplogId > DiskId.MAX_OPLOG_ID) { throw new IllegalStateException("Too many oplogs. The oplog id can not exceed " + DiskId.MAX_OPLOG_ID); } this.isRecovering = true; this.oplogId = oplogId; this.parent = parent.getParent(); this.oplogSet = parent; this.opState = new OpState(); long maxOplogSizeParam = getParent().getMaxOplogSizeInBytes(); this.maxOplogSize = maxOplogSizeParam; setMaxCrfDrfSize(); this.stats = getParent().getStats(); this.compactOplogs = getParent().getAutoCompact(); this.closed = true; this.crf.RAFClosed = true; this.deleted.set(true); this.haveRecoveredCrf = false; this.haveRecoveredDrf = false; }
private void initDiskData() { this.name = diskStore.getName(); this.compactionThreshold = diskStore.getCompactionThreshold(); this.timeInterval = diskStore.getTimeInterval(); this.writeBufferSize = diskStore.getWriteBufferSize(); this.maxOpLogSize = diskStore.getMaxOplogSize(); this.queueSize = diskStore.getQueueSize(); this.isAutoCompact = diskStore.getAutoCompact(); this.isForceCompactionAllowed = diskStore.getAllowForceCompaction(); this.directoryHolders = diskStore.getDirectoryHolders(); File[] diskDirs = diskStore.getDiskDirs(); String[] diskDirStr = new String[diskDirs.length]; for (int i = 0; i < diskDirs.length; i++) { diskDirStr[i] = diskDirs[i].getName(); } this.diskDirectories = diskDirStr; }
private void initDiskData() { this.name = diskStore.getName(); this.compactionThreshold = diskStore.getCompactionThreshold(); this.timeInterval = diskStore.getTimeInterval(); this.writeBufferSize = diskStore.getWriteBufferSize(); this.maxOpLogSize = diskStore.getMaxOplogSize(); this.queueSize = diskStore.getQueueSize(); this.isAutoCompact = diskStore.getAutoCompact(); this.isForceCompactionAllowed = diskStore.getAllowForceCompaction(); this.directoryHolders = diskStore.getDirectoryHolders(); File[] diskDirs = diskStore.getDiskDirs(); String[] diskDirStr = new String[diskDirs.length]; for (int i = 0; i < diskDirs.length; i++) { diskDirStr[i] = diskDirs[i].getAbsolutePath(); } this.diskDirectories = diskDirStr; }
if (getAutoCompact() != props.getAutoCompact()) { if (logger.isDebugEnabled()) { logger.debug("AutoCompact {} != {}", getAutoCompact(), props.getAutoCompact()); && getAutoCompact() == props.getAutoCompact() && getCompactionThreshold() == props.getCompactionThreshold() && getMaxOplogSizeInBytes() == props.getMaxOplogSizeInBytes()
/** * This constructor will get invoked only in case of persistent region * when it is recovering an oplog. * @param oplogId * @param parent */ Oplog(long oplogId, PersistentOplogSet parent) { // @todo have the crf and drf use different directories. if (oplogId > DiskId.MAX_OPLOG_ID) { throw new IllegalStateException("Too many oplogs. The oplog id can not exceed " + DiskId.MAX_OPLOG_ID); } this.isRecovering = true; this.oplogId = oplogId; this.parent = parent.getParent(); this.oplogSet = parent; this.logger = getParent().getCache().getLoggerI18n(); this.opState = new OpState(); long maxOplogSizeParam = getParent().getMaxOplogSizeInBytes(); this.maxOplogSize = maxOplogSizeParam; setMaxCrfDrfSize(); this.stats = getParent().getStats(); this.compactOplogs = getParent().getAutoCompact(); this.closed = true; this.crf.RAFClosed = true; this.deleted.set(true); this.haveRecoveredCrf = false; this.haveRecoveredDrf = false; this.newOplog = false; this.idxkrf = new OplogIndex(this); }
|| (!isOffline() && (getAutoCompact() || getAllowForceCompaction() || ENABLE_NOTIFY_TO_ROLL)); this.maxAsyncItems = getQueueSize(); this.forceFlushCount = new AtomicInteger();
this.compactOplogs = getParent().getAutoCompact();
+ getAllowForceCompaction() + "!=" + props.getAllowForceCompaction()); if (getAutoCompact() != props.getAutoCompact()) { this.logger.info(LocalizedStrings.DEBUG, "DEBUG AutoCompact " + getAutoCompact() + "!=" + props.getAutoCompact()); && getAutoCompact() == props.getAutoCompact() && getCompactionThreshold() == props.getCompactionThreshold() && getMaxOplogSizeInBytes() == props.getMaxOplogSizeInBytes()
this.compactOplogs = getParent().getAutoCompact();
|| (!isOffline() && (getAutoCompact() || getAllowForceCompaction() || ENABLE_NOTIFY_TO_ROLL)); this.maxAsyncItems = getQueueSize(); this.forceFlushCount = new AtomicInteger();