[
https://issues.apache.org/jira/browse/HADOOP-12101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15179110#comment-15179110
]
Robert Kanter commented on HADOOP-12101:
----------------------------------------
A few more minor things:
# Use curly braces on this if statement in
{{extractDefaultVariablesFromConfigurationFields}}. I've found that not having
them, even for such simple things, are very error-prone, especially if someone
else needs to update this in the future.
{code:java}
+ if (fields==null)
+ return null;
{code}
# I'm not sure there's an advantage to declaring these ahead of the try block
in {{extractDefaultVariablesFromConfigurationFields}}.
{code:java}
+ boolean bValue;
+ float fValue;
+ short shValue;
+ int iValue;
+ long lValue;
+ String sValue;
{code}
# The try block in {{extractDefaultVariablesFromConfigurationFields }} doesn't
handle {{double}}. That doesn't seem to be a problem running the script now,
but {{Configuration}} does have a {{getDouble()}} method, so we should add it
to be on the safe side.
# Why put the script in {{dev-support/bin/}} instead of just {{dev-support/}}?
There's other scripts in {{dev-support/}} already so I don't think we need to
add a new {{bin/}} subdir.
> Add automatic search of default Configuration variables to
> TestConfigurationFieldsBase
> --------------------------------------------------------------------------------------
>
> Key: HADOOP-12101
> URL: https://issues.apache.org/jira/browse/HADOOP-12101
> Project: Hadoop Common
> Issue Type: Test
> Components: test
> Affects Versions: 2.7.0
> Reporter: Ray Chiang
> Assignee: Ray Chiang
> Labels: supportability
> Attachments: HADOOP-12101.001.patch, HADOOP-12101.002.patch,
> HADOOP-12101.003.patch, HADOOP-12101.004.patch, HADOOP-12101.005.patch,
> HADOOP-12101.006.patch, HADOOP-12101.007.patch, HADOOP-12101.008.patch
>
>
> Add functionality given a Configuration variable FOO, to at least check the
> xml file value against DEFAULT_FOO.
> Without waivers and a mapping for exceptions, this can probably never be a
> test method that generates actual errors.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)