hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-4708) Add support for dfsadmin commands for test TestCLI unit test
Date Wed, 26 Nov 2008 22:07:44 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-4708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651159#action_12651159
] 

Chris Douglas commented on HADOOP-4708:
---------------------------------------

It would be nice if more of the CommandExecutor logic were part of the enumerated type, but
it's not necessary for this patch.

* For enums:
{noformat}
+    	  if(cmd.getType()==CommandType.ADMIN) {
+    		  CommandExecutor.executeDFSAdminCommand(cmd.getCmd(), namenode);
+    	  } else {
+    		  CommandExecutor.executeFSCommand(cmd.getCmd(), namenode);
+    	  }
{noformat}
This should probably be a switch stmt.
* This change is unnecessary:
{noformat}
@@ -107,8 +109,7 @@
     conf = new Configuration();
     cluster = new MiniDFSCluster(conf, 1, true, null);
     namenode = conf.get("fs.default.name", "file:///");
-    clitestDataDir = new File(TEST_CACHE_DATA_DIR).
-      toURI().toString().replace(' ', '+');
+    clitestDataDir = new File(TEST_CACHE_DATA_DIR).toURI().toString().replace(' ', '+');
     username = System.getProperty("user.name");
{noformat}
* TestCmd.type and TestCmd.cmd can be final
* Why getCmd instead of just toString()? 
* The cast to String is (still) unnecessary:
{noformat}
-              expandCommand((String) testCommands.get(j)) + "]");
+              expandCommand((String) testCommands.get(j).getCmd()) + "]");
{noformat}

> Add support for dfsadmin commands for test TestCLI unit test
> ------------------------------------------------------------
>
>                 Key: HADOOP-4708
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4708
>             Project: Hadoop Core
>          Issue Type: New Feature
>          Components: test
>            Reporter: Boris Shkolnik
>            Assignee: Boris Shkolnik
>             Fix For: 0.20.0
>
>         Attachments:  HADOOP-4708.patch
>
>
> Curretly TestCLI assumes dfs command when describing tests in testConf.xml
> we need to add ability to run dfsadmin commands too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message