[ 
https://issues.apache.org/jira/browse/HADOOP-3151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vinod Kumar Vavilapalli updated HADOOP-3151:
--------------------------------------------

    Attachment: HADOOP-3151

Attaching patch.

bq. Just usage, and the suggested hod help message. Remove description.
Addressed.

{quote}
# checking the configuration file will not help, the advice is confusing
# checking the command line options is the obvious thing to do - the advise is 
unnecessary.
Should we just remove all the lines above and give the option that had a 
problem, assuming the user would know ?
{quote}
With hod trunk version, I don't see this suggestion thrown when specifying an 
invalid nodecount/clusterdir/script. But it is given while validation of any 
other configuration parameter fails, and I think it is useful. Will knock that 
off too if it is felt otherwise.

bq. +1 on saying 'Directory not found'. That's what Unix says.
Improved msgs w.r.t this kind of errors. Now one of the following error 
messages is shown depending on the situation.
 - Invalid cluster directory (--hod.clusterdir or -d) : <path to a non-existent 
dir> : No such directory
 - Invalid cluster directory (--hod.clusterdir or -d) : <path to a file> : Not 
a directory
 - (This is for info/deallocate) Invalid hod.clusterdir(--hod.clusterdir or 
-d). <path to an unallocated dir> : Not tied to any allocated cluster.
 - Invalid nodecount (--hod.nodecount or -n) : Must be >= 3. Given nodes: 1
 - Invalid script file (--hod.script or -s) : <path to a non-existent file> : 
No such file
 - Invalid script file (--hod.script or -s) : <path to a dir> : Not a file.
 - Invalid script file (--hod.script or -s) : <path to a non-executable file> : 
Not an executable.

Fixing the above also included fix for HADOOP-3277.

> Hod should have better error messages.
> --------------------------------------
>
>                 Key: HADOOP-3151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3151
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: contrib/hod
>            Reporter: Arkady Borkovsky
>             Fix For: 0.18.0
>
>         Attachments: HADOOP-3151
>
>
> (1)
> gsgw1037:/homes/arkady/CDSR> hod allocate -n 4 -d xx
> error: bin/hod failed to start.
> error: invalid 'clusterdir' specified in section hod (--hod.clusterdir): xx
> error: 1 problem found.
> Check your command line options and/or your configuration file 
> /grid/0/kryptonite/hod/conf/hodrc
>    * Directory 'xx' does not exist - the message shuold say "Non-existing 
> directory" (or "directory not found"), not "invalid"
>    * checking the configuration file will not help, the advice is confusing
>    * checking the command line options is the obvious thing to do -- the 
> advise is unnecessary.
> (2) when hod does not understand the command, it prints the whole help 
> options message -- which clobbers the screen and is confusing. It should give 
> a meaningful message -- and may say "type hod help for more info"

-- 
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