HDFS-9438. TestPipelinesFailover assumes Linux ifconfig. (John Zhuge via Yongjun Zhang)

This commit is contained in:
Yongjun Zhang 2015-11-25 07:40:16 -08:00
parent 177975e962
commit 8176ea7dc6
2 changed files with 22 additions and 18 deletions

View File

@ -1684,6 +1684,9 @@ Release 2.8.0 - UNRELEASED
HDFS-8807. dfs.datanode.data.dir does not handle spaces between
storageType and URI correctly. (Anu Engineer via szetszwo)
HDFS-9438. TestPipelinesFailover assumes Linux ifconfig.
(John Zhuge via Yongjun Zhang)
OPTIMIZATIONS
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

View File

@ -56,6 +56,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;
import org.apache.hadoop.util.Shell.ShellCommandExecutor;
import org.apache.log4j.Level;
import org.junit.Test;
@ -429,28 +430,28 @@ public class TestPipelinesFailover {
// 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());
// Only collect debug data on these OSes.
if (Shell.LINUX || Shell.SOLARIS || Shell.MAC) {
System.out.println("HDFS-6694 Debug Data BEGIN===");
String[] scmd = new String[] {"/bin/sh", "-c", "ulimit -a"};
ShellCommandExecutor sce = new ShellCommandExecutor(scmd);
sce.execute();
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[] {"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[] {"ifconfig", "-a"};
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");
System.out.println("===HDFS-6694 Debug Data END");
}
HAStressTestHarness harness = new HAStressTestHarness();
// Disable permissions so that another user can recover the lease.