HBASE-9581: Few tests broken since HBASE-9551

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1524627 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jeffreyz 2013-09-19 06:17:20 +00:00
parent c7da56f21b
commit ccbdd1bc58
1 changed files with 3 additions and 2 deletions

View File

@ -159,6 +159,7 @@ public class HBaseAdmin implements Abortable, Closeable {
private final int retryLongerMultiplier; private final int retryLongerMultiplier;
private boolean aborted; private boolean aborted;
private boolean cleanupConnectionOnClose = false; // close the connection in close() private boolean cleanupConnectionOnClose = false; // close the connection in close()
private boolean closed = false;
private RpcRetryingCallerFactory rpcCallerFactory; private RpcRetryingCallerFactory rpcCallerFactory;
@ -2378,9 +2379,9 @@ public class HBaseAdmin implements Abortable, Closeable {
@Override @Override
public synchronized void close() throws IOException { public synchronized void close() throws IOException {
if (cleanupConnectionOnClose && this.connection != null) { if (cleanupConnectionOnClose && this.connection != null && !this.closed) {
this.connection.close(); this.connection.close();
this.connection = null; this.closed = true;
} }
} }