hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "XieXianshan (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-2944) Improve checking of input for Api displayTasks()
Date Wed, 28 Dec 2011 10:43:30 GMT

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

XieXianshan commented on MAPREDUCE-2944:
----------------------------------------

Hi,Harsh,Thanks so much for your patience and your suggestions.
I agree with you almost all of what you say except one little point: 
bq.an else clause to the state check there will cover the states validation.
 
There's a logical AND operation in the if clause in the CLI's displayTasks():
{code}
if ((state.equals("pending") && status ==TIPStatus.PENDING) ||
          (state.equals("running") && status ==TIPStatus.RUNNING) ||
          (state.equals("completed") && status == TIPStatus.COMPLETE) ||
          (state.equals("failed") && status == TIPStatus.FAILED) ||
          (state.equals("killed") && status == TIPStatus.KILLED)) {
        printTaskAttempts(report);
      }
{code} 
So,we can't add validation of states in the else clause (eg. if-clause would also be FALSE
if status != TIPStatus.PENDING, even though the state is equal to "pending").
Maybe i misunderstood your meaning.

                
> Improve checking of input for Api displayTasks() 
> -------------------------------------------------
>
>                 Key: MAPREDUCE-2944
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2944
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.24.0
>            Reporter: XieXianshan
>            Assignee: XieXianshan
>            Priority: Trivial
>             Fix For: 0.24.0
>
>         Attachments: MAPREDUCE-2944.patch, MAPREDUCE-2944_v0.2.patch, MAPREDUCE-2944_v0.3.patch
>
>
> The JobClient.displayTasks() will do nothing and won't throw any exception either, 
> while user call it with invalid type/state of task.
> To be more friendly,it's better to remain user to check his parameters with an exception.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message