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

Container launching code suppresses close exceptions after writes

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      There are a number of places in code related to container launching where the following pattern is used:

        try {
          ...write to stream outStream...
        } finally {
          IOUtils.cleanupWithLogger(LOG, outStream);
        }
      

      Unfortunately this suppresses any IOException that occurs during the close() method on outStream. If the stream is buffered or could otherwise fail to finish writing the file when trying to close then this can lead to partial/corrupted data without throwing an I/O error.

      Attachments

        1. YARN-7595.001.patch
          10 kB
          Jim Brennan
        2. YARN-7595.002.patch
          10 kB
          Jim Brennan
        3. YARN-7595.003.patch
          11 kB
          Jim Brennan
        4. YARN-7595-branch-2.001.patch
          7 kB
          Jim Brennan
        5. YARN-7595-branch-2.8.001.patch
          8 kB
          Jim Brennan
        6. YARN-7595-branch-2.8.002.patch
          8 kB
          Jim Brennan

        Activity

          People

            jbrennan Jim Brennan
            jlowe Jason Darrell Lowe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: