hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yi Liu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-11042) CryptoInputStream throwing wrong exception class on errors
Date Tue, 02 Sep 2014 07:47:21 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-11042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Yi Liu updated HADOOP-11042:
    Attachment: HADOOP-11042.001.patch

Thanks [~stevel@apache.org]. 
*1.* Now {{EOFException}} is thrown on out of bounds reads.
*2.* Add contract tests for {{CryptoInputStream}} and {{CryptoOutputStream}}

This idea of contract tests for crypto streams is: add _wrapInputStream_ and _wrapOutputStream_
in {{AbstractFSContract}} and Crypto contract will implement them.

> CryptoInputStream throwing wrong exception class on errors
> ----------------------------------------------------------
>                 Key: HADOOP-11042
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11042
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>            Reporter: Steve Loughran
>            Assignee: Yi Liu
>         Attachments: HADOOP-11042.001.patch
> Having had a quick look at the {{CryptoInputStream}} class, it's not in sync with all
the other filesystem's exception logic, as specified in {{src/site/markdown/filesystem/fsdatainputstream.md}}
> Operations MUST throw an {{IOException}} on out of bounds reads, ideally {{EOFException}}
> # {{read(byte[] b, int off, int len)}} 
> # {{seek(long pos) }}
> # {{seekToNewSource}}
> The tests you want to extend to verify expected behaviour are in {{AbstractContractOpenTest}}
and {{AbstractContractSeekTest}}
> also, the {{HasEnhancedByteBufferAccess}} implementations may want to think about using
{{checkStream()}} before acting on a potentially closed stream.

This message was sent by Atlassian JIRA

View raw message