[ https://issues.apache.org/jira/browse/HADOOP-5856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710952#action_12710952 ]
Tsz Wo (Nicholas), SZE commented on HADOOP-5856: ------------------------------------------------ I suggesting removing newEnry(..), i.e. {code} - log.appendLine(LogEntry.newEnry(block, now)); + log.appendLine("date=\"" + dateFormat.format(new Date(now)) + "\"\t " + + "time=\"" + now + "\"\t " + + "genstamp=\"" + block.getGenerationStamp() + "\"\t " + + "id=\"" + block.getBlockId() +"\""); {code} > FindBugs : fix "unsafe multithreaded use of DateFormat" warning in hdfs > ----------------------------------------------------------------------- > > Key: HADOOP-5856 > URL: https://issues.apache.org/jira/browse/HADOOP-5856 > Project: Hadoop Core > Issue Type: Bug > Components: dfs > Reporter: Kan Zhang > Assignee: Kan Zhang > Attachments: 5856-0.patch, 5856-1.patch > > > This JIRA fixes the following warning: > STCAL Call to method of static java.text.DateFormat in > org.apache.hadoop.hdfs.server.datanode.DataBlockScanner$LogEntry.newEnry(Block, > long) > Bug type STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE (click for details) > In class org.apache.hadoop.hdfs.server.datanode.DataBlockScanner$LogEntry > In method > org.apache.hadoop.hdfs.server.datanode.DataBlockScanner$LogEntry.newEnry(Block, > long) > Called method java.text.DateFormat.format(Date) > Field org.apache.hadoop.hdfs.server.datanode.DataBlockScanner.dateFormat > At DataBlockScanner.java:[line 385] -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.