accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/6] accumulo git commit: ACCUMULO-3958 Ensure only non-null instance name is cached.
Date Mon, 24 Aug 2015 17:03:17 GMT
ACCUMULO-3958 Ensure only non-null instance name is cached.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0a8ec61c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0a8ec61c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0a8ec61c

Branch: refs/heads/1.7
Commit: 0a8ec61c9d5583dd33f93b127966048fb1c4a09c
Parents: d4c8fa6
Author: Josh Elser <elserj@apache.org>
Authored: Mon Aug 24 13:02:22 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Mon Aug 24 13:02:52 2015 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/accumulo/monitor/Monitor.java      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0a8ec61c/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index ecc5ece..25ee34f 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -255,7 +255,10 @@ public class Monitor {
           public void run() {
             synchronized (Monitor.class) {
               if (cachedInstanceName.get().equals(DEFAULT_INSTANCE_NAME)) {
-                cachedInstanceName.set(HdfsZooInstance.getInstance().getInstanceName());
+                final String instanceName = HdfsZooInstance.getInstance().getInstanceName();
+                if (null != instanceName) {
+                  cachedInstanceName.set(instanceName);
+                }
               }
             }
           }


Mime
View raw message