Package org.apache.hadoop.metrics2.lib
Class DefaultMetricsSystemHelper
java.lang.Object
org.apache.hadoop.metrics2.lib.DefaultMetricsSystemHelper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
removeObjectName
(String name) void
removeSourceName
(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
-
DefaultMetricsSystemHelper
public DefaultMetricsSystemHelper()
-
-
Method Details
-
removeObjectName
-
removeSourceName
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. 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.
-