public void run2() throws CacheException { for (int rs = 0; rs < regions.length; rs++) { PartitionedRegion p = (PartitionedRegion) getCache().getRegion(regions[rs]); assertNotNull(p); assertEquals(3, p.getTotalNumberOfBuckets()); // Create one bucket p.put(new Integer(0), "zero"); assertEquals(1, p.getRegionAdvisor().getCreatedBucketsCount()); } } });
int numOfBuckets) assertEquals(0, pr.getRegionAdvisor().getCreatedBucketsCount()); final RegionAdvisor ra = pr.getRegionAdvisor(); int nodeListCnt = 0;
public void run2() throws CacheException { Cache cache = getCache(); Region parentRegion = cache .getRegion(Region.SEPARATOR + parentRegionName); Region childRegion = null; childRegion = parentRegion.createSubregion(childRegionName, parentRegion .getAttributes()); PartitionedRegion pr = null; pr = (PartitionedRegion)cache.getRegion(Region.SEPARATOR + parentRegionName + Region.SEPARATOR + childRegionName + Region.SEPARATOR + PR_PREFIX); if (pr != null) fail("PR strill exists"); pr = (PartitionedRegion)childRegion.createSubregion(PR_PREFIX, createRegionAttributesForPR(1, 200)); // Assert.assertTrue(pr.getBucket2Node().size()==0, "B2N cleanup was not // done"); assertEquals(0, pr.getRegionAdvisor().getCreatedBucketsCount()); } };
PartitionedRegion pr = (PartitionedRegion)r; hasRows = (pr.getRegionAdvisor().getCreatedBucketsCount() > 0);
PartitionedRegion pr = (PartitionedRegion)r; hasRows = (pr.getRegionAdvisor().getCreatedBucketsCount() > 0);
PartitionedRegion pr = (PartitionedRegion)r; hasRows = (pr.getRegionAdvisor().getCreatedBucketsCount() > 0);
final int bucketSetSize = pr.getRegionAdvisor().getCreatedBucketsCount(); getLogWriter().info("BucketSet size " + bucketSetSize); if (bucketSetSize != 0) {
int createdBucketCount = pr.getRegionAdvisor().getCreatedBucketsCount(); int lowRedundancyBucketCount = prStats.getLowRedundancyBucketCount(); int configuredRedundantCopies = pr.getRedundantCopies();
int createdBucketCount = pr.getRegionAdvisor().getCreatedBucketsCount(); int lowRedundancyBucketCount = prStats.getLowRedundancyBucketCount(); int configuredRedundantCopies = pr.getRedundantCopies();
static int getNumBucketsOrSize(Region<?, ?> region, LanguageConnectionContext lcc) throws StandardException { // ignore the buckets in region for initial DDL replay (bug #40759) if (Misc.initialDDLReplayInProgress()) { return 0; } DataPolicy policy = region.getAttributes().getDataPolicy(); if (policy.withPartitioning()) { PartitionedRegion pregion = (PartitionedRegion)region; return pregion.getRegionAdvisor().getCreatedBucketsCount(); } else if (policy.withReplication() || !policy.withStorage()) { final RegionSizeMessage rmsg = new RegionSizeMessage( region.getFullPath(), new GfxdSingleResultCollector(), (LocalRegion)region, null, lcc); try { Object result = rmsg.executeFunction(); assert result instanceof Integer; return ((Integer)result).intValue(); } catch (SQLException sqle) { throw Misc.wrapRemoteSQLException(sqle, sqle, null); } } else { return region.size(); } }
static int getNumBucketsOrSize(Region<?, ?> region, LanguageConnectionContext lcc) throws StandardException { // ignore the buckets in region for initial DDL replay (bug #40759) if (Misc.initialDDLReplayInProgress()) { return 0; } DataPolicy policy = region.getAttributes().getDataPolicy(); if (policy.withPartitioning()) { PartitionedRegion pregion = (PartitionedRegion)region; return pregion.getRegionAdvisor().getCreatedBucketsCount(); } else if (policy.withReplication() || !policy.withStorage()) { final RegionSizeMessage rmsg = new RegionSizeMessage( region.getFullPath(), new GfxdSingleResultCollector(), (LocalRegion)region, null, lcc); try { Object result = rmsg.executeFunction(); assert result instanceof Integer; return ((Integer)result).intValue(); } catch (SQLException sqle) { throw Misc.wrapRemoteSQLException(sqle, sqle, null); } } else { return region.size(); } }
static int getNumBucketsOrSize(Region<?, ?> region, LanguageConnectionContext lcc) throws StandardException { // ignore the buckets in region for initial DDL replay (bug #40759) if (Misc.initialDDLReplayInProgress()) { return 0; } DataPolicy policy = region.getAttributes().getDataPolicy(); if (policy.withPartitioning()) { PartitionedRegion pregion = (PartitionedRegion)region; return pregion.getRegionAdvisor().getCreatedBucketsCount(); } else if (policy.withReplication() || !policy.withStorage()) { final RegionSizeMessage rmsg = new RegionSizeMessage( region.getFullPath(), new GfxdSingleResultCollector(), (LocalRegion)region, null, lcc); try { Object result = rmsg.executeFunction(); assert result instanceof Integer; return ((Integer)result).intValue(); } catch (SQLException sqle) { throw Misc.wrapRemoteSQLException(sqle, sqle, null); } } else { return region.size(); } }