Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14346

CryptoOutputStream throws IOException on flush() if stream is closed

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.3
    • Fix Version/s: 2.9.0, 3.0.0-alpha4, 2.8.2
    • Component/s: None
    • Labels:
      None
    • Flags:
      Patch

      Description

      With Druid and Hadoop 2.7.3 I see that calls to flush() on a closed CryptoOutputStream throws IOException.

      Although flushing closed stream is dodgy, the culprit is actually CryptoOutputStream, according to the java documentation it look actually authorised.

      The OutputStream java doc (http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html#flush()) shows that flush should behave like close(), which allows being called on a closed stream without exception (as opposed to write() and others which clearly says should throw an exception)

        Attachments

          Activity

            People

            • Assignee:
              pierre.lacave Pierre Lacave
              Reporter:
              pierre.lacave Pierre Lacave
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: