[ https://issues.apache.org/jira/browse/HDFS-5669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13966411#comment-13966411 ]
Hudson commented on HDFS-5669: ------------------------------ SUCCESS: Integrated in Hadoop-Yarn-trunk #537 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk/537/]) HDFS-5669. Storage#tryLock() should check for null before logging successfull message. Contributed by Vinayakumar B (umamahesh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1586392) * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java > Storage#tryLock() should check for null before logging successfull message > -------------------------------------------------------------------------- > > Key: HDFS-5669 > URL: https://issues.apache.org/jira/browse/HDFS-5669 > Project: Hadoop HDFS > Issue Type: Bug > Components: datanode > Affects Versions: 2.2.0 > Reporter: Vinayakumar B > Assignee: Vinayakumar B > Fix For: 3.0.0, 2.5.0 > > Attachments: HDFS-5669.patch, HDFS-5669.patch > > > In the following code in Storage#tryLock(), there is a possibility that > {{file.getChannel().tryLock()}} returns null if the lock is acquired by some > other process. In that case even though return value is null, a successfull > message confuses. > {code}try { > res = file.getChannel().tryLock(); > file.write(jvmName.getBytes(Charsets.UTF_8)); > LOG.info("Lock on " + lockF + " acquired by nodename " + jvmName); > } catch(OverlappingFileLockException oe) {{code} -- This message was sent by Atlassian JIRA (v6.2#6252)