/** Given a Set of region MBeans, and a Set of expected region name paths, verify that there is an MBean * for each of the expected region paths. * @param regionMBeans A List of region MBeans. * @param expectedRegionPaths A Set of region full paths; there should be an MBean for each of these. */ private static void verifyRegionMBeans(Set<RegionMXBean> regionMBeans, Set<String> expectedRegionPaths) { Set<String> MBeanRegionPaths = new HashSet(); for (RegionMXBean regMBean: regionMBeans) { MBeanRegionPaths.add(regMBean.getFullPath()); } _verifyRegionMBeans(MBeanRegionPaths, expectedRegionPaths); }
/** Execute the CliHelperFunction to retrieve a value from a remote member. * * @param regionMBean This contains information about the remote member and region of interest. * @return The value requested by functionTask from the member and region specified in the regionMBean. */ protected static Object getValueFromFunction(RegionMXBean regionMBean) { String member = regionMBean.getMember(); Execution exe = FunctionService.onMember(getMemberFor(member)); String[] args = new String[] {"" + RemoteTestModule.getCurrentThread().getThreadId(), regionMBean.getFullPath()}; Log.getLogWriter().info("Executing " + exe + " with args " + Arrays.asList(args)); ResultCollector<?, ?> result = exe.withArgs(args).execute(new CliHelperFunction()); Object returnValue = ((ArrayList)(result.getResult())).get(0); return returnValue; }
String regionFullPath = regionMBean.getFullPath(); expectedValue = regionFullPath.substring(regionFullPath.lastIndexOf("/")+1); verifyValue(expectedValue, methodName, regionMBean, null);
private SnappyRegionStats collectDataFromBeanImpl(LocalRegion lr, RegionMXBean bean, boolean isReservoir) { String tableName = (Misc.getFullTableNameFromRegionPath(bean.getFullPath())); SnappyRegionStats tableStats = new SnappyRegionStats(tableName);