BIGTOP-895. A number of testcases in TestCLI are failing with (at least) Hadoop 2.0.3 and later
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/b86134d2 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/b86134d2 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/b86134d2 Branch: refs/heads/master Commit: b86134d29607d511858d8a870607c87856249e18 Parents: 0f1525d Author: Anatoli Fomenko <[email protected]> Authored: Sun Apr 28 10:27:42 2013 -0700 Committer: Roman Shaposhnik <[email protected]> Committed: Sun Apr 28 18:48:47 2013 -0700 ---------------------------------------------------------------------- .../bigtop/itest/hadoop/hdfs/FSCmdExecutor.java | 2 +- .../apache/bigtop/itest/hadoop/hdfs/TestCLI.java | 8 +- .../hadoop/src/main/resources/clitest_data/data1k | 71 + .../main/resources/clitest_data/testHDFSConf.xml |12641 +++++++++++++++ 4 files changed, 12719 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/b86134d2/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/FSCmdExecutor.java ---------------------------------------------------------------------- diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/FSCmdExecutor.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/FSCmdExecutor.java index bb5adc4..0aba516 100644 --- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/FSCmdExecutor.java +++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/FSCmdExecutor.java @@ -51,7 +51,7 @@ public class FSCmdExecutor extends CommandExecutor { args[i] = args[i].replaceAll("CLITEST_DATA", new File(CLITestHelper.TEST_CACHE_DATA_DIR).toURI().toString().replace(' ', '+')); args[i] = args[i].replaceAll("TEST_DIR_ABSOLUTE", TestCLI.TEST_DIR_ABSOLUTE); - args[i] = args[i].replaceAll("USERNAME", System.getProperty("user.name")); + args[i] = args[i].replaceAll("USER_NAME", System.getProperty("user.name")); i++; } http://git-wip-us.apache.org/repos/asf/bigtop/blob/b86134d2/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java ---------------------------------------------------------------------- diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java index c39f029..7b02f08 100644 --- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java +++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java @@ -39,6 +39,7 @@ public class TestCLI extends CLITestHelper { public static final String TEST_DIR_ABSOLUTE = "/tmp/testcli"; private String nn; private String sug; + protected String namenode = null; @Before @Override @@ -51,6 +52,7 @@ public class TestCLI extends CLITestHelper { new File(TEST_CACHE_DATA_DIR).toURI().toString().replace(' ', '+'); nn = conf.get(CommonConfigurationKeys.FS_DEFAULT_NAME_KEY); sug = conf.get(DFSConfigKeys.DFS_PERMISSIONS_SUPERUSERGROUP_KEY); + namenode = conf.get(DFSConfigKeys.FS_DEFAULT_NAME_KEY, "file:///"); // Many of the tests expect a replication value of 1 in the output conf.setInt("dfs.replication", 1); } @@ -63,7 +65,7 @@ public class TestCLI extends CLITestHelper { @Override protected String getTestFile() { - return "testConf.xml"; + return "testHDFSConf.xml"; } @Test @@ -77,7 +79,9 @@ public class TestCLI extends CLITestHelper { String expCmd = super.expandCommand(cmd); String testcliDir = TEST_DIR_ABSOLUTE; expCmd = expCmd.replaceAll("TEST_DIR_ABSOLUTE", testcliDir); - expCmd = expCmd.replaceAll("SUPERGROUP", sug); + expCmd = expCmd.replaceAll("supergroup", sug); + expCmd = expCmd.replaceAll("NAMENODE", namenode); + expCmd = expCmd.replaceAll("USER_NAME", System.getProperty("user.name")); return expCmd; } http://git-wip-us.apache.org/repos/asf/bigtop/blob/b86134d2/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/data1k ---------------------------------------------------------------------- diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/data1k b/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/data1k new file mode 100644 index 0000000..5e2630c --- /dev/null +++ b/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/data1k @@ -0,0 +1,71 @@ +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234 +12345678901234
