[ 
https://issues.apache.org/jira/browse/HDFS-9438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018999#comment-15018999
 ] 

John Zhuge commented on HDFS-9438:
----------------------------------

{code: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 3da37f5..1cba792 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
@@ -429,6 +429,11 @@ 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".
     //
+    if (!Shell.LINUX && !Shell.SOLARIS) {
+        System.out.println("Unsupport OS. Skip HDFS-6694 Debug Data");
+        return;
+    }
+
     String[] scmd = new String[] {"/bin/sh", "-c", "ulimit -a"};
     ShellCommandExecutor sce = new ShellCommandExecutor(scmd);
     sce.execute();
@@ -441,7 +446,7 @@ public void testPipelineRecoveryStress() throws Exception {
     sce.execute();
     System.out.println("'hostname' output:\n" + sce.getOutput());
 
-    scmd = new String[] {"ifconfig"};
+    scmd = new String[] {"ifconfig -a"};
     sce = new ShellCommandExecutor(scmd);
     sce.execute();
     System.out.println("'ifconfig' output:\n" + sce.getOutput());
{code}

> TestPipelinesFailover assumes Linux ifconfig
> --------------------------------------------
>
>                 Key: HDFS-9438
>                 URL: https://issues.apache.org/jira/browse/HDFS-9438
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: test
>    Affects Versions: 2.7.1
>         Environment: Solaris
>            Reporter: Alan Burlison
>            Assignee: John Zhuge
>            Priority: Minor
>
> TestPipelinesFailover.java contains the following:
> {code}
>     scmd = new String[] {"ifconfig"};
>     sce = new ShellCommandExecutor(scmd);
>     sce.execute();
>     System.out.println("'ifconfig' output:\n" + sce.getOutput());
> {code}
> That assumes the Linux ifconfig command. If the flag "-a" is added, the same 
> invocation should work on both Linux and Solaris - the output is only 
> displayed for debugging purposes so the fact that the output of ifconfig is 
> different on Linux and Solaris shouldn't matter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to