@Test public void testGetJMXPropertyInfoMap() { AbstractPropertyProvider provider = new TestPropertyProvider( PropertyHelper.getJMXPropertyIds(Resource.Type.HostComponent)); Map<String, PropertyInfo> propertyInfoMap = provider.getPropertyInfoMap("DATANODE", "metrics"); Assert.assertEquals(86, propertyInfoMap.size()); propertyInfoMap = provider.getPropertyInfoMap("DATANODE", "metrics/rpc/RpcQueueTime_avg_time"); Assert.assertEquals(1, propertyInfoMap.size()); Assert.assertTrue(propertyInfoMap.containsKey("metrics/rpc/RpcQueueTime_avg_time")); propertyInfoMap = provider.getPropertyInfoMap("DATANODE", "metrics/rpc/"); Assert.assertEquals(12, propertyInfoMap.size()); Assert.assertTrue(propertyInfoMap.containsKey("metrics/rpc/RpcQueueTime_avg_time")); }
protected Map<String, PropertyInfo> getPropertyInfoMap(String componentName, String propertyId) { Map<String, PropertyInfo> propertyInfoMap = new HashMap<String, PropertyInfo>(); updatePropertyInfoMap(componentName, propertyId, propertyInfoMap); return propertyInfoMap; }
AbstractPropertyProvider extends BaseProvider implements PropertyProvider { protected Map<String, PropertyInfo> getPropertyInfoMap(String componentName, String propertyId) { Map<String, PropertyInfo> propertyInfoMap = new HashMap<String, PropertyInfo>(); updatePropertyInfoMap(componentName, propertyId, propertyInfoMap); return propertyInfoMap; } }
AbstractPropertyProvider extends BaseProvider implements PropertyProvider { protected Map<String, PropertyInfo> getPropertyInfoMap(String componentName, String propertyId) { Map<String, PropertyInfo> propertyInfoMap = new HashMap<String, PropertyInfo>(); updatePropertyInfoMap(componentName, propertyId, propertyInfoMap); return propertyInfoMap; } AbstractPropertyProvider(Map<String, Map<String, PropertyInfo>> componentMetrics); }
AbstractPropertyProvider extends BaseProvider implements PropertyProvider { protected Map<String, PropertyInfo> getPropertyInfoMap(String componentName, String propertyId) { Map<String, PropertyInfo> propertyInfoMap = new HashMap<String, PropertyInfo>(); updatePropertyInfoMap(componentName, propertyId, propertyInfoMap); return propertyInfoMap; } AbstractPropertyProvider(Map<String, Map<String, PropertyInfo>> componentMetrics); Map<String, Map<String, PropertyInfo>> getComponentMetrics(); }
AbstractPropertyProvider extends BaseProvider implements PropertyProvider { protected Map<String, PropertyInfo> getPropertyInfoMap(String componentName, String propertyId) { Map<String, PropertyInfo> propertyInfoMap = new HashMap<String, PropertyInfo>(); updatePropertyInfoMap(componentName, propertyId, propertyInfoMap); return propertyInfoMap; } AbstractPropertyProvider(Map<String, Map<String, PropertyInfo>> componentMetrics); Map<String, Map<String, PropertyInfo>> getComponentMetrics();  }