From cc8ea9bf082dbeab2dbc62c7c2fa4200aa9e502f Mon Sep 17 00:00:00 2001 From: Luke Lu Date: Wed, 14 Aug 2013 20:23:32 +0000 Subject: [PATCH] HADOOP 9871. Fix intermittent findbugs warnings in DefaultMetricsSystem. (Junping Du via llu) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1514025 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../org/apache/hadoop/metrics2/lib/DefaultMetricsSystem.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 81a97175b5b..fdc52ba3aa3 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -8,6 +8,9 @@ Release 2.3.0 - UNRELEASED IMPROVEMENTS + HADOOP 9871. Fix intermittent findbugs warnings in DefaultMetricsSystem. + (Junping Du via llu) + HADOOP-9319. Update bundled LZ4 source to r99. (Binglin Chang via llu) HADOOP-9432 Add support for markdown .md files in site documentation (stevel) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/DefaultMetricsSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/DefaultMetricsSystem.java index c8b33bc67f8..485f11d2666 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/DefaultMetricsSystem.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/DefaultMetricsSystem.java @@ -38,8 +38,8 @@ public enum DefaultMetricsSystem { private AtomicReference impl = new AtomicReference(new MetricsSystemImpl()); volatile boolean miniClusterMode = false; - final UniqueNames mBeanNames = new UniqueNames(); - final UniqueNames sourceNames = new UniqueNames(); + transient final UniqueNames mBeanNames = new UniqueNames(); + transient final UniqueNames sourceNames = new UniqueNames(); /** * Convenience method to initialize the metrics system