[
https://issues.apache.org/jira/browse/HDFS-10560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15345906#comment-15345906
]
Yiqun Lin commented on HDFS-10560:
----------------------------------
Thanks [~anu] for review and comments. I'd like to answer your questions:
1. The inconsistent way of doing {{MAPPER.writeValueAsString}} in
{{DiskBalancerWorkItem}} and {{DiskBalancer}}. This is because the class
{{DiskBalancerWorkItem}} is in hadoop-hdfs-client, and it can't use the method
{{JsonUtil.toJsonString}} which is included in hadoop-hdfs.
2.I have tested the method {{currentStateString}} that enable {{INDENT_OUTPUT}}
in my local. The result was good, and this SerializationConfig.Feature still
make sense. And there was no errors.
3. I will file a new JIRA for {{CombinedHostsFileReader.java}} and
{{CombinedHostsFileWriter.java}}.
Post a new patch for this.
> 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: [email protected]
For additional commands, e-mail: [email protected]