You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2015/07/10 17:12:05 UTC

[jira] [Comment Edited] (HADOOP-11903) test-patch plugin for checking file name conventions

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

Allen Wittenauer edited comment on HADOOP-11903 at 7/10/15 3:11 PM:
--------------------------------------------------------------------

Some minor nits:


* in the future, we'll likely pull in something similar to the code I wrote in HADOOP-10979 to do usage.  So I think we'd be better off writing a doc on how to use the plugin than having an extremely large usage message.  

* This should probably be a debug message:

{code}
+    echo "Filepath validation is disabled because \${FILEPATH_RULE} is empty."
{code}

* I'd like to get away from using $\{PATCH_BRANCH\} in filenames and just using 'branch'.  This makes the log files much more predictable in case someone wants to write a different reporting plugin.  (I've started to slowly phase it out.  I don't think there are many left.)

{code}
echo "${i}" >> "${PATCH_DIR}/${PATCH_BRANCH}-filepath.txt"
{code}





was (Author: aw):
Some minor nits:


* in the future, we'll likely pull in something similar to the code I wrote in HADOOP-10979 to do usage.  So I think we'd be better off writing a doc on how to use the plugin than having an extremely large usage message.  

*This should probably be a debug message:
{code}
+    echo "Filepath validation is disabled because \${FILEPATH_RULE} is empty."
{code}

*I'd like to get away from using ${PATCH_BRANCH} in filenames and just using 'branch'.  This makes the log files much more predictable in case someone wants to write a different reporting plugin.  (I've started to slowly phase it out.  I don't think there are many left.)
{code}
echo "${i}" >> "${PATCH_DIR}/${PATCH_BRANCH}-filepath.txt"
{code}




> test-patch plugin for checking file name conventions
> ----------------------------------------------------
>
>                 Key: HADOOP-11903
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11903
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: yetus
>    Affects Versions: HADOOP-12111
>            Reporter: Allen Wittenauer
>            Assignee: Kengo Seki
>         Attachments: HADOOP-11903.HADOOP-12111.00.patch, HADOOP-11903.HADOOP-12111.01.patch, HADOOP-11903.HADOOP-12111.02.patch
>
>
> Providing yetus with the functionality to detect newly added files which doesn't follow the naming conventions. As for java, it also can be used for checking classnames. In the past, we've named things like DefaultResourceCalculator, DefaultContainerExecutor, and DefaultCodec that do nothing but cause problems down the road since they are effectively version and functionality locked forever.  If these examples had been named what they truly were (e.g., MemoryResourceCalculator, SimpleContainerExecutor, and GZipCodec), the defaults could then be changed in the future in a compatible way. One way to enforce this is to prevent the creation of new classes called Default-anything. 



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