Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Labels:
      None

      Description

      UGI executor in flume authentication module attempts relogin using UserGroupInformation's checkTGTAndReloginFromKeytab().
      Since this method is synchronized, it would be better to space out the relogin attempts

      1. FLUME-2642.patch
        1 kB
        Johny Rufus
      2. FLUME-2642-1.patch
        2 kB
        Johny Rufus
      3. FLUME-2642-2.patch
        2 kB
        Johny Rufus

        Activity

        Hide
        jrufus Johny Rufus added a comment -

        Attached patch, which spaces out the relogin attempts in UGIExecutor

        Show
        jrufus Johny Rufus added a comment - Attached patch, which spaces out the relogin attempts in UGIExecutor
        Hide
        hshreedharan Hari Shreedharan added a comment - - edited

        FYI, there is an edge case here – where multiple threads could read the lastReloginAttempt, which could be > 5 mins. Now all of them could end up calling checkTGT..So every 5 mins there is a possibility that many threads could try to enter the checkTGT.. method. It is fine (the code is still thread-safe), but it is worth noting in the comments.

        Show
        hshreedharan Hari Shreedharan added a comment - - edited FYI, there is an edge case here – where multiple threads could read the lastReloginAttempt , which could be > 5 mins. Now all of them could end up calling checkTGT..So every 5 mins there is a possibility that many threads could try to enter the checkTGT.. method. It is fine (the code is still thread-safe), but it is worth noting in the comments.
        Hide
        jrufus Johny Rufus added a comment -

        Thanks Hari, included comments in the patch

        Show
        jrufus Johny Rufus added a comment - Thanks Hari, included comments in the patch
        Hide
        hshreedharan Hari Shreedharan added a comment -

        The comment should say " > 5 minutes" not " < 5 minutes"

        Show
        hshreedharan Hari Shreedharan added a comment - The comment should say " > 5 minutes" not " < 5 minutes"
        Hide
        hshreedharan Hari Shreedharan added a comment -

        +1. Looks good, committing!

        Show
        hshreedharan Hari Shreedharan added a comment - +1. Looks good, committing!
        Hide
        hshreedharan Hari Shreedharan added a comment -

        Committed! Thanks Johny!

        Show
        hshreedharan Hari Shreedharan added a comment - Committed! Thanks Johny!
        Hide
        hudson Hudson added a comment -

        UNSTABLE: Integrated in flume-trunk #721 (See https://builds.apache.org/job/flume-trunk/721/)
        FLUME-2642. Limit the number of calls to UGI.checkTGTAndRelogin method. (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=39bc4da1ed286fa3690876dda741cadb35386d93)

        • flume-ng-auth/src/main/java/org/apache/flume/auth/UGIExecutor.java
        Show
        hudson Hudson added a comment - UNSTABLE: Integrated in flume-trunk #721 (See https://builds.apache.org/job/flume-trunk/721/ ) FLUME-2642 . Limit the number of calls to UGI.checkTGTAndRelogin method. (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=39bc4da1ed286fa3690876dda741cadb35386d93 ) flume-ng-auth/src/main/java/org/apache/flume/auth/UGIExecutor.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Flume-trunk-hbase-98 #78 (See https://builds.apache.org/job/Flume-trunk-hbase-98/78/)
        FLUME-2642. Limit the number of calls to UGI.checkTGTAndRelogin method. (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=39bc4da1ed286fa3690876dda741cadb35386d93)

        • flume-ng-auth/src/main/java/org/apache/flume/auth/UGIExecutor.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Flume-trunk-hbase-98 #78 (See https://builds.apache.org/job/Flume-trunk-hbase-98/78/ ) FLUME-2642 . Limit the number of calls to UGI.checkTGTAndRelogin method. (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=39bc4da1ed286fa3690876dda741cadb35386d93 ) flume-ng-auth/src/main/java/org/apache/flume/auth/UGIExecutor.java

          People

          • Assignee:
            jrufus Johny Rufus
            Reporter:
            jrufus Johny Rufus
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development