Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-2936

YARNDelegationTokenIdentifier doesn't set proto.builder now

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.7.0
    • None
    • None
    • Reviewed

    Description

      After YARN-2743, the setters are removed from YARNDelegationTokenIdentifier, such that when constructing a object which extends YARNDelegationTokenIdentifier, proto.builder is not set at all. Later on, when we call getProto() of it, we will just get an empty proto object.

      It seems to do no harm to the production code path, as we will always call getBytes() before using proto to persist the DT in the state store, when we generating the password.

      I think the setter is removed to avoid duplicating setting the fields why getBytes() is called. However, YARNDelegationTokenIdentifier doesn't work properly alone. YARNDelegationTokenIdentifier is tightly coupled with the logic in secretManager. It's vulnerable if something is changed at secretManager. For example, in the test case of YARN-2837, I spent time to figure out we need to execute getBytes() first to make sure the testing DTs can be properly put into the state store.

      Attachments

        1. YARN-2936.006.patch
          5 kB
          Varun Saxena
        2. YARN-2936.005.patch
          5 kB
          Varun Saxena
        3. YARN-2936.004.patch
          5 kB
          Varun Saxena
        4. YARN-2936.003.patch
          4 kB
          Varun Saxena
        5. YARN-2936.002.patch
          2 kB
          Varun Saxena
        6. YARN-2936.001.patch
          11 kB
          Varun Saxena

        Activity

          People

            varun_saxena Varun Saxena
            zjshen Zhijie Shen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: