You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by "Martin Bukatovic (JIRA)" <ji...@apache.org> on 2014/06/18 10:18:02 UTC

[jira] [Updated] (BIGTOP-1341) Cleanup of TestCLI code

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

Martin Bukatovic updated BIGTOP-1341:
-------------------------------------

    Attachment: BIGTOP-1341.1.patch

Proposed changes:

 * added javadocs to some methods make future changes easier
 * clean up usage of {{HdfsConfiguration()}} configuration object
 * minor syntax changes (wrapping follows bigtop code style)

*Details about configuration cleanup*

Current code uses:

{noformat}
nn = conf.get(CommonConfigurationKeys.FS_DEFAULT_NAME_KEY);
sug = conf.get(DFSConfigKeys.DFS_PERMISSIONS_SUPERUSERGROUP_KEY);
namenode = conf.get(DFSConfigKeys.FS_DEFAULT_NAME_KEY, "file:///");
{noformat}

Which is misleading, because both
{{CommonConfigurationKeys.FS_DEFAULT_NAME_KEY}} and
{{DFSConfigKeys.FS_DEFAULT_NAME_KEY}} are guaranteed to have the same value.
I checked Hadoop source: the configuration value is defined
in {{CommonConfigurationKeysPublic}} class and the other class just use value
from superclass (at least since HADOOP-7560 done in 2011).
So there is no need to have 2 different variables with the same value (and
meaning).

Also it's not needed to specify default value {{file:///}}, because it doesn't
make sense to use such default value for this test. Moreover this particular
value is hardcoded as Hadoop default.


> Cleanup of TestCLI code
> -----------------------
>
>                 Key: BIGTOP-1341
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1341
>             Project: Bigtop
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 0.8.0
>            Reporter: Martin Bukatovic
>         Attachments: BIGTOP-1341.1.patch
>
>
> Before we try to extend TestCLI to work on any hadoop filesystem, we need to clean up the current code a little.



--
This message was sent by Atlassian JIRA
(v6.2#6252)