public HDFSRegionMapDelegate(LocalRegion owner, Attributes attrs, InternalRegionArguments internalRegionArgs, RegionMap backingRM) { assert owner instanceof BucketRegion; this.owner = (BucketRegion) owner; this.logger = owner.getLogWriterI18n(); this.backingRM = backingRM; refs = new ReferenceQueue<HDFSEntriesSet.HDFSIterator>(); }
private void memTrace(String mesage) { if (java.lang.Boolean.getBoolean("snappydata.umm.memtrace")) { LogWriterI18n log = getLogWriterI18n(); log.fine(mesage); } }
/** * issue a config message if the server and client have different * concurrency checking expectations * @param tag */ private void concurrencyConfigurationCheck(VersionTag tag) { if (!this.concurrencyMessageIssued && ((tag != null) != this.concurrencyChecksEnabled)) { this.concurrencyMessageIssued = true; getLogWriterI18n().config(LocalizedStrings.LocalRegion_SERVER_HAS_CONCURRENCY_CHECKS_ENABLED_0_BUT_CLIENT_HAS_1_FOR_REGION_2, new Object[]{ !this.concurrencyChecksEnabled, this.concurrencyChecksEnabled, this}); } }
@Override public final void lock() { super.lock(); if (ExclusiveSharedSynchronizer.TRACE_LOCK_COMPACT) { final LogWriterI18n logger = this.region.getLogWriterI18n(); logger.info(LocalizedStrings.DEBUG, "acquired lock on " + toString()); } }
@Override public final void unlock() { super.unlock(); if (ExclusiveSharedSynchronizer.TRACE_LOCK_COMPACT) { final LogWriterI18n logger = this.region.getLogWriterI18n(); logger.info(LocalizedStrings.DEBUG, "released lock on " + toString()); } }
public HDFSLRURegionMap(LocalRegion owner, Attributes attrs, InternalRegionArguments internalRegionArgs) { super(internalRegionArgs); assert owner instanceof BucketRegion; this.logger = owner.getLogWriterI18n(); initialize(owner, attrs, internalRegionArgs); this.delegate = new HDFSRegionMapDelegate(owner, attrs, internalRegionArgs, this); }
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="VO_VOLATILE_INCREMENT") final void addPendingOp(final Object op, final LocalRegion dataRegion) { assert this.headLock.isLocked(); if (TXStateProxy.LOG_FINEST) { dataRegion.getLogWriterI18n().info(LocalizedStrings.DEBUG, "addPendingOp: adding op=" + op + " in dataRegion " + dataRegion.getFullPath()); } this.pendingOps.add(op); this.pendingOpsRegions.add(dataRegion); ++this.numPendingOperations; // mark node as having cohorts this.proxy.hasCohorts = true; }
private ClientTombstoneMessage(TOperation op, LocalRegion region, Object removalInformation, EventID eventId) { super(EnumListenerEvent.AFTER_TOMBSTONE_EXPIRATION, null, eventId, region.getLogWriterI18n()); this.op = op; this.removalInformation = removalInformation; setRegionName(region.getFullPath()); // fix for bug #45962 - tombstone message must have the region name }
@Override public Object call() throws Exception { Region r = getCache().getRegion(regionName); LocalRegion lr = (LocalRegion) r; lr.getLogWriterI18n().fine("SWAP:callingsizeEstimate"); long estimate = lr.sizeEstimate(); double err = Math.abs(estimate - size) / (double) size; System.out.println("SWAP:estimate:"+estimate); assertTrue(err < 0.2); return null; } });
public void preInitialize(InternalRegionArguments internalRegionArgs) { // if we're versioning entries we need a region-level version vector if (this.concurrencyChecksEnabled && this.versionVector == null) { createVersionVector(); } DiskRegion dskRgn = getDiskRegion(); if(dskRgn != null && dskRgn.isRecreated()) { getLogWriterI18n() .fine("DistributedRegion.getInitialImageAndRecovery: Starting Recovery"); dskRgn.initializeOwner(this, internalRegionArgs); // do recovery getLogWriterI18n() .fine("DistributedRegion.getInitialImageAndRecovery: Finished Recovery"); } }
/** test hook - dump the backing map for this region */ public void dumpBackingMap() { Object sync = TombstoneService.DEBUG_TOMBSTONE_COUNT? TombstoneService.debugSync : new Object(); synchronized(this.entries) { synchronized(sync) { if (this.entries instanceof AbstractRegionMap) { ((AbstractRegionMap)(this.entries)).verifyTombstoneCount(this.tombstoneCount); } getLogWriterI18n().info(LocalizedStrings.DEBUG, "Dumping region of size " + size() + " tombstones: " + getTombstoneCount() + ": " + this.toString()); if (this.entries instanceof AbstractRegionMap) { ((AbstractRegionMap)this.entries).dumpMap(getLogWriterI18n()); } // ((UnsharedImageState)this.imageState).dumpDestroyedEntryKeys(getLogWriterI18n()); } } }
public void rescheduleTombstone(RegionEntry entry, VersionTag version) { LogWriterI18n log = getLogWriterI18n(); if (log.fineEnabled() || TombstoneService.VERBOSE || TombstoneService.DEBUG_TOMBSTONE_COUNT) { log.info(LocalizedStrings.DEBUG, "rescheduling tombstone in " + getName() + " for " + entry.getKeyCopy()); } Object sync = TombstoneService.DEBUG_TOMBSTONE_COUNT? TombstoneService.debugSync : new Object(); synchronized(sync) { unscheduleTombstone(entry, false); // count is off by one, so don't allow validation to take place scheduleTombstone(entry, version); } }
public void run() { try { String value = System.getProperty("gemfire.no-flush-on-close"); assertNull(value); RegionFactory f = getCache().createRegionFactory(getRegionAttributes()); // CCRegion = (LocalRegion)f.create(REGION_NAME); LocalRegion lr = (LocalRegion)f.create(REGION_NAME); getLogWriter().info("In createDistributedRegion, using hydra.Log.getLogWriter()"); lr.getLogWriterI18n().info(LocalizedStrings.DEBUG, "In createDistributedRegion, using region.getLogWriterI18n()"); lr.getLogWriterI18n().fine("Unfinished Op limit="+InitialImageOperation.MAXIMUM_UNFINISHED_OPERATIONS); } catch (CacheException ex) { fail("While creating region", ex); } } };
public final void removeEntry(Object key, RegionEntry re, boolean updateStat) { final LocalRegion owner = _getOwner(); if (re.isTombstone() && _getMap().get(key) == re && !re.isMarkedForEviction()) { owner.getLogWriterI18n().severe(LocalizedStrings.AbstractRegionMap_ATTEMPT_TO_REMOVE_TOMBSTONE, key, new Exception("stack trace")); return; // can't remove tombstones except from the tombstone sweeper } // _getOwner().getLogWriterI18n().info(LocalizedStrings.DEBUG, "DEBUG: removing entry " + re, new Exception("stack trace")); if (_getMap().remove(key, re)) { re.removePhase2(owner); if (updateStat) { incEntryCount(-1); } } }
public final boolean operateOnSharedDataView(EntryEventImpl event, Object expectedOldValue, boolean cacheWrite, long lastModified, int flags) { final LocalRegion r = event.getLocalRegion(); final LogWriterI18n logger = r.getLogWriterI18n(); if(LOG_FINE) { logger.info(LocalizedStrings.DEBUG, "destroyExistingEntry Region " + r.getFullPath() + ", event: " + (LOG_FINEST ? event.toString() : event.shortToString()) + " for " + event.getTXState().getTransactionId().toString() + ", sending it back to region for snapshot isolation."); } r.getSharedDataView().destroyExistingEntry(event, cacheWrite, expectedOldValue); return true; }
public final boolean operateOnSharedDataView(EntryEventImpl event, Object expectedOldValue, boolean cacheWrite, long lastModified, int flags) { final LocalRegion r = event.getLocalRegion(); if (LOG_FINE) { final LogWriterI18n logger = r.getLogWriterI18n(); logger.info(LocalizedStrings.DEBUG, "putEntry Region " + r.getFullPath() + ", event: " + (LOG_FINEST ? event.toString() : event.shortToString()) + " for " + event.getTXState().getTransactionId().toString() +", sending it back to region for snapshot isolation."); } return r.getSharedDataView().putEntry(event, (flags & IF_NEW) != 0, (flags & IF_OLD) != 0, expectedOldValue, (flags & REQUIRED_OLD_VAL) != 0, cacheWrite, lastModified, (flags & OVERWRITE_DESTROYED) != 0); }
public final boolean operateOnSharedDataView(EntryEventImpl event, Object expectedOldValue, boolean cacheWrite, long lastModified, int flags) { final LocalRegion r = event.getLocalRegion(); if (LOG_FINE) { final LogWriterI18n logger = r.getLogWriterI18n(); logger.info(LocalizedStrings.DEBUG, "invalidateExistingEntry Region " + r.getFullPath() + ", event: " + (LOG_FINEST ? event.toString() : event.shortToString()) + " for " + event.getTXState().getTransactionId().toString() +", sending it back to region for snapshot isolation."); } r.getSharedDataView().invalidateExistingEntry(event, (flags &INVOKE_CALLBACKS) !=0, (flags & FORCE_NEW_ENTRY)!=0); return true; }
public final boolean operateOnSharedDataView(EntryEventImpl event, Object expectedOldValue, boolean cacheWrite, long lastModified, int flags) { final LocalRegion r = event.getLocalRegion(); final LogWriterI18n logger = r.getLogWriterI18n(); if (LOG_FINE) { logger.info(LocalizedStrings.DEBUG, "destroyExistingEntry Region " + r.getFullPath() + ", event: " + (LOG_FINEST ? event.toString() : event.shortToString()) + " for " + event.getTXState().getTransactionId().toString() + ", sending it back to region for snapshot isolation."); } r.getSharedDataView().destroyExistingEntry(event, cacheWrite, expectedOldValue); return true; }
public final boolean operateOnSharedDataView(EntryEventImpl event, Object expectedOldValue, boolean cacheWrite, long lastModified, int flags) { final LocalRegion r = event.getLocalRegion(); if (LOG_FINE) { final LogWriterI18n logger = r.getLogWriterI18n(); logger.info(LocalizedStrings.DEBUG, "putEntry Region " + r.getFullPath() + ", event: " + (LOG_FINEST ? event.toString() : event.shortToString()) + " for " + event.getTXState().getTransactionId().toString() +", sending it back to region for snapshot isolation."); } return r.getSharedDataView().putEntry(event, (flags & IF_NEW) != 0, (flags & IF_OLD) != 0, expectedOldValue, (flags & REQUIRED_OLD_VAL) != 0, cacheWrite, lastModified, (flags & OVERWRITE_DESTROYED) != 0); }
public final boolean operateOnSharedDataView(EntryEventImpl event, Object expectedOldValue, boolean cacheWrite, long lastModified, int flags) { final LocalRegion r = event.getLocalRegion(); if (LOG_FINE) { final LogWriterI18n logger = r.getLogWriterI18n(); logger.info(LocalizedStrings.DEBUG, "invalidateExistingEntry Region " + r.getFullPath() + ", event: " + (LOG_FINEST ? event.toString() : event.shortToString()) + " for " + event.getTXState().getTransactionId().toString() +", sending it back to region for snapshot isolation."); } r.getSharedDataView().invalidateExistingEntry(event, (flags &INVOKE_CALLBACKS) !=0, (flags & FORCE_NEW_ENTRY)!=0); return true; }