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

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.5.0
    • None
    • 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.patch
          2 kB
          Chen He
        2. YARN-2117-v2.patch
          2 kB
          Chen He

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: