[jira] [Comment Edited] (HDFS-10924) Add a new instrumented read-write lock

2016-10-09 Thread Jingcheng Du (JIRA)

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

Jingcheng Du edited comment on HDFS-10924 at 10/10/16 5:04 AM:
---

Thanks a lot [~xiaochen] for the comments.
bq. Are the constructors of AutoCloseableReadLock and AutoCloseableWriteLock 
intentionally public? I'm having a hard time coming up with a scenario of this.
Actually no, I have changed them to package private.
bq. Feels like a StringBuilder would be more readable and efficient in 
logWarning, than the current 3 concatenation.
For the log warning, these three strings can be concatenated into one after the 
compiling, this should be fine.
But yes, the StringBuilder is much more efficient than String.format, do we 
need to use StringBuilder instead of String.format, or it's okay to use 
String.format as now?

For others, they are good ones, I will fix them in the next patch V4. Thanks!




was (Author: jingcheng...@intel.com):
Thanks a lot [~xiaochen] for the comments.
bq. Are the constructors of AutoCloseableReadLock and AutoCloseableWriteLock 
intentionally public? I'm having a hard time coming up with a scenario of this.
Actually no, I have changed them to package private.
bq. Feels like a StringBuilder would be more readable and efficient in 
logWarning, than the current 3 concatenation.
For the log warning, these three strings can be concatenated into one after the 
compiling, this should be fine.
But yes, the StringBuilder is much efficient than String.format, do we need to 
use StringBuilder instead of String.format, or it's okay to use String.format 
as now?

For others, they are good ones, I will fix them in the next patch V4. Thanks!



> Add a new instrumented read-write lock
> --
>
> Key: HDFS-10924
> URL: https://issues.apache.org/jira/browse/HDFS-10924
> Project: Hadoop HDFS
>  Issue Type: Improvement
>  Components: datanode
>Reporter: Jingcheng Du
>Assignee: Jingcheng Du
> Attachments: HDFS-10924-2.patch, HDFS-10924-3.patch, 
> HDFS-10924-4.patch, HDFS-10924.patch
>
>
> Add a new instrumented read-write lock in hadoop common, so that the 
> HDFS-9668 can use this to improve the locking in FsDatasetImpl



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Comment Edited] (HDFS-10924) Add a new instrumented read-write lock

2016-09-30 Thread Jingcheng Du (JIRA)

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

Jingcheng Du edited comment on HDFS-10924 at 9/30/16 8:59 AM:
--

Hi [~arpitagarwal], I will have a vocation in the next whole week, and will 
resume my work on Oct 10. I have to refresh the patch according to comments at 
that time. So sorry for the inconvenience.
The new patch V2 is uploaded according to the Hadoop QA result, pleas kindly 
take a look if it is okay to commit. Thanks a lot for your review and comments!


was (Author: jingcheng...@intel.com):
Hi [~arpitagarwal], I will have a vocation in the next whole week, and will 
resume my work on Oct 10. I have to refresh the patch according to comments at 
that time. So sorry for the inconvenience, and thanks a lot for your review and 
comments!

> Add a new instrumented read-write lock
> --
>
> Key: HDFS-10924
> URL: https://issues.apache.org/jira/browse/HDFS-10924
> Project: Hadoop HDFS
>  Issue Type: Improvement
>  Components: datanode
>Reporter: Jingcheng Du
>Assignee: Jingcheng Du
> Attachments: HDFS-10924-2.patch, HDFS-10924.patch
>
>
> Add a new instrumented read-write lock in hadoop common, so that the 
> HDFS-9668 can use this to improve the locking in FsDatasetImpl



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org