/** * This method iterates over localBucket2RegionMap and returns collective size * of the bucket regions. <br> * Steps: <br> * 1) Check if localBucket2RegionMap is empty. If it is, return 0.<br> * 2) If localBucket2RegionMap is not empty, get keyset of all these bucket * IDs. <br> * 3) Get the nodeList for the bucket ID from Bucket2Node region. <br> * 4) If first node from the node list is current node, increment the size * counter. <br> * 5) Step#4 takes care of the problem of recounting the size of redundant * buckets. <br> * * * @return the map of bucketIds and their associated sizes, or * {@link Collections#EMPTY_MAP}when the size is zero */ public Map getSizeLocally() { return getSizeLocally(false); }
/** * This method iterates over localBucket2RegionMap and returns collective size * of the bucket regions. <br> * Steps: <br> * 1) Check if localBucket2RegionMap is empty. If it is, return 0.<br> * 2) If localBucket2RegionMap is not empty, get keyset of all these bucket * IDs. <br> * 3) Get the nodeList for the bucket ID from Bucket2Node region. <br> * 4) If first node from the node list is current node, increment the size * counter. <br> * 5) Step#4 takes care of the problem of recounting the size of redundant * buckets. <br> * * * @return the map of bucketIds and their associated sizes, or * {@link Collections#EMPTY_MAP}when the size is zero */ public Map getSizeLocally() { return getSizeLocally(false); }
/** * Test Method: Get the number of entries in the local data store. */ public long getLocalSize() { if (this.dataStore == null) { return 0L; } long ret = 0L; Integer i; for (Iterator si = this.dataStore.getSizeLocally().values().iterator(); si .hasNext();) { i = (Integer)si.next(); ret += i.intValue(); } return ret; }
/** * Test Method: Get the number of entries in the local data store. */ public long getLocalSize() { if (this.dataStore == null) { return 0L; } long ret = 0L; Integer i; for (Iterator si = this.dataStore.getSizeLocally().values().iterator(); si .hasNext();) { i = (Integer)si.next(); ret += i.intValue(); } return ret; }
public static void checkBucketsOnServer(){ PartitionedRegion region = (PartitionedRegion)cache.getRegion(PartitionedRegionName); HashMap localBucket2RegionMap = (HashMap)region .getDataStore().getSizeLocally(); getLogWriter().info( "Size of the " + PartitionedRegionName + " in this VM :- " + localBucket2RegionMap.size()); Set entrySet = localBucket2RegionMap.entrySet(); assertNotNull(entrySet); }
public static void checkBucketsOnServer() { PartitionedRegion region = (PartitionedRegion)cache .getRegion(PartitionedRegionName); HashMap localBucket2RegionMap = (HashMap)region.getDataStore() .getSizeLocally(); getLogWriter().info( "Size of the " + PartitionedRegionName + " in this VM :- " + localBucket2RegionMap.size()); Set entrySet = localBucket2RegionMap.entrySet(); assertNotNull(entrySet); }
public static void checkBucketsOnServer() { PartitionedRegion region = (PartitionedRegion)cache .getRegion(PartitionedRegionName); HashMap localBucket2RegionMap = (HashMap)region.getDataStore() .getSizeLocally(); getLogWriter().info( "Size of the " + PartitionedRegionName + " in this VM :- " + localBucket2RegionMap.size()); Set entrySet = localBucket2RegionMap.entrySet(); assertNotNull(entrySet); }
public static void checkBucketsOnServer(){ PartitionedRegion region = (PartitionedRegion)cache.getRegion(PartitionedRegionName); HashMap localBucket2RegionMap = (HashMap)region .getDataStore().getSizeLocally(); getLogWriter().info( "Size of the " + PartitionedRegionName + " in this VM :- " + localBucket2RegionMap.size()); Set entrySet = localBucket2RegionMap.entrySet(); assertNotNull(entrySet); }
public static void checkPrimaryBucketsForCustomer(Integer numBuckets, Integer primaryBuckets, String customerPartitionedRegionName) { PartitionedRegion customerPartitionedregion = null; try { customerPartitionedregion = (PartitionedRegion)cache .getRegion(Region.SEPARATOR + customerPartitionedRegionName); } catch (Exception e) { fail( "validateAfterPutPartitionedRegion : failed while getting the region", e); } HashMap localBucket2RegionMap_Customer = (HashMap)customerPartitionedregion .getDataStore().getSizeLocally(); assertEquals(numBuckets.intValue(), localBucket2RegionMap_Customer.size()); List primaryBuckets_Customer = customerPartitionedregion.getDataStore() .getLocalPrimaryBucketsListTestOnly(); assertEquals(primaryBuckets.intValue(), primaryBuckets_Customer.size()); }
.getDataStore().getSizeLocally(); HashMap localBucket2RegionMap_Order = (HashMap)orderPartitionedregion .getDataStore().getSizeLocally(); HashMap localBucket2RegionMap_Shipment = (HashMap)shipmentPartitionedregion .getDataStore().getSizeLocally(); assertEquals(numBuckets.intValue(), localBucket2RegionMap_Customer.size()); assertEquals(numBuckets.intValue(), localBucket2RegionMap_Order.size());
.getDataStore().getSizeLocally(); HashMap localBucket2RegionMap_Order = (HashMap)orderPartitionedregion .getDataStore().getSizeLocally(); HashMap localBucket2RegionMap_Shipment = (HashMap)shipmentPartitionedregion .getDataStore().getSizeLocally(); assertEquals(numBuckets.intValue(), localBucket2RegionMap_Customer.size()); assertEquals(numBuckets.intValue(), localBucket2RegionMap_Order.size());
public static void checkPrimaryBucketsForQuarterAfterCacheClosed( Integer numBuckets, Integer primaryBuckets) { HashMap localBucket2RegionMap = (HashMap)region_FPR.getDataStore() .getSizeLocally(); getLogWriter().info( "Size of the " + region_FPR + " in this VM :- " + localBucket2RegionMap.size() + "List of buckets : " + localBucket2RegionMap.keySet()); assertEquals(numBuckets.intValue(), localBucket2RegionMap.size()); getLogWriter().info( "Size of primary buckets the " + region_FPR + " in this VM :- " + region_FPR.getDataStore().getNumberOfPrimaryBucketsManaged()); getLogWriter().info( "List of Primaries in this VM :- " + region_FPR.getDataStore().getAllLocalPrimaryBucketIds()); assertEquals(region_FPR.getDataStore().getNumberOfPrimaryBucketsManaged() % primaryBuckets.intValue(), 0); }
public static void checkPrimaryBucketsForQuarter(Integer numBuckets, Integer primaryBuckets) { HashMap localBucket2RegionMap = (HashMap)region_FPR.getDataStore() .getSizeLocally(); getLogWriter().info( "Size of the " + region_FPR + " in this VM :- " + localBucket2RegionMap.size() + "List of buckets : " + localBucket2RegionMap.keySet()); assertEquals(numBuckets.intValue(), localBucket2RegionMap.size()); getLogWriter().info( "Size of primary buckets the " + region_FPR + " in this VM :- " + region_FPR.getDataStore().getNumberOfPrimaryBucketsManaged()); getLogWriter().info( "List of Primaries in this VM :- " + region_FPR.getDataStore().getAllLocalPrimaryBucketIds()); assertEquals(primaryBuckets.intValue(), region_FPR.getDataStore() .getNumberOfPrimaryBucketsManaged()); }
.getDataStore().getSizeLocally(); int customerBucketSize = localBucket2RegionMap.size(); getLogWriter().info( .getSizeLocally(); int orderBucketSize = localBucket2RegionMap.size(); getLogWriter().info( .getSizeLocally(); int shipmentBucketSize = localBucket2RegionMap.size(); getLogWriter().info(
.getDataStore().getSizeLocally(); Set customerEntrySet = localBucket2RegionMap.entrySet(); assertNotNull(customerEntrySet); .getDataStore().getSizeLocally(); Set customerEntrySet = localBucket2RegionMap.entrySet(); assertNotNull(customerEntrySet); .getDataStore().getSizeLocally(); Set customerEntrySet = localBucket2RegionMap.entrySet(); assertNotNull(customerEntrySet);
long[] bucketSizes = new long[configuredBucketCount]; Map<Integer,Integer> bucketSizeMap = ds.getSizeLocally(); for (Iterator<Map.Entry<Integer,Integer>> iter = bucketSizeMap.entrySet().iterator(); iter.hasNext();) {
long[] bucketSizes = new long[configuredBucketCount]; Map<Integer,Integer> bucketSizeMap = ds.getSizeLocally(); for (Iterator<Map.Entry<Integer,Integer>> iter = bucketSizeMap.entrySet().iterator(); iter.hasNext();) {
.getDataStore().getSizeLocally(); baseRowCount = 0; basePrimaryBucketsRowCount = 0;