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

Update UGI#spawnAutoRenewalThreadForUserCreds to reduce indentation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha2
    • None
    • Reviewed

    Description

      From drankye'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

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

            Dates

              Created:
              Updated:
              Resolved: