[
https://issues.apache.org/jira/browse/MAPREDUCE-6440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14681112#comment-14681112
]
Bibin A Chundatt commented on MAPREDUCE-6440:
---------------------------------------------
{{JAXBContextResolver}} context is set as below
{code}
this.context =
new JSONJAXBContext(JSONConfiguration.natural()
.rootUnwrapping(false).build(), cTypes);
{code}
xml out put for the same
{noformat}
<taskAttempts>
<taskAttempt xsi:type="reduceTaskAttemptInfo">
<startTime>1439172535485</startTime>
..
<type>REDUCE</type>
</taskAttempt>
</taskAttempts>
{noformat}
While converting to JSON *xsi:type="reduceTaskAttemptInfo"* type gets added to
taskattempt.
fix could be
{code}
this.context =
new JSONJAXBContext(JSONConfiguration.mapped()
.rootUnwrapping(false).build(), cTypes);
{code}
but the json format will differ.
or {{ReduceTaskAttemptInfo}} shouldnt be an extended class
[~devaraj.k] any thoughts?
> Duplicate Key in Json Output for Job details
> --------------------------------------------
>
> Key: MAPREDUCE-6440
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-6440
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: jobhistoryserver
> Reporter: Anushri
> Assignee: Bibin A Chundatt
> Priority: Minor
>
> Duplicate key in Json Output for Job details for the url :
> http://<jhs_ip>:<jhs_port>/ws/v1/history/mapreduce/jobs/job_id/tasks/task_id/attempts
> If the task type is "REDUCE" the json output for this url contains duplicate
> key for "type".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)