You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Chris Nauroth (JIRA)" <ji...@apache.org> on 2016/01/08 21:15:39 UTC

[jira] [Commented] (HADOOP-12551) Introduce FileNotFoundException for WASB FileSystem API

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

Chris Nauroth commented on HADOOP-12551:
----------------------------------------

[~dchickabasapa], thank you for the patch.  This looks good overall.  Just 2 comments:

# I think there are going to be some warnings on code style, such as lines that are not less than 80 characters.  Clicking Submit Patch for a pre-commit run would reveal the specifics.
# The multi-threaded tests do this:
{code}
    // Setting the value to 1000. This is to ensure that
    // delete thread would get a chance to run at some point
    // and would be able to delete the test file.
    int maxCount = 1000;
    int runCount = 1;
    while (runCount < maxCount) {
      inputStream = fs.open(testPath);
      inputStream.close();
    }
  }
{code}
Potentially a more reliable way to do this is:
{code}
    while (t.isAlive()) {
      inputStream = fs.open(testPath);
      inputStream.close();
    }
    inputStream = fs.open(testPath);
    inputStream.close();
{code}
...where {{t}} refers to the {{DeleteThread}} instance.  This would keep trying until the thread runs to completion.  The extra {{open}} outside the loop is for the edge case that the loop body doesn't get a chance to execute after the thread completes the delete.  The extra {{open}} would throw the {{FileNotFoundException}} in that case.

> Introduce FileNotFoundException for WASB FileSystem API
> -------------------------------------------------------
>
>                 Key: HADOOP-12551
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12551
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: tools
>    Affects Versions: 2.7.1
>            Reporter: Dushyanth
>            Assignee: Dushyanth
>         Attachments: HADOOP-12551.001.patch
>
>
> HADOOP-12533 introduced FileNotFoundException to the read and seek API for WASB. The open and getFileStatus api currently throws FileNotFoundException correctly when the file does not exists when the API is called but does not throw the same exception if there is another thread/process deletes the file during its execution. This Jira fixes that behavior.
> This jira also re-examines other Azure storage store calls to check for BlobNotFoundException in setPermission(), setOwner, rename(), delete(), open(), listStatus() APIs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)