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:
parent
8e4d074c12
commit
6bcccde06a
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue