[
https://issues.apache.org/jira/browse/HADOOP-12533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14984544#comment-14984544
]
Chris Nauroth commented on HADOOP-12533:
----------------------------------------
[~dchickabasapa], the {{close}} logic is only correct if the method is marked
{{synchronized}}. Otherwise, 2 threads could enter the {{close}} method, both
get past the check on the {{closed}} flag and then double-close the underlying
stream. There could also be a problem with a concurrent {{seek}}} getting past
the {{checkNotClosed}} check, but then finding that another thread ran
{{close}} before it could complete the method.
There is a strong encouragement that implementations of the JDK stream classes
should provide an idempotent {{close}} operation. Marking it {{synchronized}}
would help achieve that goal.
After {{close}} is marked {{synchronized}} and we get a fresh Jenkins
pre-commit run, I think the patch will be ready to commit. I'll wait a bit
before committing in case Steve has additional feedback.
> Introduce FileNotFoundException in WASB for read and seek API
> -------------------------------------------------------------
>
> Key: HADOOP-12533
> URL: https://issues.apache.org/jira/browse/HADOOP-12533
> Project: Hadoop Common
> Issue Type: Bug
> Components: tools
> Affects Versions: 2.8.0
> Reporter: Dushyanth
> Assignee: Dushyanth
> Fix For: 2.8.0
>
> Attachments: HADOOP-12533.001.patch, HADOOP-12533.002.patch,
> HADOOP-12533.003.patch, HADOOP-12533.004.patch
>
>
> Currently WASB throws a IOException in read and seek API for both Block and
> Page blobs for scenarios where the backing blobs do not exists. This creates
> problems for applications like HBase which expect a FileNotFoundException in
> these scenarios.
> The fix for the problem is to check if the exceptions from Azure storage is
> because for Blob not found and throw FileNotFound exception if that is the
> case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)