[ https://issues.apache.org/jira/browse/HADOOP-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805376#action_12805376 ]
Amareshwari Sriramadasu commented on HADOOP-6508: ------------------------------------------------- One solution we thought of is to make CompositeContext a true middle man. CompositeContext registers JobTracker as the updater. Its sub-contexts register CompositeContext as the updater. CompositeContext's MetricRecord is any other record which is updated by JobTracker, and it updates its sub-contexts on the call to doUpdates(). Here, CompositeContext takes care of synchronization for different threads accessing its record. See the attached png for the updated relation between JobTracker and CompositeContext. JobTracker (JT) has CompositeContext(CC) and CompositeRecord (CR). CC has a monitoring thread which calls doUpdates periodically, updates CR. CC also starts Context1(C1) and Context2(C2) 's timer threads. C1 has MetricsRecord (R1) and C2 has MetricsRecord(R2). CC updates R1 or R2 from the value of CR, if the doUpdates call is from C1 or C2, respectively. Here, CC registers JT as the updater, C1 and C2 register CC as the updater. Thoughts? > Incorrect values for metrics with CompositeContext > -------------------------------------------------- > > Key: HADOOP-6508 > URL: https://issues.apache.org/jira/browse/HADOOP-6508 > Project: Hadoop Common > Issue Type: Bug > Components: metrics > Affects Versions: 0.20.0 > Reporter: Amareshwari Sriramadasu > Fix For: 0.22.0 > > Attachments: CompositeContext-solution.png, CompositeContext.png > > > In our clusters, when we use CompositeContext with two contexts, second > context gets wrong values. > This problem is consistent on 500 (and above) node cluster. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.