HBASE-9498 NPE in HBaseAdmin if master not running

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1521902 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-09-11 15:26:53 +00:00
parent 8e4d074c12
commit 6bcccde06a
1 changed files with 4 additions and 2 deletions

View File

@ -3062,7 +3062,8 @@ public class HBaseAdmin implements Abortable, Closeable {
@Override
public void close() throws IOException {
this.masterAdmin.close();
// The above prepare could fail but this would still be called though masterAdmin is null
if (this.masterAdmin != null) this.masterAdmin.close();
}
}
@ -3083,7 +3084,8 @@ public class HBaseAdmin implements Abortable, Closeable {
@Override
public void close() throws IOException {
this.masterMonitor.close();
// The above prepare could fail but this would still be called though masterMonitor is null
if (this.masterMonitor != null) this.masterMonitor.close();
}
}