[
https://issues.apache.org/jira/browse/HDFS-11992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16055180#comment-16055180
]
Akira Ajisaka commented on HDFS-11992:
--------------------------------------
Thanks [~xiaodong.hu] for the patch.
1.
{code}
FsDatasetImpl.LOG.warn(" Getting exception while validating integrity " +
"and setting Length for blockFile", e);
{code}
* Would you remove a whitespace before 'Getting'?
* Length -> length
2. Would you fix checkstyle warning?
{noformat}
./hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestInstrumentedReadWriteLock.java:38:
static final Logger LOG =
LoggerFactory.getLogger(TestInstrumentedReadWriteLock.class);: Line is longer
than 80 characters (found 89). [LineLength]
{noformat}
3. Would you use {}-placeholders for logging? For example,
{code}
if (LOG.isDebugEnabled()) {
LOG.debug("Changing meta file offset of block " + b + " from " +
oldPos + " to " + newPos);
}
{code}
can be replaced with
{code}
LOG.debug("Changing meta file offset of block {} from {} to {}",
b, oldPos, newPos);
{code}
Please see https://www.slf4j.org/faq.html#logging_performance for more details.
> Replace commons-logging APIs with slf4j in FsDatasetImpl
> --------------------------------------------------------
>
> Key: HDFS-11992
> URL: https://issues.apache.org/jira/browse/HDFS-11992
> Project: Hadoop HDFS
> Issue Type: Improvement
> Affects Versions: 3.0.0-alpha3
> Reporter: Akira Ajisaka
> Assignee: hu xiaodong
> Attachments: HDFS-11992.001.patch
>
>
> {{FsDatasetImpl.LOG}} is widely used and this will change the APIs of
> InstrumentedLock and InstrumentedWriteLock, so this issue is to change only
> {{FsDatasetImpl.LOG}} and other related APIs.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]