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

Steve Loughran commented on HADOOP-15713:
-----------------------------------------

As well as checking for result=200 (or a specific error code?), the assert 
should add a message on that assertion failure (always)
{code}
[ERROR] testCheckBlockMd5(org.apache.hadoop.fs.azure.ITestBlobDataValidation)  
Time elapsed: 1.716 s  <<< ERROR!
java.io.IOException: java.lang.AssertionError Please see the cause for further 
information.
        at 
com.microsoft.azure.storage.core.Utility.initIOException(Utility.java:778)
        at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.flush(BlobOutputStreamInternal.java:533)
        at java.io.DataOutputStream.flush(DataOutputStream.java:123)
        at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
        at 
org.apache.hadoop.fs.azure.NativeAzureFileSystem$NativeAzureFsOutputStream.close(NativeAzureFileSystem.java:1045)
        at 
org.apache.hadoop.fs.FSDataOutputStream$PositionCache.close(FSDataOutputStream.java:72)
        at 
org.apache.hadoop.fs.FSDataOutputStream.close(FSDataOutputStream.java:101)
        at 
org.apache.hadoop.fs.azure.ITestBlobDataValidation.testCheckBlockMd5(ITestBlobDataValidation.java:235)
        at 
org.apache.hadoop.fs.azure.ITestBlobDataValidation.testCheckBlockMd5(ITestBlobDataValidation.java:151)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at 
org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
        Suppressed: java.io.IOException: java.lang.AssertionError Please see 
the cause for further information.
                at 
com.microsoft.azure.storage.core.Utility.initIOException(Utility.java:778)
                at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.flush(BlobOutputStreamInternal.java:533)
                at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.close(BlobOutputStreamInternal.java:317)
                at java.io.FilterOutputStream.close(FilterOutputStream.java:159)
                ... 17 more
        Caused by: java.util.concurrent.ExecutionException: 
java.lang.AssertionError
                at java.util.concurrent.FutureTask.report(FutureTask.java:122)
                at java.util.concurrent.FutureTask.get(FutureTask.java:192)
                at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.flush(BlobOutputStreamInternal.java:530)
                ... 19 more
        Caused by: java.lang.AssertionError
                at org.junit.Assert.fail(Assert.java:86)
                at org.junit.Assert.assertTrue(Assert.java:41)
                at org.junit.Assert.assertNotNull(Assert.java:621)
                at org.junit.Assert.assertNotNull(Assert.java:631)
                at 
org.apache.hadoop.fs.azure.ITestBlobDataValidation$ContentMD5Checker.checkObtainedMd5(ITestBlobDataValidation.java:193)
                at 
org.apache.hadoop.fs.azure.ITestBlobDataValidation$ContentMD5Checker.eventOccurred(ITestBlobDataValidation.java:186)
                at 
org.apache.hadoop.fs.azure.ITestBlobDataValidation$ContentMD5Checker.eventOccurred(ITestBlobDataValidation.java:170)
                at 
com.microsoft.azure.storage.StorageEventMultiCaster.fireEvent(StorageEventMultiCaster.java:52)
                at 
com.microsoft.azure.storage.core.ExecutionEngine.fireResponseReceivedEvent(ExecutionEngine.java:383)
                at 
com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:127)
                at 
com.microsoft.azure.storage.blob.CloudBlockBlob.uploadBlockInternal(CloudBlockBlob.java:1097)
                at 
com.microsoft.azure.storage.blob.CloudBlockBlob.uploadBlock(CloudBlockBlob.java:1069)
                at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.writeBlock(BlobOutputStreamInternal.java:456)
                at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.access$000(BlobOutputStreamInternal.java:47)
                at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal$1.call(BlobOutputStreamInternal.java:406)
                at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal$1.call(BlobOutputStreamInternal.java:403)
                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: java.lang.AssertionError
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.flush(BlobOutputStreamInternal.java:530)
        ... 19 more
        [CIRCULAR REFERENCE:java.lang.AssertionError]
{code}

> ITestBlobDataValidation gets confused if upload fails
> -----------------------------------------------------
>
>                 Key: HADOOP-15713
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15713
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>    Affects Versions: HADOOP-15407
>            Reporter: Steve Loughran
>            Priority: Minor
>
> {{ITestBlobDataValidation}} has a storage event callback which is invoked to 
> check the MD5 checksum. If the upload failed this check is false —but the 
> root cause is lost due to the assertion error raised.
> Proposed: have the callback check the result of the error and only look for 
> the MD5 value on a successful upload.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to