HDFS-9515. NPE when MiniDFSCluster#shutdown is invoked on uninitialized reference. (Contributed by Wei-Chiu Chuang)
This commit is contained in:
parent
a40ff6d4fb
commit
c0733db768
|
@ -1645,6 +1645,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HDFS-9570. Minor typos, grammar, and case sensitivity cleanup in
|
HDFS-9570. Minor typos, grammar, and case sensitivity cleanup in
|
||||||
HdfsPermissionsGuide.md's (Travis Campbell via aw)
|
HdfsPermissionsGuide.md's (Travis Campbell via aw)
|
||||||
|
|
||||||
|
HDFS-9515. NPE when MiniDFSCluster#shutdown is invoked on uninitialized
|
||||||
|
reference. (Wei-Chiu Chuang via Arpit Agarwal)
|
||||||
|
|
||||||
Release 2.7.3 - UNRELEASED
|
Release 2.7.3 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -63,6 +63,7 @@ public class TestBootstrapStandbyWithBKJM {
|
||||||
public void teardown() {
|
public void teardown() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class TestRefreshCallQueue {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if(cluster!=null) {
|
if(cluster!=null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,9 +49,11 @@ public class TestAclCLI extends CLITestHelperDFS {
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,9 +76,11 @@ public class TestCacheAdminCLI extends CLITestHelper {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (dfsCluster != null) {
|
if (dfsCluster != null) {
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown();
|
||||||
|
dfsCluster = null;
|
||||||
}
|
}
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
|
|
|
@ -86,9 +86,11 @@ public class TestCryptoAdminCLI extends CLITestHelperDFS {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (dfsCluster != null) {
|
if (dfsCluster != null) {
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown();
|
||||||
|
dfsCluster = null;
|
||||||
}
|
}
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
|
|
|
@ -58,9 +58,11 @@ public class TestDeleteCLI extends CLITestHelperDFS {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (dfsCluster != null) {
|
if (dfsCluster != null) {
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown();
|
||||||
|
dfsCluster = null;
|
||||||
}
|
}
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
|
|
|
@ -77,9 +77,11 @@ public class TestHDFSCLI extends CLITestHelperDFS {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (dfsCluster != null) {
|
if (dfsCluster != null) {
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown();
|
||||||
|
dfsCluster = null;
|
||||||
}
|
}
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
|
|
|
@ -67,9 +67,11 @@ public class TestXAttrCLI extends CLITestHelperDFS {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (dfsCluster != null) {
|
if (dfsCluster != null) {
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown();
|
||||||
|
dfsCluster = null;
|
||||||
}
|
}
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
|
|
|
@ -58,7 +58,9 @@ public class TestFcHdfsCreateMkdir extends
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -66,7 +66,9 @@ public class TestFcHdfsPermission extends FileContextPermissionBase {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -96,7 +96,9 @@ public class TestFcHdfsSetUMask {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -98,7 +98,9 @@ abstract public class TestSymlinkHdfs extends SymlinkBaseTest {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void afterClassTeardown() throws Exception {
|
public static void afterClassTeardown() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout=10000)
|
@Test(timeout=10000)
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class HDFSContract extends AbstractFSContract {
|
||||||
public static void destroyCluster() throws IOException {
|
public static void destroyCluster() throws IOException {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,11 @@ public class TestHdfsTextCommand {
|
||||||
public void tearDown() throws IOException{
|
public void tearDown() throws IOException{
|
||||||
if(fs != null){
|
if(fs != null){
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if(cluster != null){
|
if(cluster != null){
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,9 @@ public class TestViewFileSystemHdfs extends ViewFileSystemBaseTest {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -76,7 +76,9 @@ public class TestViewFileSystemWithAcls {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
|
|
@ -71,7 +71,9 @@ public class TestViewFileSystemWithXAttrs {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
|
|
@ -64,7 +64,9 @@ public class TestViewFsAtHdfsRoot extends ViewFsBaseTest {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -64,7 +64,9 @@ public class TestViewFsHdfs extends ViewFsBaseTest {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -76,7 +76,9 @@ public class TestViewFsWithAcls {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
|
|
@ -70,7 +70,9 @@ public class TestViewFsWithXAttrs {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void ClusterShutdownAtEnd() throws Exception {
|
public static void ClusterShutdownAtEnd() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
|
|
@ -68,7 +68,9 @@ public class FileAppendTest4 {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDown() {
|
public static void tearDown() {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,8 +56,14 @@ public class TestAbandonBlock {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
fs.close();
|
if (fs != null) {
|
||||||
cluster.shutdown();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
|
}
|
||||||
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -43,9 +43,11 @@ public class TestBlocksScheduledCounter {
|
||||||
public void tearDown() throws IOException {
|
public void tearDown() throws IOException {
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if(cluster!=null){
|
if(cluster!=null){
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,8 +82,14 @@ public class TestClientReportBadBlock {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void shutDownCluster() throws IOException {
|
public void shutDownCluster() throws IOException {
|
||||||
dfs.close();
|
if (dfs != null) {
|
||||||
cluster.shutdown();
|
dfs.close();
|
||||||
|
dfs = null;
|
||||||
|
}
|
||||||
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class TestDFSClientExcludedNodes {
|
||||||
public void tearDown() {
|
public void tearDown() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,7 @@ public class TestDFSClientFailover {
|
||||||
public void tearDownCluster() throws IOException {
|
public void tearDownCluster() throws IOException {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ public class TestDFSClientSocketSize {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
LOG.info("Shutting down MiniDFSCluster.");
|
LOG.info("Shutting down MiniDFSCluster.");
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,10 @@ public class TestDFSFinalize {
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
LOG.info("Shutting down MiniDFSCluster");
|
LOG.info("Shutting down MiniDFSCluster");
|
||||||
if (cluster != null) cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
|
@ -150,6 +150,8 @@ public class TestDFSOutputStream {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDown() {
|
public static void tearDown() {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,7 @@ public class TestDFSPermission {
|
||||||
public void tearDown() throws IOException {
|
public void tearDown() throws IOException {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -346,7 +346,10 @@ public class TestDFSRollback {
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
LOG.info("Shutting down MiniDFSCluster");
|
LOG.info("Shutting down MiniDFSCluster");
|
||||||
if (cluster != null) cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
|
@ -282,7 +282,10 @@ public class TestDFSStartupVersions {
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
LOG.info("Shutting down MiniDFSCluster");
|
LOG.info("Shutting down MiniDFSCluster");
|
||||||
if (cluster != null) cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
|
@ -452,6 +452,9 @@ public class TestDFSStorageStateRecovery {
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
LOG.info("Shutting down MiniDFSCluster");
|
LOG.info("Shutting down MiniDFSCluster");
|
||||||
if (cluster != null) cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -69,7 +69,10 @@ public class TestDataTransferKeepalive {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void teardown() {
|
public void teardown() {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -126,6 +126,7 @@ public class TestDecommission {
|
||||||
cleanupFile(localFileSys, dir);
|
cleanupFile(localFileSys, dir);
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,6 +170,7 @@ public class TestEncryptionZones {
|
||||||
public void teardown() {
|
public void teardown() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
EncryptionFaultInjector.instance = new EncryptionFaultInjector();
|
EncryptionFaultInjector.instance = new EncryptionFaultInjector();
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,7 @@ public class TestEncryptionZonesWithHA {
|
||||||
public void shutdownCluster() throws IOException {
|
public void shutdownCluster() throws IOException {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,8 +84,10 @@ public class TestFileConcurrentReader {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
cluster = null;
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(Configuration conf) throws IOException {
|
private void init(Configuration conf) throws IOException {
|
||||||
|
|
|
@ -82,8 +82,12 @@ public class TestFileStatus {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void testTearDown() throws Exception {
|
public static void testTearDown() throws Exception {
|
||||||
fs.close();
|
if (fs != null) {
|
||||||
cluster.shutdown();
|
fs.close();
|
||||||
|
}
|
||||||
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void writeFile(FileSystem fileSys, Path name, int repl,
|
private static void writeFile(FileSystem fileSys, Path name, int repl,
|
||||||
|
|
|
@ -52,6 +52,7 @@ public class TestGetFileChecksum {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,10 @@ public class TestHDFSFileSystemContract extends FileSystemContractBaseTest {
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
cluster = null;
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -47,6 +47,7 @@ public class TestHdfsAdmin {
|
||||||
public void shutDownCluster() {
|
public void shutDownCluster() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ public class TestLeaseRecovery {
|
||||||
public void shutdown() throws IOException {
|
public void shutdown() throws IOException {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,8 +101,10 @@ public class TestLeaseRecovery2 {
|
||||||
*/
|
*/
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDown() throws IOException {
|
public static void tearDown() throws IOException {
|
||||||
IOUtils.closeStream(dfs);
|
if (cluster != null) {
|
||||||
if (cluster != null) {cluster.shutdown();}
|
IOUtils.closeStream(dfs);
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -46,8 +46,10 @@ public class TestListFilesInDFS extends TestListFiles {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void testShutdown() throws Exception {
|
public static void testShutdown() throws Exception {
|
||||||
fs.close();
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
fs.close();
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static Path getTestDir() {
|
protected static Path getTestDir() {
|
||||||
|
|
|
@ -83,7 +83,9 @@ public class TestListFilesInFileContext {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void testShutdown() throws Exception {
|
public static void testShutdown() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Test when input path is a file */
|
/** Test when input path is a file */
|
||||||
|
|
|
@ -65,11 +65,14 @@ public class TestPipelines {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void shutDownCluster() throws IOException {
|
public void shutDownCluster() throws IOException {
|
||||||
if (fs != null)
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
|
}
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdownDataNodes();
|
cluster.shutdownDataNodes();
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,7 @@ public class TestReservedRawPaths {
|
||||||
public void teardown() {
|
public void teardown() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,9 +90,11 @@ public class TestSafeMode {
|
||||||
public void tearDown() throws IOException {
|
public void tearDown() throws IOException {
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,10 @@ public class TestWriteRead {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Equivalence of @Before for cluster mode testing.
|
// Equivalence of @Before for cluster mode testing.
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class TestSaslDataTransfer extends SaslDataTransferTestCase {
|
||||||
IOUtils.cleanup(null, fs);
|
IOUtils.cleanup(null, fs);
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,9 +154,11 @@ public class TestSecureNNWithQJM {
|
||||||
IOUtils.cleanup(null, fs);
|
IOUtils.cleanup(null, fs);
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
if (mjc != null) {
|
if (mjc != null) {
|
||||||
mjc.shutdown();
|
mjc.shutdown();
|
||||||
|
mjc = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,7 @@ public class TestQuorumJournalManager {
|
||||||
|
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ public class TestJournalNodeMXBean {
|
||||||
public void cleanup() throws IOException {
|
public void cleanup() throws IOException {
|
||||||
if (jCluster != null) {
|
if (jCluster != null) {
|
||||||
jCluster.shutdown();
|
jCluster.shutdown();
|
||||||
|
jCluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class TestDelegationToken {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if(cluster!=null) {
|
if(cluster!=null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class TestBlockStatsMXBean {
|
||||||
public void tearDown() {
|
public void tearDown() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ public class TestComputeInvalidateWork {
|
||||||
public void teardown() throws Exception {
|
public void teardown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@ public class TestPendingInvalidateBlock {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,10 +115,12 @@ public abstract class BlockReportTestBase {
|
||||||
public void shutDownCluster() throws IOException {
|
public void shutDownCluster() throws IOException {
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdownDataNodes();
|
cluster.shutdownDataNodes();
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,10 @@ public class TestDataNodeExit {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null)
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopBPServiceThreads(int numStopThreads, DataNode dn)
|
private void stopBPServiceThreads(int numStopThreads, DataNode dn)
|
||||||
|
|
|
@ -116,12 +116,15 @@ public class TestDataNodeVolumeFailure {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if(data_fail != null) {
|
if(data_fail != null) {
|
||||||
FileUtil.setWritable(data_fail, true);
|
FileUtil.setWritable(data_fail, true);
|
||||||
|
data_fail = null;
|
||||||
}
|
}
|
||||||
if(failedDir != null) {
|
if(failedDir != null) {
|
||||||
FileUtil.setWritable(failedDir, true);
|
FileUtil.setWritable(failedDir, true);
|
||||||
|
failedDir = null;
|
||||||
}
|
}
|
||||||
if(cluster != null) {
|
if(cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ public class TestDataNodeVolumeFailureReporting {
|
||||||
IOUtils.cleanup(LOG, fs);
|
IOUtils.cleanup(LOG, fs);
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@ public class TestDataNodeVolumeFailureToleration {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,10 @@ public class TestDiskError {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -149,9 +149,11 @@ public class TestFsDatasetCache {
|
||||||
DFSTestUtil.verifyExpectedCacheUsage(0, 0, fsd);
|
DFSTestUtil.verifyExpectedCacheUsage(0, 0, fsd);
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
// Restore the original CacheManipulator
|
// Restore the original CacheManipulator
|
||||||
NativeIO.POSIX.setCacheManipulator(prevCacheManipulator);
|
NativeIO.POSIX.setCacheManipulator(prevCacheManipulator);
|
||||||
|
|
|
@ -101,10 +101,13 @@ public class TestIncrementalBrVariations {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void shutDownCluster() throws IOException {
|
public void shutDownCluster() throws IOException {
|
||||||
client.close();
|
if (cluster != null) {
|
||||||
fs.close();
|
client.close();
|
||||||
cluster.shutdownDataNodes();
|
fs.close();
|
||||||
cluster.shutdown();
|
cluster.shutdownDataNodes();
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class TestAclConfigFlag {
|
||||||
IOUtils.cleanup(null, fs);
|
IOUtils.cleanup(null, fs);
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ public class TestAddBlock {
|
||||||
public void tearDown() {
|
public void tearDown() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ public class TestAddBlockRetry {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,8 +140,14 @@ public class TestAuditLogs {
|
||||||
@After
|
@After
|
||||||
public void teardownCluster() throws Exception {
|
public void teardownCluster() throws Exception {
|
||||||
util.cleanup(fs, "/srcdat");
|
util.cleanup(fs, "/srcdat");
|
||||||
fs.close();
|
if (fs != null) {
|
||||||
cluster.shutdown();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
|
}
|
||||||
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** test that allowed operation puts proper entry in audit log */
|
/** test that allowed operation puts proper entry in audit log */
|
||||||
|
|
|
@ -477,7 +477,9 @@ public class TestBackupNode {
|
||||||
assertTrue(e.getLocalizedMessage(), false);
|
assertTrue(e.getLocalizedMessage(), false);
|
||||||
} finally {
|
} finally {
|
||||||
fileSys.close();
|
fileSys.close();
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ public class TestBlockPlacementPolicyRackFaultTolerant {
|
||||||
public void teardown() {
|
public void teardown() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,6 +159,7 @@ public class TestCacheDirectives {
|
||||||
waitForCachedBlocks(namenode, 0, 0, "teardown");
|
waitForCachedBlocks(namenode, 0, 0, "teardown");
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
// Restore the original CacheManipulator
|
// Restore the original CacheManipulator
|
||||||
NativeIO.POSIX.setCacheManipulator(prevCacheManipulator);
|
NativeIO.POSIX.setCacheManipulator(prevCacheManipulator);
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class TestCommitBlockWithInvalidGenStamp {
|
||||||
public void tearDown() {
|
public void tearDown() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,10 @@ public class TestDeadDatanode {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void cleanup() {
|
public void cleanup() {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -71,6 +71,7 @@ public class TestDefaultBlockPlacementPolicy {
|
||||||
public void teardown() {
|
public void teardown() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ public class TestDiskspaceQuotaUpdate {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,9 +97,11 @@ public class TestEditLogAutoroll {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (fs != null) {
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
}
|
}
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,11 +70,14 @@ public class TestEditLogJournalFailures {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void shutDownMiniCluster() throws IOException {
|
public void shutDownMiniCluster() throws IOException {
|
||||||
if (fs != null)
|
if (fs != null) {
|
||||||
fs.close();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
|
}
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
try {
|
try {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
} catch (ExitException ee) {
|
} catch (ExitException ee) {
|
||||||
// Ignore ExitExceptions as the tests may result in the
|
// Ignore ExitExceptions as the tests may result in the
|
||||||
// NameNode doing an immediate shutdown.
|
// NameNode doing an immediate shutdown.
|
||||||
|
|
|
@ -109,6 +109,7 @@ public class TestFSDirectory {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,9 @@ public class TestFSImageWithAcl {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDown() {
|
public static void tearDown() {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testAcl(boolean persistNamespace) throws IOException {
|
private void testAcl(boolean persistNamespace) throws IOException {
|
||||||
|
|
|
@ -89,6 +89,7 @@ public class TestFSImageWithSnapshot {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,9 @@ public class TestFSImageWithXAttr {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDown() {
|
public static void tearDown() {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testXAttr(boolean persistNamespace) throws IOException {
|
private void testXAttr(boolean persistNamespace) throws IOException {
|
||||||
|
|
|
@ -109,8 +109,14 @@ public class TestFileTruncate {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws IOException {
|
public void tearDown() throws IOException {
|
||||||
if(fs != null) fs.close();
|
if(fs != null) {
|
||||||
if(cluster != null) cluster.shutdown();
|
fs.close();
|
||||||
|
fs = null;
|
||||||
|
}
|
||||||
|
if(cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -84,10 +84,12 @@ public class TestHDFSConcat {
|
||||||
public void shutDownCluster() throws IOException {
|
public void shutDownCluster() throws IOException {
|
||||||
if(dfs != null) {
|
if(dfs != null) {
|
||||||
dfs.close();
|
dfs.close();
|
||||||
|
dfs = null;
|
||||||
}
|
}
|
||||||
if(cluster != null) {
|
if(cluster != null) {
|
||||||
cluster.shutdownDataNodes();
|
cluster.shutdownDataNodes();
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,7 @@ public class TestINodeAttributeProvider {
|
||||||
CALLED.clear();
|
CALLED.clear();
|
||||||
if (miniDFS != null) {
|
if (miniDFS != null) {
|
||||||
miniDFS.shutdown();
|
miniDFS.shutdown();
|
||||||
|
miniDFS = null;
|
||||||
}
|
}
|
||||||
Assert.assertTrue(CALLED.contains("stop"));
|
Assert.assertTrue(CALLED.contains("stop"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class TestMalformedURLs {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class TestMetadataVersionOutput {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (dfsCluster != null) {
|
if (dfsCluster != null) {
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown();
|
||||||
|
dfsCluster = null;
|
||||||
}
|
}
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,7 @@ public class TestNameNodeMetadataConsistency {
|
||||||
public void cleanup() {
|
public void cleanup() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ public class TestNameNodeRetryCacheMetrics {
|
||||||
public void cleanup() throws IOException {
|
public void cleanup() throws IOException {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,10 @@ public class TestNameNodeRpcServerMethods {
|
||||||
*/
|
*/
|
||||||
@After
|
@After
|
||||||
public void cleanup() throws IOException {
|
public void cleanup() throws IOException {
|
||||||
if (cluster != null)
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -105,7 +105,10 @@ public class TestNamenodeRetryCache {
|
||||||
* @throws AccessControlException */
|
* @throws AccessControlException */
|
||||||
@After
|
@After
|
||||||
public void cleanup() throws IOException {
|
public void cleanup() throws IOException {
|
||||||
cluster.shutdown();
|
if (cluster != null) {
|
||||||
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set the current Server RPC call */
|
/** Set the current Server RPC call */
|
||||||
|
|
|
@ -74,6 +74,7 @@ public class TestQuotaByStorageType {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ public class TestXAttrConfigFlag {
|
||||||
IOUtils.cleanup(null, fs);
|
IOUtils.cleanup(null, fs);
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ public class TestBootstrapStandby {
|
||||||
public void shutdownCluster() {
|
public void shutdownCluster() {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,9 +79,11 @@ public class TestBootstrapStandbyWithQJM {
|
||||||
public void cleanup() throws IOException {
|
public void cleanup() throws IOException {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
if (jCluster != null) {
|
if (jCluster != null) {
|
||||||
jCluster.shutdown();
|
jCluster.shutdown();
|
||||||
|
jCluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,7 @@ public class TestDNFencing {
|
||||||
banner("Shutting down cluster. NN2 metadata:");
|
banner("Shutting down cluster. NN2 metadata:");
|
||||||
doMetasave(nn2);
|
doMetasave(nn2);
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ public class TestDelegationTokensWithHA {
|
||||||
public void shutdownCluster() throws IOException {
|
public void shutdownCluster() throws IOException {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
cluster = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue