hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jingcheng Du (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HDFS-10924) Add a new instrumented read-write lock
Date Mon, 10 Oct 2016 05:04:20 GMT

    [ https://issues.apache.org/jira/browse/HDFS-10924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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.du@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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message