[HUDI-4456] Clean up test resources (#6203)
This commit is contained in:
@@ -206,7 +206,7 @@ public class HoodieFlinkClientTestHarness extends HoodieCommonTestHarness implem
|
|||||||
protected void cleanupDFS() throws java.io.IOException {
|
protected void cleanupDFS() throws java.io.IOException {
|
||||||
if (hdfsTestService != null) {
|
if (hdfsTestService != null) {
|
||||||
hdfsTestService.stop();
|
hdfsTestService.stop();
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown(true, true);
|
||||||
hdfsTestService = null;
|
hdfsTestService = null;
|
||||||
dfsCluster = null;
|
dfsCluster = null;
|
||||||
dfs = null;
|
dfs = null;
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ public abstract class HoodieJavaClientTestHarness extends HoodieCommonTestHarnes
|
|||||||
protected void cleanupDFS() throws IOException {
|
protected void cleanupDFS() throws IOException {
|
||||||
if (hdfsTestService != null) {
|
if (hdfsTestService != null) {
|
||||||
hdfsTestService.stop();
|
hdfsTestService.stop();
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown(true, true);
|
||||||
hdfsTestService = null;
|
hdfsTestService = null;
|
||||||
dfsCluster = null;
|
dfsCluster = null;
|
||||||
dfs = null;
|
dfs = null;
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ public abstract class HoodieClientTestHarness extends HoodieCommonTestHarness im
|
|||||||
protected void cleanupDFS() throws IOException {
|
protected void cleanupDFS() throws IOException {
|
||||||
if (hdfsTestService != null) {
|
if (hdfsTestService != null) {
|
||||||
hdfsTestService.stop();
|
hdfsTestService.stop();
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown(true, true);
|
||||||
hdfsTestService = null;
|
hdfsTestService = null;
|
||||||
dfsCluster = null;
|
dfsCluster = null;
|
||||||
dfs = null;
|
dfs = null;
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public class HdfsTestService {
|
|||||||
public void stop() {
|
public void stop() {
|
||||||
LOG.info("HDFS Minicluster service being shut down.");
|
LOG.info("HDFS Minicluster service being shut down.");
|
||||||
if (miniDfsCluster != null) {
|
if (miniDfsCluster != null) {
|
||||||
miniDfsCluster.shutdown();
|
miniDfsCluster.shutdown(true, true);
|
||||||
}
|
}
|
||||||
miniDfsCluster = null;
|
miniDfsCluster = null;
|
||||||
hadoopConf = null;
|
hadoopConf = null;
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ public class MiniClusterUtil {
|
|||||||
|
|
||||||
public static void shutdown() {
|
public static void shutdown() {
|
||||||
if (dfsCluster != null) {
|
if (dfsCluster != null) {
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown(true, true);
|
||||||
}
|
}
|
||||||
if (zkServer != null) {
|
if (zkServer != null) {
|
||||||
zkServer.shutdown();
|
zkServer.shutdown(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class TestInputPathHandler {
|
|||||||
public static void cleanUp() throws Exception {
|
public static void cleanUp() throws Exception {
|
||||||
if (hdfsTestService != null) {
|
if (hdfsTestService != null) {
|
||||||
hdfsTestService.stop();
|
hdfsTestService.stop();
|
||||||
dfsCluster.shutdown();
|
dfsCluster.shutdown(true, true);
|
||||||
dfsCluster = null;
|
dfsCluster = null;
|
||||||
dfs = null;
|
dfs = null;
|
||||||
hdfsTestService = null;
|
hdfsTestService = null;
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ public class HiveTestUtil {
|
|||||||
hiveTestService.stop();
|
hiveTestService.stop();
|
||||||
}
|
}
|
||||||
if (zkServer != null) {
|
if (zkServer != null) {
|
||||||
zkServer.shutdown();
|
zkServer.shutdown(true);
|
||||||
}
|
}
|
||||||
fileSystem.close();
|
fileSystem.close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user