public void removeDiskStore(DiskStore dsi) { DiskStoreImpl impl = (DiskStoreImpl) dsi; removeDiskStoreStats(impl.getStats()); }
public void removeDiskStore(DiskStore dsi) { DiskStoreImpl impl = (DiskStoreImpl) dsi; removeDiskStoreStats(impl.getStats()); }
public void addDiskStore(DiskStore dsi) { DiskStoreImpl impl = (DiskStoreImpl) dsi; addDiskStoreStats(impl.getStats()); }
public void addDiskStore(DiskStore dsi) { DiskStoreImpl impl = (DiskStoreImpl) dsi; addDiskStoreStats(impl.getStats()); }
private long getCurrentFlushCount() { return ((LocalRegion)region).getDiskStore().getStats().getFlushes(); } void pauseFlush() {
public HashSet<PersistentID> prepareBackup() { HashSet<PersistentID> persistentIds = new HashSet<PersistentID>(); Collection<DiskStoreImpl> diskStores = cache.listDiskStoresIncludingRegionOwned(); for(DiskStoreImpl store : diskStores) { store.lockStoreBeforeBackup(); if(store.hasPersistedData()) { persistentIds.add(store.getPersistentID()); store.getStats().startBackup(); } } return persistentIds; }
/** * A non-backup just needs values that are written to one of the oplogs * being compacted that are still alive (have not been deleted or modified * in a future oplog) to be copied forward to the current active oplog */ private boolean compact() { CompactableOplog[] oplogs = this.scheduledOplogs; int totalCount = 0; long compactionStart = getStats().startCompaction(); long start = System.nanoTime(); try { for (int i = 0; i < oplogs.length && keepCompactorRunning() /* * @todo && * !owner. * isDestroyed */; i++) { totalCount += oplogs[i].compact(this); } // TODO:Asif : DiskRegion: How do we tackle } finally { getStats().endCompaction(compactionStart); } long endTime = System.nanoTime(); logger.info(LocalizedMessage.create(LocalizedStrings.DiskRegion_COMPACTION_SUMMARY, new Object[] { totalCount, ((endTime - start) / 1000000) })); return true /* @todo !owner.isDestroyed */; }
public HashSet<PersistentID> prepareBackup() { HashSet<PersistentID> persistentIds = new HashSet<PersistentID>(); Collection<DiskStoreImpl> diskStores = cache.listDiskStoresIncludingRegionOwned(); for(DiskStoreImpl store : diskStores) { store.lockStoreBeforeBackup(); if(store.hasPersistedData()) { persistentIds.add(store.getPersistentID()); store.getStats().startBackup(); } } return persistentIds; }
/** Get the current number of bytes in the disk write buffer. * * @returns long The current number of bytes in the disk write buffer. */ public static long getBufferSize(Region aRegion) { DiskRegion diskReg = ((LocalRegion)aRegion).getDiskRegion(); if (diskReg == null) // no disk is being used return 0; return diskReg.getDiskStore().getStats().getQueueSize(); }
parent.getStats().incInactiveOplogs(1);
parent.getStats().incInactiveOplogs(1);
private void basicAddToBeCompacted(Oplog oplog) { if (!oplog.isRecovering() && oplog.hasNoLiveValues()) { oplog.cancelKrf(); oplog.close(); // fix for bug 41687 oplog.deleteFiles(oplog.getHasDeletes()); } else { int inactivePromotedCount = 0; parent.getStats().incCompactableOplogs(1); Long key = Long.valueOf(oplog.getOplogId()); synchronized (this.oplogIdToOplog) { if (this.inactiveOplogs.remove(key) != null) { if (oplog.isRAFOpen()) { inactiveOpenCount.decrementAndGet(); } inactivePromotedCount++; } this.oplogIdToOplog.put(key, oplog); } if (inactivePromotedCount > 0) { parent.getStats().incInactiveOplogs(-inactivePromotedCount); } } }
private void basicAddToBeCompacted(Oplog oplog) { if (!oplog.isRecovering() && oplog.hasNoLiveValues()) { oplog.cancelKrf(); oplog.close(); // fix for bug 41687 oplog.deleteFiles(oplog.getHasDeletes()); } else { int inactivePromotedCount = 0; parent.getStats().incCompactableOplogs(1); Long key = Long.valueOf(oplog.getOplogId()); synchronized (this.oplogIdToOplog) { if (this.inactiveOplogs.remove(key) != null) { if (oplog.isRAFOpen()) { inactiveOpenCount.decrementAndGet(); } inactivePromotedCount++; } // logger.info(LocalizedStrings.DEBUG, "DEBUG addToBeCompacted #" + oplog.getOplogId()); this.oplogIdToOplog.put(key, oplog); } if (inactivePromotedCount > 0) { parent.getStats().incInactiveOplogs(-inactivePromotedCount); } } }
public DiskStoreMBeanBridge(DiskStore ds) { this.diskStore = (DiskStoreImpl)ds; initDiskData(); this.monitor = new MBeanStatsMonitor(ManagementStrings.DISKSTORE_MONITOR .toLocalizedString()); this.diskStoreStats = diskStore.getStats(); addDiskStoreStats(diskStoreStats); initializeStats(); }
public DiskStoreMBeanBridge(DiskStore ds) { this.diskStore = (DiskStoreImpl)ds; initDiskData(); this.monitor = new MBeanStatsMonitor(ManagementStrings.DISKSTORE_MONITOR .toLocalizedString()); this.diskStoreStats = diskStore.getStats(); addDiskStoreStats(diskStoreStats); initializeStats(); }
/** * 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; }
/** * 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); }
this.maxOplogSize = maxOplogSizeParam; this.stats = this.parent.getStats();
region = DiskRegionHelperFactory.getAsyncOverFlowAndPersistRegion(cache, diskProps); final DiskStoreStats dss = ((LocalRegion)region).getDiskRegion().getDiskStore().getStats(); WaitCriterion evFull = new WaitCriterion() { public boolean done() {