[ https://issues.apache.org/jira/browse/HDFS-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216634#comment-13216634 ]
Sho Shimauchi commented on HDFS-3014: ------------------------------------- The reason why I prefer to use StringBuilder is that it's faster than String.format(). These toString() will be called only when developer debugs fsimage/edits related issues. This method won't be called not so often, therefore most user will never see these outputs. However, once this method is called, it's probably called many times. For example, I'll use this method to print debug log of replaying edit log (see HDFS-309 ). Using StringBuilder will reduce time to replay edit log. That means developer will reduce time to diagnose corrupted edit log and therefore the debeloper can seek the root cause of the issue faster. Notes that I don't have strong opinion about this either. I'll change the patch if it's better. > FSEditLogOp and its subclasses should have toString() method > ------------------------------------------------------------ > > Key: HDFS-3014 > URL: https://issues.apache.org/jira/browse/HDFS-3014 > Project: Hadoop HDFS > Issue Type: Improvement > Affects Versions: 0.23.0 > Reporter: Sho Shimauchi > Assignee: Sho Shimauchi > Attachments: HDFS-3014.txt > > > FSEditLogOp and its subclasses should have toString() method. > It's helpful for investigating editlog related issues. > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira