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 "Karthik Kambatla (JIRA)" <ji...@apache.org> on 2012/10/06 05:56:02 UTC

[jira] [Created] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Karthik Kambatla created HADOOP-8895:
----------------------------------------

             Summary: TokenRenewer should be an interface, it is currently a fully abstract class
                 Key: HADOOP-8895
                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
             Project: Hadoop Common
          Issue Type: Bug
            Reporter: Karthik Kambatla
            Assignee: Karthik Kambatla
            Priority: Minor


TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472412#comment-13472412 ] 

Daryn Sharp commented on HADOOP-8895:
-------------------------------------

bq. For instance, if a WebHdfsFileSystem could implement TokenRenewer, we might not need DelegationTokenRenewer.Renewable.

Correct to the second half.  The {{DelegationTokenRenewer.Renewable}} interface only existed for the code being removed, so it too should be removed.

I actually intended for {{TokenRenewer}} to be implemented as an interface for classes implementing tokens.  This idea was rejected in favor of using lower level renewers that bypassed the token issuing class.  I believe part of the idea as a class is to force simple lightweight renewer objects since the service loader will instantiate all of them.

Also, the filesystems currently cannot directly implement {{TokenRenewer}} because the service loader instantiation won't be usable.  It will either need to instantiate another copy of itself or its lower level client with the token's address, or will need to initialize itself - but filesystems are not designed to be initialized multiple times.

This is why I think it's not needed.
                
> TokenRenewer should be an interface, it is currently a fully abstract class
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-8895
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.0.1-alpha
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Minor
>         Attachments: HADOOP-8895.patch
>
>
> TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Posted by "Karthik Kambatla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthik Kambatla updated HADOOP-8895:
-------------------------------------

    Attachment: HADOOP-8895.patch

Daryn,

Thanks for your input. 

Though it is not absolutely necessary for {{TokenRenewer}} to be an interface, I felt it would make things simpler when working on HDFS-4009.

For instance, if a {{WebHdfsFileSystem}} could implement {{TokenRenewer}}, we might not need  {{DelegationTokenRenewer.Renewable}}. Now that we are removing {{DelegationTokenRenewer}} completely - {{HADOOP-8891}} - it won't be immediately applicable. However, I was not sure why it should be an abstract class.

Do you think we should leave it as is? Is there an advantage of abstract class over interface?

I am uploading a patch with my proposed changes.
                
> TokenRenewer should be an interface, it is currently a fully abstract class
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-8895
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.0.1-alpha
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Minor
>         Attachments: HADOOP-8895.patch
>
>
> TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472404#comment-13472404 ] 

Tom White commented on HADOOP-8895:
-----------------------------------

Abstract classes are easier to evolve than interfaces, since you can add a method with a default implementation without breaking implementors. TokenRenewer is only for use internally so it doesn't matter so much, but I would still leave it as it is since it's always possible to create a new implementation class that extends the abstract class.
                
> TokenRenewer should be an interface, it is currently a fully abstract class
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-8895
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.0.1-alpha
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Minor
>         Attachments: HADOOP-8895.patch
>
>
> TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471995#comment-13471995 ] 

Hadoop QA commented on HADOOP-8895:
-----------------------------------

{color:green}+1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12548329/HADOOP-8895.patch
  against trunk revision .

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:green}+1 tests included{color}.  The patch appears to include 3 new or modified test files.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of javac compiler warnings.

    {color:green}+1 javadoc{color}.  The javadoc tool did not generate any warning messages.

    {color:green}+1 eclipse:eclipse{color}.  The patch built with eclipse:eclipse.

    {color:green}+1 findbugs{color}.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number of release audit warnings.

    {color:green}+1 core tests{color}.  The patch passed unit tests in hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager.

    {color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1578//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1578//console

This message is automatically generated.
                
> TokenRenewer should be an interface, it is currently a fully abstract class
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-8895
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.0.1-alpha
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Minor
>         Attachments: HADOOP-8895.patch
>
>
> TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Posted by "Karthik Kambatla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthik Kambatla updated HADOOP-8895:
-------------------------------------

    Resolution: Won't Fix
        Status: Resolved  (was: Patch Available)
    
> TokenRenewer should be an interface, it is currently a fully abstract class
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-8895
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.0.1-alpha
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Minor
>         Attachments: HADOOP-8895.patch
>
>
> TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Posted by "Karthik Kambatla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthik Kambatla updated HADOOP-8895:
-------------------------------------

    Affects Version/s: 2.0.1-alpha
    
> TokenRenewer should be an interface, it is currently a fully abstract class
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-8895
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.0.1-alpha
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Minor
>         Attachments: HADOOP-8895.patch
>
>
> TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Posted by "Karthik Kambatla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthik Kambatla updated HADOOP-8895:
-------------------------------------

    Status: Patch Available  (was: Open)
    
> TokenRenewer should be an interface, it is currently a fully abstract class
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-8895
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Minor
>         Attachments: HADOOP-8895.patch
>
>
> TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Posted by "Karthik Kambatla (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472615#comment-13472615 ] 

Karthik Kambatla commented on HADOOP-8895:
------------------------------------------

Fair enough. Thanks Tom and Daryn. I ll close this JIRA as won't fix. We can may be re-open should a need arise. Thanks again.
                
> TokenRenewer should be an interface, it is currently a fully abstract class
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-8895
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.0.1-alpha
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Minor
>         Attachments: HADOOP-8895.patch
>
>
> TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HADOOP-8895) TokenRenewer should be an interface, it is currently a fully abstract class

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471599#comment-13471599 ] 

Daryn Sharp commented on HADOOP-8895:
-------------------------------------

Just curious, do you have a specific case in mind where this would be useful?  Keep in mind that the service loader is going to instantiate the registered classes with their default ctor, which probably won't work well for heavier weight classes intended for other purposes.
                
> TokenRenewer should be an interface, it is currently a fully abstract class
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-8895
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8895
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Minor
>
> TokenRenewer is a fully abstract class. Making it an interface will allow classes extending other classes to implement the interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira