Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-1935 Security for timeline server
  3. YARN-2117

Close of Reader in TimelineAuthenticationFilterInitializer#initFilter() should be enclosed in finally block

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.0
    • Component/s: None
    • Labels:
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Here is related code:

              Reader reader = new FileReader(signatureSecretFile);
              int c = reader.read();
              while (c > -1) {
                secret.append((char) c);
                c = reader.read();
              }
              reader.close();
      

      If IOException is thrown out of reader.read(), reader would be left unclosed.

        Attachments

        1. YARN-2117-v2.patch
          2 kB
          Chen He
        2. YARN-2117.patch
          2 kB
          Chen He

          Activity

            People

            • Assignee:
              airbots Chen He
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: