[ 
https://issues.apache.org/jira/browse/MAPREDUCE-1713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865387#action_12865387
 ] 

Konstantin Boudnik commented on MAPREDUCE-1713:
-----------------------------------------------

- Looking almost good. However, {{AbstractDaemonCluster.java}} should import 
MRCluster class. It's a wrong dependency. 

- Is it possible that {{chkDaemonStart.get(ind)}} returns null and then calling 
{{join()}} on it will produce NPE?

- why {{clusterManager}} is used in some places and isn't in others (on more 
than one occasion)? 
{noformat}
+      clusterManager.stop(newConfDir);
+    } else {
+      stop();
{noformat}

- reduce the level of logging for daemon thread helper classes. E.g.
{noformat}
+          LOG.info("Waiting for Daemon " + daemon.getHostName() 
+              + " to stop.....");      
{noformat}
will be clogging the log files with pretty much useless information. Use debug 
instead, Another info message might be added before {{while}} loop; warning 
message needs to be added if wait was unsuccessful.
Same makes sense for daemon start threads, I guess.

- shorter form of {{for}} loop can be used perhaps for 
{{waitForClusterToStop()}} and {{waitForClusterToStart()}}. Instead of 
{noformat}
+    for (int ind = 0; ind < chkDaemonStart.size(); ind++){
+      try {
+        chkDaemonStart.get(ind).join();
+      }catch(InterruptedException intExp) {
+      }
+    }
{noformat}
{noformat}
+    for (AbstractDaemonClient daemonThread : chkDaemonStart){
+      try {
+        daemonThread.join();
+      }catch(InterruptedException intExp) {
+      }
+    }
{noformat}

- missing descriptions in 
{{+   * @throws IOException}}

- incorrect JavaDocs
{noformat}
+   * @param cluster daemon cluster instance
+   * @param props config attributes
+   * @throws IOException
+   */
+  public void restartClusterWithNewConfig(Hashtable<String,Long> props, 
+      String configFile) throws IOException {
{noformat}

- more of the same
{noformat}
+   * @param taskInfo task information
+   * @param wovenClient jobtracker protocol
+   * @return true if task is running.
+   * @throws IOException
+   */
+  public boolean isTaskStarted(TaskInfo taskInfo) throws IOException { 
{noformat}

- and more 
{noformat}
+  /**
+   * It uses to check whether job is started or not.
+   * @param jInfo job information
+   * @param wovenClient jobtracker protocol
+   * @return true if job is running.
+   * @throws IOException
+   */
+  public boolean isJobStarted(JobID id) throws IOException {
{noformat}

> Utilities for system tests specific.
> ------------------------------------
>
>                 Key: MAPREDUCE-1713
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1713
>             Project: Hadoop Map/Reduce
>          Issue Type: Task
>          Components: test
>            Reporter: Vinay Kumar Thota
>            Assignee: Vinay Kumar Thota
>         Attachments: 1713-ydist-security.patch, 1713-ydist-security.patch, 
> systemtestutils_MR1713.patch, utilsforsystemtest_1713.patch
>
>
> 1.  A method for restarting  the daemon with new configuration.
>       public static  void restartCluster(Hashtable<String,Long> props, String 
> confFile) throws Exception;
> 2.  A method for resetting the daemon with default configuration.
>       public void resetCluster() throws Exception;
> 3.  A method for waiting until daemon to stop.
>       public  void waitForClusterToStop() throws Exception;
> 4.  A method for waiting until daemon to start.
>       public  void waitForClusterToStart() throws Exception;
> 5.  A method for checking the job whether it has started or not.
>       public boolean isJobStarted(JobID id) throws IOException;
> 6.  A method for checking the task whether it has started or not.
>       public boolean isTaskStarted(TaskInfo taskInfo) throws IOException;

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

Reply via email to