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

CryptoOutputStream throws IOException on flush() if stream is closed

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.3
    • 2.9.0, 3.0.0-alpha4, 2.8.2
    • None
    • None
    • 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

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

          People

            pierre.lacave Pierre Lacave Assign to me
            pierre.lacave Pierre Lacave
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment