public abstract class AbstractPropertyProvider extends BaseProvider implements PropertyProvider
| Constructor and Description | 
|---|
| AbstractPropertyProvider(Map<String,Map<String,PropertyInfo>> componentMetrics)Construct a provider. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | checkAuthorizationForMetrics(Set<Resource> resources,
                            String clusterNamePropertyId)Check the User's authorization for retrieving the Metrics. | 
| protected boolean | checkPropertyCategory(String propertyId)Verify if the property category is supported | 
| protected Set<String> | getClustersNameFromResources(Set<Resource> resources,
                            String clusterNamePropertyId)Retrieves all the cluster names to which the passed-in Resource's belong. | 
| protected Set<Long> | getClustersResourceId(Set<Resource> resources,
                     String clusterNamePropertyId)Retrieves all the 'Cluster's Resource Ids' from the passed-in Resources. | 
| Map<String,Map<String,PropertyInfo>> | getComponentMetrics()Get the map of metrics for this provider. | 
| protected Map<String,PropertyInfo> | getPropertyInfoMap(String componentName,
                  String propertyId)Get a map of metric / property info based on the given component name and property id. | 
| protected String | getResourceTypeFromResources(Set<Resource> resources)Retrieves passed-in Resource's Type | 
| protected static Object | getValue(org.apache.hadoop.metrics2.sink.timeline.TimelineMetric metric,
        TemporalInfo temporalInfo)Get value from the given metric. | 
| protected boolean | isSupportedPropertyId(String componentName,
                     String propertyId)Verify that the component metrics contains the property id. | 
| protected static String | substituteArgument(String propertyId,
                  String argName,
                  String val)Substitute the given value into the argument in the given property id. | 
| protected void | updateComponentMetricMap(Map<String,PropertyInfo> componentMetricMap,
                        String propertyId)Adds to the componentMetricMap a specific(not regexp)
 metric for the propertyId | 
| protected PropertyInfo | updatePropertyInfo(String propertyKey,
                  String id,
                  PropertyInfo propertyInfo) | 
| protected void | updatePropertyInfoMap(String componentName,
                     String propertyId,
                     Map<String,PropertyInfo> propertyInfoMap) | 
checkCategory, checkConfigPropertyIds, checkPropertyIds, containsArguments, getCategoryIds, getPropertyIds, getRegexEntry, getRegexGroups, getRequestPropertyIds, isPatternKey, isPropertyCategoryRequested, isPropertyEntryRequested, isPropertyRequested, setResourcePropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckPropertyIds, populateResourcespublic AbstractPropertyProvider(Map<String,Map<String,PropertyInfo>> componentMetrics)
componentMetrics - map of metrics for this providerpublic Map<String,Map<String,PropertyInfo>> getComponentMetrics()
protected String getResourceTypeFromResources(Set<Resource> resources)
resources - Set of Resources.protected Set<String> getClustersNameFromResources(Set<Resource> resources, String clusterNamePropertyId)
resources - Set of Resources.protected Set<Long> getClustersResourceId(Set<Resource> resources, String clusterNamePropertyId)
resources - Set of Resources.clusterNamePropertyId - ClusterName PropertyId.protected boolean checkAuthorizationForMetrics(Set<Resource> resources, String clusterNamePropertyId) throws AuthorizationException
resources - Set of Resources.clusterNamePropertyId - ClusterName PropertyId.AuthorizationExceptionprotected Map<String,PropertyInfo> getPropertyInfoMap(String componentName, String propertyId)
componentName - the component namepropertyId - the property id; may be a categoryprotected void updatePropertyInfoMap(String componentName, String propertyId, Map<String,PropertyInfo> propertyInfoMap)
protected static String substituteArgument(String propertyId, String argName, String val)
propertyId - the property idargName - the argument nameval - the value to substituteprotected void updateComponentMetricMap(Map<String,PropertyInfo> componentMetricMap, String propertyId)
componentMetricMap - propertyId - protected PropertyInfo updatePropertyInfo(String propertyKey, String id, PropertyInfo propertyInfo)
protected boolean isSupportedPropertyId(String componentName, String propertyId)
componentName - Name of the componentpropertyId - Property Idprotected boolean checkPropertyCategory(String propertyId)
protected static Object getValue(org.apache.hadoop.metrics2.sink.timeline.TimelineMetric metric, TemporalInfo temporalInfo)
metric - the metrictemporalInfo - indicates whether or not this a temporal metricCopyright © 2022 Apache Software Foundation. All rights reserved.