From 90612f6423098b0fd5007849590852901280e4bb Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Sat, 27 Apr 2013 14:29:41 +0000 Subject: [PATCH] HDFS-4748. MiniJournalCluster#restartJournalNode leaks resources, which causes sporadic test failures. Contributed by Chris Nauroth. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1476587 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/qjournal/MiniJournalCluster.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 91434890e5..67afcd7606 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -588,6 +588,9 @@ Release 2.0.5-beta - UNRELEASED HDFS-4768. File handle leak in datanode when a block pool is removed. (Chris Nauroth via suresh) + HDFS-4748. MiniJournalCluster#restartJournalNode leaks resources, which + causes sporadic test failures. (Chris Nauroth via suresh) + Release 2.0.4-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniJournalCluster.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniJournalCluster.java index 840f4939ae..ee1c320a7c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniJournalCluster.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniJournalCluster.java @@ -178,9 +178,9 @@ public class MiniJournalCluster { conf.set(DFSConfigKeys.DFS_JOURNALNODE_HTTP_ADDRESS_KEY, "127.0.0.1:" + httpAddrs[i].getPort()); - JournalNode jn = new JournalNode(); - jn.setConf(conf); - jn.start(); + nodes[i] = new JournalNode(); + nodes[i].setConf(conf); + nodes[i].start(); } public int getQuorumSize() {