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

Liang Xie commented on HDFS-6591:
---------------------------------

Attached v4 should address [[email protected]]'s comments.
[~cnauroth], after a looking, it seems that it's a convention that adding 
"future.get()" after "CompletionService#poll", even Future<Void>, see this 
example: 
https://github.com/apache/hbase/blob/e4138a3a9408193e90dd6cc0db6d61320e370479/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/snapshot/RegionServerSnapshotManager.java#L319
I grep lots of open source code, all have this style, even don't need the 
result for further processing:)
I didn't read through JDK FutureTask related impl so far, but my thought is 
that the JavaDoc for "CompletionService#poll" probably is not correct enough.
Also i replaced "future.get" with "Thread.sleep(xx)", still got failed result, 
so it should not related with: "so this might indicate a race condition that 
had been masked by the future.get() taking up a few extra cycles", per my 
understanding so far.

> while loop is executed tens of thousands of times  in Hedged  Read
> ------------------------------------------------------------------
>
>                 Key: HDFS-6591
>                 URL: https://issues.apache.org/jira/browse/HDFS-6591
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.4.0
>            Reporter: LiuLei
>            Assignee: Liang Xie
>         Attachments: HDFS-6591-v2.txt, HDFS-6591-v3.txt, HDFS-6591-v4.txt, 
> HDFS-6591.txt, LoopTooManyTimesTestCase.patch
>
>
> I download hadoop-2.4.1-rc1 code from 
> http://people.apache.org/~acmurthy/hadoop-2.4.1-rc1/,  I test the  Hedged  
> Read. I find the while loop in hedgedFetchBlockByteRange method is executed 
> tens of thousands of times.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to