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

Remove duplicate close for LogWriter in AppLogAggregatorImpl#uploadLogsForContainers

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      Remove duplicate close for LogWriter in AppLogAggregatorImpl#uploadLogsForContainers
      writer.close() was called twice in uploadLogsForContainers. One is called at the middle of the function and the other one is called at finally block. It will be better to just close writer once. Also LogWriter didn't implement java.io.Closeable interface. So we can't suppose LogWriter.close is idempotent.

      Attachments

        1. YARN-4158.000.patch
          1 kB
          Zhihai Xu

        Activity

          People

            zxu Zhihai Xu
            zxu Zhihai Xu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: