Package org.apache.hadoop.metrics2.lib
Class DefaultMetricsSystemHelper
java.lang.Object
org.apache.hadoop.metrics2.lib.DefaultMetricsSystemHelper
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanremoveObjectName(String name) voidremoveSourceName(String name) Unfortunately Hadoop tries to be too-clever and permanently keeps track of all names registered so far as a Source, thus preventing further re-registration of the source with the same name.
- 
Field Details- 
LOG
- 
removeObjectMethod
- 
sourceNamesField
- 
mapField
 
- 
- 
Constructor Details- 
DefaultMetricsSystemHelperpublic DefaultMetricsSystemHelper()
 
- 
- 
Method Details- 
removeObjectName
- 
removeSourceNameUnfortunately Hadoop tries to be too-clever and permanently keeps track of all names registered so far as a Source, thus preventing further re-registration of the source with the same name. In case of dynamic metrics tied to region-lifecycles, this becomes a problem because we would like to be able to re-register and remove with the same name. Otherwise, it is resource leak. This ugly code manually removes the name from the UniqueNames map. TODO: May not be needed for Hadoop versions after YARN-5190.
 
-