From 125544acfa0395e0043053ae9da209ba65a7e32c Mon Sep 17 00:00:00 2001 From: Bo Cui Date: Sat, 18 Jul 2020 10:26:00 +0800 Subject: [PATCH] HBASE-24570 connection#close throws NPE --- .../apache/hadoop/hbase/client/ConnectionImplementation.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java index 9145c55c0a4..cfbc19cc30f 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java @@ -2116,7 +2116,9 @@ class ConnectionImplementation implements ClusterConnection, Closeable { this.metrics.shutdown(); } this.closed = true; - registry.close(); + if (this.registry != null) { + registry.close(); + } this.stubs.clear(); if (clusterStatusListener != null) { clusterStatusListener.close();