From f22e332ddd6e4391110aed4e5d2583600ea37b36 Mon Sep 17 00:00:00 2001 From: Konstantin Boudnik Date: Fri, 23 Jul 2010 19:37:08 +0000 Subject: [PATCH] HADOOP-6875. [Herriot] Cleanup of temp. configurations is needed upon restart of a cluster. Contributed by Vinay Thota. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@967220 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ .../hadoop/test/system/AbstractDaemonCluster.java | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4d6f0dd5cef..2052f703f87 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1732,6 +1732,9 @@ Release 0.21.0 - Unreleased HADOOP-6790. Instrumented (Herriot) build uses too wide mask to include aspect files. (Konstantin Boudnik) + HADOOP-6875. [Herriot] Cleanup of temp. configurations is needed upon + restart of a cluster (Vinay Thota via cos) + Release 0.20.3 - Unreleased NEW FEATURES diff --git a/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java b/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java index c7d991af012..59362b24469 100644 --- a/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java +++ b/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java @@ -389,6 +389,17 @@ public void restart() throws waitForClusterToStop(); start(); waitForClusterToStart(); + cleanupNewConf(newConfDir); + } + + /** + * It uses to delete the new configuration folder. + * @param path - configuration directory path. + * @throws IOException if an I/O error occurs. + */ + public void cleanupNewConf(String path) throws IOException { + File file = new File(path); + file.delete(); } /**