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

Chris Nauroth commented on HADOOP-12067:
----------------------------------------

Hi Duo.  Here are a few comments on this patch.

I'd also appreciate getting a second code review on this one.  [~ivanmi] or 
[~chuanliu], would you like to take a look?

# When catching {{InterruptedException}}, we need to re-raise the interrupted 
signal in case any code that called into this layer relies on seeing the 
interrupted status, such as daemon shutdown logic.  To do this, call 
{{Thread.currentThread().interrupt()}} inside the {{catch}} block.  Also, 
please use the {{LOG}} if you want to print information about the exception.  
{{e.printStackTrace()}} would go to stderr.
# I think the {{continue}} on line 2485 is unnecessary.  Can you please remove 
it?
# Inside the retry loop, there is some code duplication for {{else}} paths to 
{{throw ex}}.  I think we can cut one of these code paths by changing the 
conditional to this:
{code}
if (ex.getErrorCode().equals(
    StorageErrorCode.SERVER_BUSY.toString()) &&
    retryCount < copyBlobMaxRetries) {
{code}
# It would be great too if we could eliminate the code duplication caused by 
multiple calls to {{dstBlob.startCopyFromBlob}}: once to get started and a 
second time in the exception handler.  This isn't directly related to the 
current patch, but let me know if you have any thoughts on cleaning this up.


> Add exponential retry when copyblob is throttled by Azure storage
> -----------------------------------------------------------------
>
>                 Key: HADOOP-12067
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12067
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: tools
>    Affects Versions: 2.7.0
>            Reporter: Duo Xu
>            Assignee: Duo Xu
>         Attachments: HADOOP-12067.01.patch
>
>
> HADOOP-11693 passes exponential retry policy to Azure storage SDK when Azure 
> storage throttling happens. However, when I looked at the source code of 
> Azure storage SDK. Storage exceptions such as throttling exception are 
> non-retryable.
> I would like to add retry in WASB driver instead of depending on Azure 
> storage SDK to make sure retry happens when Azure storage throttling fires.



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

Reply via email to