hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9528) Cleanup namenode audit/log/exception messages
Date Thu, 10 Dec 2015 02:40:11 GMT

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

Uma Maheswara Rao G commented on HDFS-9528:
-------------------------------------------

Thankyou for the cleanup.

Seems test failures are related. Most of the failures are due to 
{noformat}
java.lang.NullPointerException
 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.toLeaseExceptionMessage(FSNamesystem.java:2503)
 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkLease(FSNamesystem.java:2511)
 at org.apache.hadoop.hdfs.server.namenode.FSDirWriteFileOp.analyzeFileState(FSDirWriteFileOp.java:652)
 at org.apache.hadoop.hdfs.server.namenode.FSDirWriteFileOp.validateAddBlock(FSDirWriteFileOp.java:185)
 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2383)
 at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:796)
{noformat}

Here the reason is:
{code}
return src + " (inode " + fileId + ") " + lease != null ?
        lease.toString(): "Holder " + holder + " does not have any open files.";
{code}
Brackets missed in above line. Here we should keep " condition? --- : --- " part into brackets.
Otherwise it is including prepended string also  for not equal evaluation as the precedence
and always its a non null. 
I think findbug warning is about the same too. 
Also please check checkstyle warnings about max line length which is due to one non formatted
line.
Other than this patch looks good.

> Cleanup namenode audit/log/exception messages
> ---------------------------------------------
>
>                 Key: HDFS-9528
>                 URL: https://issues.apache.org/jira/browse/HDFS-9528
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>            Priority: Minor
>         Attachments: h9528_20151208.patch
>
>
> - Cleanup unnecessary long methods for constructing message strings.
> - Avoid calling toString() methods.



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

Mime
View raw message