private static boolean isPartitioned(DataPolicy policy) { return policy != null && policy.toString().contains(PARTITION); }
return null; } else { if (str.equals(DataPolicy.EMPTY.toString())) { return DataPolicy.EMPTY; } else if (str.equals(DataPolicy.NORMAL.toString())) { return DataPolicy.NORMAL; } else if (str.equals(DataPolicy.HDFS_PARTITION.toString())) { return DataPolicy.HDFS_PARTITION; } else if (str.equals(DataPolicy.HDFS_PERSISTENT_PARTITION.toString())) { return DataPolicy.HDFS_PERSISTENT_PARTITION; } else if (str.equals(DataPolicy.PRELOADED.toString())) { return DataPolicy.PRELOADED; } else if (str.equals(DataPolicy.PARTITION.toString())) { return DataPolicy.PARTITION; } else if (str.equals(DataPolicy.PERSISTENT_PARTITION.toString())) { return DataPolicy.PERSISTENT_PARTITION; } else if (str.equals(DataPolicy.PERSISTENT_REPLICATE.toString())) { return DataPolicy.PERSISTENT_REPLICATE; } else if (str.equals(DataPolicy.REPLICATE.toString())) { return DataPolicy.REPLICATE; } else {
public int getEmptyNodes() { Iterator<RegionMXBean> it = mapOfProxy.values().iterator(); int emptyNodes = 0; if (it != null) { while (it.hasNext()) { RegionMXBean bean = it.next(); if (bean.getRegionType().equals(DataPolicy.EMPTY.toString())) { emptyNodes++; } if (bean.getLocalMaxMemory() == 0) { emptyNodes++; } } } return emptyNodes; }
public int getEmptyNodes() { Iterator<RegionMXBean> it = mapOfProxy.values().iterator(); int emptyNodes = 0; if (it != null) { while (it.hasNext()) { RegionMXBean bean = it.next(); if (bean.getRegionType().equals(DataPolicy.EMPTY.toString())) { emptyNodes++; } if (bean.getLocalMaxMemory() == 0) { emptyNodes++; } } } return emptyNodes; }
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("\nName :\t"); sb.append(this.getName()); sb.append("\nPath :\t"); sb.append(this.getPath()); sb.append("\nScope :\t"); sb.append(this.getScope().toString()); sb.append("\nData Policy :\t"); sb.append(this.getDataPolicy().toString()); if (this.parentRegion != null) { sb.append("\nParent Region :\t"); sb.append(this.parentRegion); } return sb.toString(); }
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("\nName :\t"); sb.append(this.getName()); sb.append("\nPath :\t"); sb.append(this.getPath()); sb.append("\nScope :\t"); sb.append(this.getScope().toString()); sb.append("\nData Policy :\t"); sb.append(this.getDataPolicy().toString()); if (this.parentRegion != null) { sb.append("\nParent Region :\t"); sb.append(this.parentRegion); } return sb.toString(); }
public String getPolicy() { return this.container.getRegionAttributes().getDataPolicy().toString(); }
public String getPolicy() { return this.container.getRegionAttributes().getDataPolicy().toString(); }
public String getRegionType() { return region.getAttributes().getDataPolicy().toString(); }
public String getRegionType() { return region.getAttributes().getDataPolicy().toString(); }
public String getPolicy() { return this.container.getRegionAttributes().getDataPolicy().toString(); }
out.writeObject(this.customEntryIdleTimeout); out.writeObject(this.customEntryTimeToLive); out.writeObject(this.dataPolicy.toString()); out.writeObject(this.diskStoreName); out.writeObject(this.diskStoreDescription);
@SuppressWarnings("unchecked") public Object call() throws Exception { Map[] maps = new Map[numOfRegions]; int i = 0; Set<Region<?, ?>> rootRegions = getCache().rootRegions(); for (Region<?, ?> region : rootRegions) { Map map = new HashMap(); map.put(KEY_REGION_NAME, region.getName()); map.put(KEY_REGION_PATH, region.getFullPath()+"/"); map.put(KEY_REGION_ENTRYCOUNT, region.entrySet().size()); RegionAttributes<?, ?> attributes = region.getAttributes(); Scope scope = attributes.getScope(); DataPolicy dataPolicy = attributes.getDataPolicy(); SubscriptionAttributes subscriptionAttributes = attributes.getSubscriptionAttributes(); InterestPolicy interestPolicy = subscriptionAttributes.getInterestPolicy(); DiskWriteAttributes diskWriteAttributes = attributes.getDiskWriteAttributes(); map.put(KEY_REGION_SCOPE, scope.toString()); map.put(KEY_REGION_DATAPOLICY, dataPolicy.toString()); map.put(KEY_REGION_INTERESTPOLICY, interestPolicy.toString()); map.put(KEY_REGION_DISKATTRS, diskWriteAttributes.toString()); maps[i] = map; i++; } return maps; }});
DataPolicy.PARTITION.toString().toLowerCase()) == true) { numberOfRows += mbean.getNumberOfRows(); entrySize += mbean.getEntrySize();
DataPolicy.PARTITION.toString().toLowerCase()) == true) { numberOfRows += mbean.getNumberOfRows(); entrySize += mbean.getEntrySize();
private void regionDebug(SystemMember systemMember){ SystemMemberCache cache; try { cache = systemMember.getCache(); } catch (Exception e) { throw new TestException ("Could get System Member Cache for region debug",e); } cache.refresh(); Set rootRegionNames = cache.getRootRegionNames(); log().info("DEBUG Found " + rootRegionNames.size()+" root regions"); for ( Iterator it = rootRegionNames.iterator(); it.hasNext(); ) { SystemMemberRegion region; try { region = cache.getRegion((String)it.next()); Log.getLogWriter().info( "DEBUG Root region = " + region.getName()); log().info("CacheLoader: " + region.getCacheLoader()); log().info("CacheWriter: " + region.getCacheWriter()); log().info("InitialCapacity: " + region.getInitialCapacity()); log().info("Concurrency Level: " + region.getConcurrencyLevel()); log().info("scope: " + region.getScope()); log().info("DataPolicy: " + region.getDataPolicy().toString()); } catch (AdminException ae) { throw new TestException ("Failed to get root region: " + (String)it.next()); } } }
gfsh.println(" Region attributes:"); gfsh.println(" " + RegionAttributeInfo.CONCURRENCY_LEVEL + "=<integer [16]>"); gfsh.println(" " + RegionAttributeInfo.DATA_POLICY + "=" + getDataPolicyValues() + " [" + DataPolicy.NORMAL.toString().toLowerCase().replace('_', '-') + "]"); gfsh.println(" " + RegionAttributeInfo.EARLY_ACK + "=" + getTrueFalseValues() + " [false]"); gfsh.println(" " + RegionAttributeInfo.ENABLE_ASYNC_CONFLATION + "=" + getTrueFalseValues() + " [false]");
message.put("Scope", region.getAttributes().getScope().toString()); message.put("DataPolicy", region.getAttributes().getDataPolicy().toString());