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

Thomas Graves commented on HADOOP-10506:
----------------------------------------

Also to clarify,  I do understand that the limitedprivate was probably added 
for historical reasons (the api's weren't properly categorized before) so 
components used them.  We have made great improvements to get them categorized 
for the official 2.2 release and we couldn't get everything fixed up due to 
timing.

So perhaps the title of the jira isn't correct and should be updated.  
Personally I think the following should be done:

1) clarify documentation what limitedPrivate is. This means us internally 
agreeing on what it really means. 
2) No new classes/interfaces should use this tag. They should be properly 
classified as either public or private. If there was a bug and class not 
properly tagged its fine to use there.
3) All existing classes with this tag should be eventually be deprecated and we 
should work towards that.  I realize this isn't going to happen immediately as 
everyone has to balance this with features and other bug fixes.

If one component is using the interface more then likely its useful for other 
components and more then likely other components are already using it.   Thus 
in my opinion the documentation of listing the component its private to isn't 
very useful. 

The longer we wait with this the more applications (in the case of yarn) and 
components will use these api's and it will be harder to change them.  Yes we 
can say it was marked a certain way and the other components shouldn't have 
used it but when its ambiguous like this and we don't provide an equivalent 
Public api I don't see how we can defend that.  Also as more and more 
components are created it gets harder and harder to upgrade/deploy them all at 
once.  Hence why all the push for HA and rolling upgrades. Customers don't want 
downtime.

I do agree we need to have the option for moving forward.  But I think this can 
be done with a proper set of Public apis.

The reason I ran into this was because I am writing an application to run on 
yarn and also another one to just read HDFS files.  Its almost impossible (if 
not impossible) to do that properly (with security) without using classes 
marked LimitedPrivate right now.  If it is possible it would require copying 
lots of code. We should be making writing applications as easy as possible.

> LimitedPrivate annotation not useful
> ------------------------------------
>
>                 Key: HADOOP-10506
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10506
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 2.4.0
>            Reporter: Thomas Graves
>
> The LimitedPrivate annotation isn't useful.  The intention seems to have been 
> those interfaces were only intended to be used by these components.  But in 
> many cases those components are separate from core hadoop.  This means any 
> changes to them will break backwards compatibility with those, which breaks 
> the new compatibility rules in Hadoop.  
> Note that many of the annotation are also not marked properly, or have fallen 
> out of date.  I see Public Interfaces that use LimitedPrivate classes in the 
> api.  (TokenCache using Credentials is an example). 



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

Reply via email to