Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13641

Update UGI#spawnAutoRenewalThreadForUserCreds to reduce indentation

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: None
    • Labels:
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      From Kai Zheng's comment in HADOOP-13590:

      Could we return earlier at the beginning so we can avoid at least 2 level of indents and make the whole block more readable?

        /**Spawn a thread to do periodic renewals of kerberos credentials*/
        private void spawnAutoRenewalThreadForUserCreds() {
          if (isSecurityEnabled()) {
            //spawn thread only if we have kerb credentials
            if (user.getAuthenticationMethod() == AuthenticationMethod.KERBEROS &&
                !isKeytab) {
      ...
      ...
                                   very deep nested ...
      ...
      

        Attachments

        1. HADOOP-13641.1.patch
          4 kB
          Huafeng Wang
        2. HADOOP-13641.2.patch
          4 kB
          Huafeng Wang
        3. HADOOP-13641-branch-2.01.patch
          4 kB
          Huafeng Wang

          Activity

            People

            • Assignee:
              HuafengWang Huafeng Wang
              Reporter:
              xiaochen Xiao Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: