hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kengo Seki (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-7947) Validate XMLs if a relevant tool is available, when using scripts
Date Sat, 16 May 2015 23:55:00 GMT

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

Kengo Seki updated HADOOP-7947:
-------------------------------
    Attachment: HADOOP-7947.005.patch

[~ajithshetty], thank you for your comment!

bq. 1. According to the help, -conffile can accept a file or folder, but when we give neither,
its throwing stacktrace, its better we instead return a normal message like "Expected a File
or Folder". Just a suggestion

I agree with you. I'm attaching a new patch to fix it to catch this situation and displays
an error message like above. It also catches other cases (e.g. UnrecognizedOptionException)
and displays command usage.

bq. 2. conftest -conf behaviour is quite confusing when argument is missing, its printing
the help and also its validating the default folder, is this fine.?? i feel in this scenario
it should have printed the error with generic usage and return.

The help message is GenericOptionsParser's output, and it is difficult to suppress it when
no argument is specified for -conf option. Existing commands using GenericOptionsParser also
behave somewhat in a strange way e.g. displays error message twice (one is for GenericOptionsParser
and the other is for the command itself), if the argument of -conf option is omitted. I think
this problem is not so critical.

> Validate XMLs if a relevant tool is available, when using scripts
> -----------------------------------------------------------------
>
>                 Key: HADOOP-7947
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7947
>             Project: Hadoop Common
>          Issue Type: Wish
>          Components: scripts
>    Affects Versions: 2.7.0
>            Reporter: Harsh J
>            Assignee: Kengo Seki
>              Labels: BB2015-05-TBR, newbie
>         Attachments: HADOOP-7947.001.patch, HADOOP-7947.002.patch, HADOOP-7947.003.patch,
HADOOP-7947.004.patch, HADOOP-7947.005.patch
>
>
> Given that we are locked down to using only XML for configuration and most of the administrators
need to manage it by themselves (unless a tool that manages for you is used), it would be
good to also validate the provided config XML (*-site.xml) files with a tool like {{xmllint}}
or maybe Xerces somehow, when running a command or (at least) when starting up daemons.
> We should use this only if a relevant tool is available, and optionally be silent if
the env. requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message