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

stack commented on HDFS-1605:
-----------------------------

I like this one:

+          waitFor(4000);

(I know you are only indenting and the above is in the indent and retraining 
the old code as is when you are changing something else is the way to go but... 
we should fix the above; could explain a few of those 99th percentiles)

Patch looks good on a first glance.  You are conservative in the changes you 
make and it seems like the methods are small enough they are easy to cast as 
methods that require read or write lock.  Will check closer soon.

Have you deployed this on your serving cluster [~xieliang007] ?

We should write a test to demonstrate the improvement.  I can do that unless 
you have one around the place?

> Convert DFSInputStream synchronized sections to a ReadWrite lock
> ----------------------------------------------------------------
>
>                 Key: HDFS-1605
>                 URL: https://issues.apache.org/jira/browse/HDFS-1605
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs-client
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: DFSClientRWlock.1.txt, DFSClientRWlock.3.txt, 
> HDFS-1605.txt
>
>
> Hbase does concurrent preads from multiple threads to different blocks of the 
> same hdfs file. Each of these pread calls invoke 
> DFSInputStream.getFileLength() and DFSInputStream.getBlockAt(). These methods 
> are "synchronized", thus causing all the concurrent threads to serialize. It 
> would help performance to convert this to a Read/Write lock



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to