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

Steve Loughran commented on HADOOP-14582:
-----------------------------------------

Example
{code}
        at 
org.apache.hadoop.fs.azure.integration.ITestAzureHugeFiles.setup(ITestAzureHugeFiles.java:90)

test_100_renameHugeFile(org.apache.hadoop.fs.azure.integration.ITestAzureHugeFiles)
  Time elapsed: 0.194 sec  <<< ERROR!
org.apache.hadoop.fs.azure.AzureException: 
com.microsoft.azure.storage.StorageException: The specified blob does not exist.
        at 
com.microsoft.azure.storage.StorageException.translateFromHttpStatus(StorageException.java:175)
        at 
com.microsoft.azure.storage.StorageException.translateException(StorageException.java:94)
        at 
com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305)
        at 
com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:175)
        at 
com.microsoft.azure.storage.blob.CloudBlob.downloadAttributes(CloudBlob.java:1197)
        at 
org.apache.hadoop.fs.azure.StorageInterfaceImpl$CloudBlobWrapperImpl.downloadAttributes(StorageInterfaceImpl.java:321)
        at 
org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.retrieveMetadata(AzureNativeFileSystemStore.java:1973)
        at 
org.apache.hadoop.fs.azure.NativeAzureFileSystem.mkdirs(NativeAzureFileSystem.java:2491)
        at 
org.apache.hadoop.fs.azure.NativeAzureFileSystem.mkdirs(NativeAzureFileSystem.java:2455)
        at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:2230)
        at 
org.apache.hadoop.fs.contract.AbstractFSContractTestBase.mkdirs(AbstractFSContractTestBase.java:338)
        at 
org.apache.hadoop.fs.contract.AbstractFSContractTestBase.setup(AbstractFSContractTestBase.java:193)
        at 
org.apache.hadoop.fs.azure.integration.AbstractAzureIntegrationTest.setup(AbstractAzureIntegrationTest.java:66)
        at 
org.apache.hadoop.fs.azure.integration.AbstractAzureScaleTest.setup(AbstractAzureScaleTest.java:44)
        at 
org.apache.hadoop.fs.azure.integration.ITestAzureHugeFiles.setup(ITestAzureHugeFiles.java:90)
{code}

This should be a FileNotFoundException and the to include the blob in question, 
as well as the operation.

> WASB exception handling to translate specific failures into specific 
> exceptions
> -------------------------------------------------------------------------------
>
>                 Key: HADOOP-14582
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14582
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>    Affects Versions: 2.8.1
>            Reporter: Steve Loughran
>
> Mucht of the exception handling logic in WASB is a catch-and-wrap-as-IOE 
> handler. 
> {code}
>     } catch (Exception e) {
>       // Re-throw the exception as an Azure storage exception.
>       throw new AzureException(e);
>     }
> {code}
> This works, but
> #  it doesn't offer much in the way of diagnostics
> # There's no way to make sense of the failure
> # It catches and wraps IOEs, which don't need wrapping
> # It can double wrap IOEs around storage exceptions. Example 
> {{PageBlobInputStream}} constructor wraps StorageException with IOE; if 
> raised in {{AzureNativeFileSystemStore.retrieve()}} it will be caught and 
> wrapped again.
> Proposed: something akin to where S3A's translateException is going: 
> * take an incoming StorageException and based on its errorcode, choose 
> whether or not to wrap in a specific java exception (FNFE, access denied, 
> ...).
> * {{AzureException}} to make it easy to get at the details
> * Include operation & path in error text



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to