Hadoop Common
  1. Hadoop Common
  2. HADOOP-9574

Add new methods in AbstractDelegationTokenSecretManager for restoring RMDelegationTokens on RMRestart

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0-beta
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      we're considering to add the following methods in AbstractDelegationTokenSecretManager for restoring RMDelegationTokens, these methods can also possibly be reused by hdfsDelegationTokenSecretManager, see YARN-638

      protected void storeNewMasterKey(DelegationKey key) throws IOException

      { return; }
      protected void removeStoredMasterKey(DelegationKey key) { return; }

      protected void storeNewToken(TokenIdent ident, long renewDate)

      { return; }
      protected void removeStoredToken(TokenIdent ident) throws IOException {

      }
      protected void updateStoredToken(TokenIdent ident, long renewDate) { return; }

      Also move addPersistedDelegationToken in hdfs.DelegationTokenSecretManager, to AbstractDelegationTokenSecretManager

      1. HADOOP-9574.fixtest.patch
        1 kB
        Jian He
      2. HADOOP-9574.2.patch
        12 kB
        Jian He
      3. HADOOP-9574.1.patch
        8 kB
        Jian He

        Issue Links

          Activity

          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12583877/HADOOP-9574.1.patch
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 1 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

          +1 contrib tests. The patch passed contrib unit tests.

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

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12583877/HADOOP-9574.1.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2551//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2551//console This message is automatically generated.
          Hide
          Jian He added a comment -

          This patch simply adds several empty methods in AbstractDelegationTokenSecretManager, and add them in corresponding places where create/remove tokens/keys occur.
          Also, implement hashCode and equals method in DelegationKey.
          And copy hdfsDelegationTokenSecretManager.addPersistedDelegationToken to AbstractDelegationTokenSecretManager

          Show
          Jian He added a comment - This patch simply adds several empty methods in AbstractDelegationTokenSecretManager, and add them in corresponding places where create/remove tokens/keys occur. Also, implement hashCode and equals method in DelegationKey. And copy hdfsDelegationTokenSecretManager.addPersistedDelegationToken to AbstractDelegationTokenSecretManager
          Hide
          Vinod Kumar Vavilapalli added a comment -

          Want to move forward with this for the sake of YARN-638.

          Mostly looks good to me. Can you add tests to make sure these new APIs are correctly called? You can modify TestDelegationTokenSecretManager.

          Also, a couple of simple tests for DelegationKey changes will be great.

          Show
          Vinod Kumar Vavilapalli added a comment - Want to move forward with this for the sake of YARN-638 . Mostly looks good to me. Can you add tests to make sure these new APIs are correctly called? You can modify TestDelegationTokenSecretManager. Also, a couple of simple tests for DelegationKey changes will be great.
          Hide
          Jian He added a comment -

          Add tests to ensure new APIs are called, and test for DelegationKey

          Show
          Jian He added a comment - Add tests to ensure new APIs are called, and test for DelegationKey
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12585265/HADOOP-9574.2.patch
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 1 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

          +1 contrib tests. The patch passed contrib unit tests.

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

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12585265/HADOOP-9574.2.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2577//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2577//console This message is automatically generated.
          Hide
          Vinod Kumar Vavilapalli added a comment -

          Looks good, +1. Checking this in.

          Show
          Vinod Kumar Vavilapalli added a comment - Looks good, +1. Checking this in.
          Hide
          Vinod Kumar Vavilapalli added a comment -

          Committed this to trunk and branch-2. Thanks Jian!

          Show
          Vinod Kumar Vavilapalli added a comment - Committed this to trunk and branch-2. Thanks Jian!
          Hide
          Hudson added a comment -

          Integrated in Hadoop-trunk-Commit #3804 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3804/)
          HADOOP-9574. Added new methods in AbstractDelegationTokenSecretManager for helping YARN ResourceManager to reuse code for RM restart. Contributed by Jian He. (Revision 1487692)

          Result = SUCCESS
          vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487692
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/DelegationKey.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java
          Show
          Hudson added a comment - Integrated in Hadoop-trunk-Commit #3804 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3804/ ) HADOOP-9574 . Added new methods in AbstractDelegationTokenSecretManager for helping YARN ResourceManager to reuse code for RM restart. Contributed by Jian He. (Revision 1487692) Result = SUCCESS vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487692 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/DelegationKey.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java
          Hide
          Jian He added a comment -

          TestDelegationToken.testRollMasterKey is possibly failing because of timing issue

          Show
          Jian He added a comment - TestDelegationToken.testRollMasterKey is possibly failing because of timing issue
          Hide
          Jian He added a comment -

          change the hard sleep to a while loop and attach a timeout

          Show
          Jian He added a comment - change the hard sleep to a while loop and attach a timeout
          Show
          Jian He added a comment - The jeckin link of the possible test failure https://issues.apache.org/jira/browse/MAPREDUCE-5261?focusedCommentId=13669981&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13669981
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12585356/HADOOP-9574.fixtest.patch
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 1 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

          +1 contrib tests. The patch passed contrib unit tests.

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

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12585356/HADOOP-9574.fixtest.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2585//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2585//console This message is automatically generated.
          Hide
          Vinod Kumar Vavilapalli added a comment -

          Tx for taking care of the test issue, Jian. I committed the test-fix too to trunk and branch-2. Closing this.

          Show
          Vinod Kumar Vavilapalli added a comment - Tx for taking care of the test issue, Jian. I committed the test-fix too to trunk and branch-2. Closing this.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-trunk-Commit #3809 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3809/)
          HADOOP-9574. Fix for timing issues in the original patch's test-case. (Revision 1487722)

          Result = SUCCESS
          vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487722
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java
          Show
          Hudson added a comment - Integrated in Hadoop-trunk-Commit #3809 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3809/ ) HADOOP-9574 . Fix for timing issues in the original patch's test-case. (Revision 1487722) Result = SUCCESS vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487722 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Yarn-trunk #225 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/225/)
          HADOOP-9574. Fix for timing issues in the original patch's test-case. (Revision 1487722)
          HADOOP-9574. Added new methods in AbstractDelegationTokenSecretManager for helping YARN ResourceManager to reuse code for RM restart. Contributed by Jian He. (Revision 1487692)

          Result = SUCCESS
          vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487722
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java

          vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487692
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/DelegationKey.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java
          Show
          Hudson added a comment - Integrated in Hadoop-Yarn-trunk #225 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/225/ ) HADOOP-9574 . Fix for timing issues in the original patch's test-case. (Revision 1487722) HADOOP-9574 . Added new methods in AbstractDelegationTokenSecretManager for helping YARN ResourceManager to reuse code for RM restart. Contributed by Jian He. (Revision 1487692) Result = SUCCESS vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487722 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487692 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/DelegationKey.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1415 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1415/)
          HADOOP-9574. Fix for timing issues in the original patch's test-case. (Revision 1487722)
          HADOOP-9574. Added new methods in AbstractDelegationTokenSecretManager for helping YARN ResourceManager to reuse code for RM restart. Contributed by Jian He. (Revision 1487692)

          Result = FAILURE
          vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487722
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java

          vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487692
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/DelegationKey.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1415 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1415/ ) HADOOP-9574 . Fix for timing issues in the original patch's test-case. (Revision 1487722) HADOOP-9574 . Added new methods in AbstractDelegationTokenSecretManager for helping YARN ResourceManager to reuse code for RM restart. Contributed by Jian He. (Revision 1487692) Result = FAILURE vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487722 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487692 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/DelegationKey.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1441 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1441/)
          HADOOP-9574. Fix for timing issues in the original patch's test-case. (Revision 1487722)
          HADOOP-9574. Added new methods in AbstractDelegationTokenSecretManager for helping YARN ResourceManager to reuse code for RM restart. Contributed by Jian He. (Revision 1487692)

          Result = SUCCESS
          vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487722
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java

          vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487692
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/DelegationKey.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1441 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1441/ ) HADOOP-9574 . Fix for timing issues in the original patch's test-case. (Revision 1487722) HADOOP-9574 . Added new methods in AbstractDelegationTokenSecretManager for helping YARN ResourceManager to reuse code for RM restart. Contributed by Jian He. (Revision 1487692) Result = SUCCESS vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487722 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1487692 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/DelegationKey.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java

            People

            • Assignee:
              Jian He
              Reporter:
              Jian He
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development