[ 
https://issues.apache.org/jira/browse/HADOOP-11361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15374701#comment-15374701
 ] 

Vinayakumar B commented on HADOOP-11361:
----------------------------------------

bq. I found that the change of the signature, (in concrete, return type, of 
(getMetrics(builder, all)) breaks other tests - it can cause test failures of 
TestContainerMetrics because of type cast failures, although Jenkins could not 
find it.
Can you please point me the failure place.? Since Iterable is a interface, and 
List also implements it, I dont see any problem in current signature. And 
returned {{builder.getRecords()}} is also a List itself.

bq. To fix the problem, I attach v8 patch without changing signature(return 
type) of getMetrics(builder, all), and add private List<MetricsRecordImpl> 
getMetrics(builder) as a wrapper for private call in MetricsSourceAdapter. This 
hack also preserves backward compatibility.
Instead of this Hack, we can change the {{lastRecs}} itself to {{Iterable}}.

> Fix a race condition in MetricsSourceAdapter.updateJmxCache
> -----------------------------------------------------------
>
>                 Key: HADOOP-11361
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11361
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.4.1, 2.5.1, 2.6.0
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>         Attachments: HADOOP-111361-003.patch, HADOOP-11361-002.patch, 
> HADOOP-11361-004.patch, HADOOP-11361-005.patch, HADOOP-11361-005.patch, 
> HADOOP-11361-006.patch, HADOOP-11361-007.patch, HADOOP-11361.008.patch, 
> HADOOP-11361.patch, HDFS-7487.patch
>
>
> {noformat}
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.hadoop.metrics2.impl.MetricsSourceAdapter.updateAttrCache(MetricsSourceAdapter.java:247)
>       at 
> org.apache.hadoop.metrics2.impl.MetricsSourceAdapter.updateJmxCache(MetricsSourceAdapter.java:177)
>       at 
> org.apache.hadoop.metrics2.impl.MetricsSourceAdapter.getAttribute(MetricsSourceAdapter.java:102)
>       at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to