hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11903) test-patch should fail any new classes called Default-foo
Date Tue, 07 Jul 2015 19:20:05 GMT

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

Andrew Wang commented on HADOOP-11903:
--------------------------------------

Okay, I don't understand the Flink usecase to make a judgement about how else to do it. You
could set up a .gitignore whitelist in lib to get those prompts, but I could see the precommit
check being nice too.

Regarding doing this with checkstyle, the reviewer can just ignore the checkstyle -1 if they
think it's spurious, as we're doing right now for Hadoop. Not that painful?

It seems like we agree thought that this is less useful for preventing classes named DefaultFoo,
but still useful for Flink-like usecases with general pattern matching. Shall we update the
JIRA summary and pursue the more general case?

Some review notes to that end:

* Need support for multiple regexes (I don't know what {{CLASSNAME_RE=$\{i#*=\}}} since I
couldn't google it, does but it doesn't look like a set)
* Lots of things specific to java and classnames which would need to be updated
* Similar to above, let's not provide a default pattern, but would be good to document some
ideas for example patterns.
* Should this be unit tested? Is that a thing in Yetus?

> test-patch should fail any new classes called Default-foo
> ---------------------------------------------------------
>
>                 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
>
>
> 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)

Mime
View raw message