[ 
https://issues.apache.org/jira/browse/HADOOP-14583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128133#comment-16128133
 ] 

Thomas Marquardt commented on HADOOP-14583:
-------------------------------------------

I usually make targeted fixes, like you have done, to avoid regressions.  
However, in this case I think it would be better to update retrieveMetadata and 
fix the race condition between the calls to exists() and downloadAttributes().  
The retrieveMetadata method already handles the case where the blob does not 
exist, so if you catch the exception from downloadAttributes and observe that 
NativeAzureFileSystemHelper.isFileNotFoundException is true, you can allow the 
code to resume from the point it would resume if exists() returns false.

If you still think the above is risky, the change you have looks good and fixes 
the issue with create().

> wasb throws an exception if you try to create a file and there's no parent 
> directory
> ------------------------------------------------------------------------------------
>
>                 Key: HADOOP-14583
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14583
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>    Affects Versions: 2.9.0
>            Reporter: Steve Loughran
>            Assignee: Esfandiar Manii
>            Priority: Minor
>         Attachments: HADOOP-14583-001.patch
>
>
> It's a known defect of the Hadoop FS API (and one we don't explicitly test 
> for enough), but you can create a file on a path which doesn't exist. In that 
> situation, the create() logic is expectd to create the entries.
> Wasb appears to raise an exception if you try to call {{create(filepath)}} 
> without calling {{mkdirs(filepath.getParent()}} first. That's the semantics 
> expected of {{createNonRecursive()}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to