HDFS-6694. TestPipelinesFailover.testPipelineRecoveryStress tests fail intermittently with various symptoms - debugging patch (Contributed by Yongjun Zhang)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c5d9a4a9 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c5d9a4a9 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c5d9a4a9 Branch: refs/heads/HDFS-6584 Commit: c5d9a4a91e4e0faae3a8530408da35b591396060 Parents: 812bd0c Author: arp <[email protected]> Authored: Wed Aug 27 09:52:33 2014 -0700 Committer: arp <[email protected]> Committed: Wed Aug 27 09:52:33 2014 -0700 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 4 +++ .../namenode/ha/TestPipelinesFailover.java | 28 ++++++++++++++++++++ 2 files changed, 32 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/c5d9a4a9/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 4e60c46..fb3906a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -348,6 +348,10 @@ Trunk (Unreleased) HDFS-6905. fs-encryption merge triggered release audit failures. (clamb via tucu) + HDFS-6694. TestPipelinesFailover.testPipelineRecoveryStress tests fail + intermittently with various symptoms - debugging patch. (Yongjun Zhang via + Arpit Agarwal) + Release 2.6.0 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/c5d9a4a9/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestPipelinesFailover.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestPipelinesFailover.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestPipelinesFailover.java index bba3dbb..08c6525 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestPipelinesFailover.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestPipelinesFailover.java @@ -58,6 +58,7 @@ import org.apache.hadoop.test.GenericTestUtils; import org.apache.hadoop.test.GenericTestUtils.DelayAnswer; import org.apache.hadoop.test.MultithreadedTestUtil.RepeatingTestThread; import org.apache.hadoop.test.MultithreadedTestUtil.TestContext; +import org.apache.hadoop.util.Shell.ShellCommandExecutor; import org.apache.log4j.Level; import org.junit.Test; import org.mockito.Mockito; @@ -420,6 +421,33 @@ public class TestPipelinesFailover { */ @Test(timeout=STRESS_RUNTIME*3) public void testPipelineRecoveryStress() throws Exception { + + // The following section of code is to help debug HDFS-6694 about + // this test that fails from time to time due to "too many open files". + // + String[] scmd = new String[] {"/bin/sh", "-c", "ulimit -a"}; + ShellCommandExecutor sce = new ShellCommandExecutor(scmd); + sce.execute(); + + System.out.println("HDFS-6694 Debug Data BEGIN==="); + System.out.println("'ulimit -a' output:\n" + sce.getOutput()); + + scmd = new String[] {"hostname"}; + sce = new ShellCommandExecutor(scmd); + sce.execute(); + System.out.println("'hostname' output:\n" + sce.getOutput()); + + scmd = new String[] {"ifconfig"}; + sce = new ShellCommandExecutor(scmd); + sce.execute(); + System.out.println("'ifconfig' output:\n" + sce.getOutput()); + + scmd = new String[] {"whoami"}; + sce = new ShellCommandExecutor(scmd); + sce.execute(); + System.out.println("'whoami' output:\n" + sce.getOutput()); + System.out.println("===HDFS-6694 Debug Data END"); + HAStressTestHarness harness = new HAStressTestHarness(); // Disable permissions so that another user can recover the lease. harness.conf.setBoolean(
