[
https://issues.apache.org/jira/browse/HADOOP-14346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986377#comment-15986377
]
Steve Loughran commented on HADOOP-14346:
-----------------------------------------
Actually, I'm thinking of applying it
# there's ambiguity in what things are meant to do
# if it works on non-crypto streams, it's clear that normal codepath ignores
the operation when closed
# which means it's a visible change in behaviour
We hit a similar issue with thread safety: java.io says "no thread safety",
HDFS had it, HBase relied on it, so this class follows the HDFS rules
(HADOOP-11710). This is similar
> CryptoOutputStream throws IOException if stream is closed which is not the
> standard OutputStream behaviour
> -----------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-14346
> URL: https://issues.apache.org/jira/browse/HADOOP-14346
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 2.7.3
> Reporter: Pierre Lacave
> Attachments: CryptoOutputStream.flush-no-throw-on-closed.patch,
> HADOOP-14346-1.patch
>
>
> 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)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]