HBASE-9551: HBaseTestingUtility#createPreSplitLoadTestTable double close HBaseAdmin
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1524595 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
353016c99d
commit
f56dbe50a5
|
@ -2377,9 +2377,10 @@ public class HBaseAdmin implements Abortable, Closeable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public synchronized void close() throws IOException {
|
||||||
if (cleanupConnectionOnClose && this.connection != null) {
|
if (cleanupConnectionOnClose && this.connection != null) {
|
||||||
this.connection.close();
|
this.connection.close();
|
||||||
|
this.connection = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3028,7 +3028,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
||||||
totalNumberOfRegions);
|
totalNumberOfRegions);
|
||||||
|
|
||||||
admin.createTable(desc, splits);
|
admin.createTable(desc, splits);
|
||||||
admin.close();
|
|
||||||
} catch (MasterNotRunningException e) {
|
} catch (MasterNotRunningException e) {
|
||||||
LOG.error("Master not running", e);
|
LOG.error("Master not running", e);
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
|
|
|
@ -287,7 +287,6 @@ public class TestCoprocessorEndpoint {
|
||||||
TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface service =
|
TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface service =
|
||||||
TestRpcServiceProtos.TestProtobufRpcProto.newBlockingStub(admin.coprocessorService());
|
TestRpcServiceProtos.TestProtobufRpcProto.newBlockingStub(admin.coprocessorService());
|
||||||
assertEquals("hello", service.echo(null, request).getMessage());
|
assertEquals("hello", service.echo(null, request).getMessage());
|
||||||
admin.close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -320,8 +319,6 @@ public class TestCoprocessorEndpoint {
|
||||||
service.error(null, TestProtos.EmptyRequestProto.getDefaultInstance());
|
service.error(null, TestProtos.EmptyRequestProto.getDefaultInstance());
|
||||||
fail("Should have thrown an exception");
|
fail("Should have thrown an exception");
|
||||||
} catch (ServiceException e) {
|
} catch (ServiceException e) {
|
||||||
} finally {
|
|
||||||
admin.close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,6 @@ public class TestExportSnapshot {
|
||||||
TEST_UTIL.deleteTable(tableName);
|
TEST_UTIL.deleteTable(tableName);
|
||||||
SnapshotTestingUtils.deleteAllSnapshots(TEST_UTIL.getHBaseAdmin());
|
SnapshotTestingUtils.deleteAllSnapshots(TEST_UTIL.getHBaseAdmin());
|
||||||
SnapshotTestingUtils.deleteArchiveDirectory(TEST_UTIL);
|
SnapshotTestingUtils.deleteArchiveDirectory(TEST_UTIL);
|
||||||
admin.close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue