[ https://issues.apache.org/jira/browse/HDFS-10560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15345518#comment-15345518 ]
Anu Engineer commented on HDFS-10560: ------------------------------------- [~linyiqun] Thank you for finding this issue and providing a fix for the issue. Overall the patch looks very good. I had some minor comments. I see that sometimes we use {code:title=DiskBalancerWorkItem.java|borderStyle=solid} return MAPPER.writeValueAsString(this); {code} but in other places we use {code:title=DiskBalancer.java|borderStyle=solid} return JsonUtil.toJsonString(pathMap); {code} If this is not intentional can we please use a consistent way of doing it. I don't have any preference, either way is fine. {{DiskBalancerWorkStatus.java#currentStateString}} Since we enable INDENT_OUTPUT here, was wondering is that going to carry over to {{toJsonString}}. Not that it is an error or anything, just making sure that side-effect is intentional. {{CombinedHostsFileReader.java}} and {{CombinedHostsFileWriter.java}} are not part of diskbalancer. Should we clean up those files in another JIRA ? > DiskBalancer: Reuse ObjectMapper instance to improve the performance > -------------------------------------------------------------------- > > Key: HDFS-10560 > URL: https://issues.apache.org/jira/browse/HDFS-10560 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: balancer & mover > Affects Versions: HDFS-1312 > Reporter: Yiqun Lin > Assignee: Yiqun Lin > Attachments: HDFS-10560-HDFS-1312.001.patch, > HDFS-10560-HDFS-1312.002.patch > > > In branch HDFS-1312, there are many places use {{ObjectMapper}} instances to > do the json-object transform. But {{ObjectMapper}} instance is relatively > heavy, we should reuse them as possible. And In addition, {{ObjectMapper}} is > thread safe, can see this link:http://wiki.fasterxml.com/JacksonFAQ. > Here are related issues: HDFS-9724, HDFS-9768. We can see detail info in this > issues. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org