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

Remove duplicate close for LogWriter in AppLogAggregatorImpl#uploadLogsForContainers

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment