@Override protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion pr, long startTime) throws CacheException { if (logger.isTraceEnabled(LogMarker.DM)) { logger.trace(LogMarker.DM, "DumpBucketsMessage operateOnRegion: {}", pr.getFullPath()); } PartitionedRegionDataStore ds = pr.getDataStore(); if (ds != null) { if (this.bucketsOnly) { ds.dumpBuckets(); } else { ds.dumpEntries(this.validateOnly); } if (logger.isTraceEnabled(LogMarker.DM)) { logger.trace(LogMarker.DM, "{} dumped buckets", getClass().getName()); } } return true; }
/** * * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to validate that the meta-data * for buckets agrees with the data store's perspective * * @throws ReplyException * @see #dumpAllBuckets(boolean) */ public void validateAllBuckets() throws ReplyException { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this, true /* only validate */, false); response.waitForRepliesUninterruptibly(); if (this.dataStore != null) { this.dataStore.dumpEntries(true /* onlyValidate */); } }
/** * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to dump the contents of the * buckets to the system.log and validate that the meta-data for buckets * agrees with the data store's perspective * * @param distribute true will distributed a DumpBucketsMessage to PR nodes * @throws ReplyException * @see #validateAllBuckets() */ public void dumpAllBuckets(boolean distribute) throws ReplyException { if (logger.isDebugEnabled()) { logger.debug("[dumpAllBuckets] distribute={} {}", distribute, this); } getRegionAdvisor().dumpProfiles("dumpAllBuckets"); if (distribute) { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this, false /* only validate */, false); response.waitForRepliesUninterruptibly(); } if (this.dataStore != null) { this.dataStore.dumpEntries(false /* onlyValidate */); } }
/** * * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to validate that the meta-data * for buckets agrees with the data store's perspective * * @throws ReplyException * @see #dumpAllBuckets(boolean, LogWriterI18n) */ public void validateAllBuckets() throws ReplyException { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this, true /* only validate */, false); response.waitForRepliesUninterruptibly(); if (this.dataStore != null) { this.dataStore.dumpEntries(true /* onlyValidate */, null); } }
@Override protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion pr, long startTime) throws CacheException { final LogWriterI18n l = pr.getCache().getLoggerI18n(); if (DistributionManager.VERBOSE) { l.fine("DumpBucketsMessage operateOnRegion: " + pr.getFullPath()); } PartitionedRegionDataStore ds = pr.getDataStore(); if (ds != null) { if (this.bucketsOnly) { ds.dumpBuckets(); } else { ds.dumpEntries(this.validateOnly, null); } if (DistributionManager.VERBOSE) { l.fine(getClass().getName() + " dumped buckets"); } } return true; }
/** * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to dump the contents of the * buckets to the system.log and validate that the meta-data for buckets * agrees with the data store's perspective * * @param distribute true will distributed a DumpBucketsMessage to PR nodes * @throws ReplyException * @see #validateAllBuckets() */ public void dumpAllBuckets(boolean distribute, LogWriterI18n log) throws ReplyException { LogWriterI18n logWriter = log; if (logWriter == null) { logWriter = logger; } logWriter.info(LocalizedStrings.DEBUG, "[dumpAllBuckets] distribute=" + distribute + " " + this); getRegionAdvisor().dumpProfiles(logWriter, "dumpAllBuckets"); if (distribute) { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this, false /* only validate */, false); response.waitForRepliesUninterruptibly(); } if (this.dataStore != null) { this.dataStore.dumpEntries(false /* onlyValidate */, logWriter); } }
assertNotNull(orderPartitionedregion); customerPartitionedregion.getDataStore().dumpEntries(false, getLogWriter().convertToLogWriterI18n()); orderPartitionedregion.getDataStore().dumpEntries(false, getLogWriter().convertToLogWriterI18n()); Iterator custIterator = customerPartitionedregion.getDataStore() .getEntries().iterator();