if (parent.getCompactionThreshold() == 100) return true; if (parent.getCompactionThreshold() == 0) return false; if (((rv / rvHWM) * 100) <= parent.getCompactionThreshold()) { return true;
boolean needsCompaction() { if (!isCompactionPossible()) return false; if (this.unrecoveredRegionCount.get() > 0) return false; if (parent.getCompactionThreshold() == 100) return true; if (parent.getCompactionThreshold() == 0) return false; // otherwise check if we have enough garbage to collect with a compact long rvHWMtmp = this.totalCount.get(); if (rvHWMtmp > 0) { long tlc = this.totalLiveCount.get(); if (tlc < 0) { tlc = 0; } double rv = tlc; double rvHWM = rvHWMtmp; if (((rv / rvHWM) * 100) <= parent.getCompactionThreshold()) { return true; } } else { return true; } return false; }
boolean needsCompaction() { if (!isCompactionPossible()) return false; if (getParent().getCompactionThreshold() == 100) return true; if (getParent().getCompactionThreshold() == 0) return false; // otherwise check if we have enough garbage to collect with a compact long rvHWMtmp = this.totalCount.get(); if (rvHWMtmp > 0) { long tlc = this.totalLiveCount.get(); if (tlc < 0) { tlc = 0; } double rv = tlc; double rvHWM = rvHWMtmp; if (((rv / rvHWM) * 100) <= parent.getCompactionThreshold()) { return true; } } else { return true; } return false; }
boolean needsCompaction() { // logger.info(LocalizedStrings.DEBUG, // "DEBUG isCompactionPossible=" + isCompactionPossible()); if (!isCompactionPossible()) return false; // logger.info(LocalizedStrings.DEBUG, // "DEBUG compactionThreshold=" + parent.getCompactionThreshold()); if (getParent().getCompactionThreshold() == 100) return true; if (getParent().getCompactionThreshold() == 0) return false; // otherwise check if we have enough garbage to collect with a compact long rvHWMtmp = this.totalCount.get(); // logger.info(LocalizedStrings.DEBUG, "DEBUG rvHWM=" + rvHWMtmp); if (rvHWMtmp > 0) { long tlc = this.totalLiveCount.get(); if (tlc < 0) { tlc = 0; } double rv = tlc; // logger.info(LocalizedStrings.DEBUG, "DEBUG rv=" + rv); double rvHWM = rvHWMtmp; if (((rv / rvHWM) * 100) <= parent.getCompactionThreshold()) { return true; } } else { return true; } return 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 (getCompactionThreshold() != props.getCompactionThreshold()) { if (logger.isDebugEnabled()) { logger.debug("CompactionThreshold {} != {}", getCompactionThreshold(), props.getCompactionThreshold()); && getCompactionThreshold() == props.getCompactionThreshold() && getMaxOplogSizeInBytes() == props.getMaxOplogSizeInBytes() && getName().equals(props.getName())
+ getAutoCompact() + "!=" + props.getAutoCompact()); if (getCompactionThreshold() != props.getCompactionThreshold()) { this.logger.info(LocalizedStrings.DEBUG, "DEBUG CompactionThreshold " + getCompactionThreshold() + "!=" + props.getCompactionThreshold()); && getCompactionThreshold() == props.getCompactionThreshold() && getMaxOplogSizeInBytes() == props.getMaxOplogSizeInBytes() && getName().equals(props.getName())