@Override public String toString() { return new StringBuilder() .append("BucketRegion") .append("[path='").append(getFullPath()) .append(";serial=").append(getSerialNumber()) .append(";primary=").append(getBucketAdvisor().getProxyBucketRegion().isPrimary()) .append(";indexUpdater=").append(getIndexUpdater()) .append("]") .toString(); }
Map usedIndexes = indexObserver.getUsedIndexes(bucket.getFullPath()); StringBuffer buf = new StringBuffer(); buf.append(" indexesUsed(");
Map usedIndexes = indexObserver.getUsedIndexes(bucket.getFullPath()); StringBuffer buf = new StringBuffer(); buf.append(" indexesUsed(");
@Override public void checkReadiness() { super.checkReadiness(); if (isDestroyed()) { throw new RegionDestroyedException(toString(), getFullPath()); } }
@Override public void checkReadiness() { super.checkReadiness(); if (isDestroyed()) { throw new RegionDestroyedException(toString(), getFullPath()); } }
public Object call() throws Exception { try { final PartitionedRegion pr = (PartitionedRegion)cache .getRegion(regionName); for (final Iterator i = pr.getDataStore().getAllLocalBuckets() .iterator(); i.hasNext();) { final Map.Entry entry = (Map.Entry)i.next(); final BucketRegion bucketRegion = (BucketRegion)entry.getValue(); if (bucketRegion == null) { continue; } getLogWriter().info( "FINAL bucket= " + bucketRegion.getFullPath() + "size= " + bucketRegion.size()); } return new Long(((AbstractLRURegionMap)pr.entries)._getLruList() .stats().getEvictions()); } finally { } } };
assertTrue(bucketRegion.getFullPath().equals(val.getFullPath()));
snapshot.put(br.getFullPath(), br.getVersionVector().getSnapShotOfMemberVersion());
mgr = IndexUtils.getIndexManager(this.cache.getRegion(this.bukRgn.getFullPath()), false);
public void testCheckEntryLruEvictionsIn1DataStore() { int extraEntries=10; createCache(); maxEnteries=20; createPartitionedRegion(true, EvictionAlgorithm.LRU_ENTRY, "PR1", 5, 1, 1000,maxEnteries); final PartitionedRegion pr = (PartitionedRegion)cache.getRegion("PR1"); getLogWriter().info( "PR- " +pr.getEvictionAttributes().getMaximum()); for (int counter = 1; counter <= maxEnteries+extraEntries; counter++) { pr.put(new Integer(counter), new byte[1 * 1024 * 1024]); } assertEquals(extraEntries,((AbstractLRURegionMap)pr.entries)._getLruList().stats().getEvictions()); for (final Iterator i = pr.getDataStore().getAllLocalBuckets().iterator(); i .hasNext();) { final Map.Entry entry = (Map.Entry)i.next(); final BucketRegion bucketRegion = (BucketRegion)entry.getValue(); if (bucketRegion == null) { continue; } getLogWriter().info( "FINAL bucket= " + bucketRegion.getFullPath() + "size= " + bucketRegion.size() + " count= "+bucketRegion.entryCount()); assertEquals(4,bucketRegion.size()); } }
mgr = IndexUtils.getIndexManager(this.cache.getRegion(this.bukRgn.getFullPath()), false);
logger.debug("cleanup: Locally destroyed bucket {}", buk.getFullPath());
/** * Returns the index for the bucket. */ static public AbstractIndex getBucketIndex(PartitionedRegion pr, String indexName, Integer bId) throws QueryInvocationTargetException { try { pr.checkReadiness(); } catch (Exception ex) { throw new QueryInvocationTargetException(ex.getMessage()); } PartitionedRegionDataStore prds = pr.getDataStore(); BucketRegion bukRegion; bukRegion = (BucketRegion)prds.getLocalBucketById(bId); if (bukRegion == null){ throw new BucketMovedException("Bucket not found for the id :" + bId); } AbstractIndex index = null; if (bukRegion.getIndexManager() != null) { index = (AbstractIndex)(bukRegion.getIndexManager().getIndex(indexName)); } else { if (pr.getCache().getLogger().fineEnabled()) { pr.getCache().getLogger().fine("Index Manager not found for the bucket region " + bukRegion.getFullPath() + " unable to fetch the index " + indexName); } throw new QueryInvocationTargetException("Index Manager not found, " + " unable to fetch the index " + indexName); } return index; }
long ignoreBytes = (this.isDestroyed || this.isDestroyingDiskRegion) ? getIgnoreBytes() : getIgnoreBytes() + regionOverHead; callback.dropStorageMemory(getFullPath(), ignoreBytes);
if (pr.getCache().getLogger().fineEnabled()) { pr.getCache().getLogger().fine("Index Manager not found for the bucket region " + bukRegion.getFullPath() + " unable to fetch the index " + indexName);
if(store != null) { for(BucketRegion bucket: store.getAllLocalBucketRegions()) { RegionLogger.logDestroy(bucket.getFullPath(), getMyId(), bucket.getPersistentID(), true);
pr.getCache().getLogger().fine("Verifying index presence on bucket region. " + " Found index " + this.indexName + " not present on the bucket region " + bukRegion.getFullPath() + ", index will be created on this region.");
pr.getCache().getLogger().fine("Verifying index presence on bucket region. " + " Found index " + this.indexName + " not present on the bucket region " + bukRegion.getFullPath() + ", index will be created on this region.");
logger.fine("cleanup: Locally destroyed bucket " + buk.getFullPath());
-1L); toBePublishedEvents .put(br.getFullPath(), txrs.tailKeysForParallelWAN);