[jira] [Commented] (AMBARI-16949) Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric name

2016-06-09 Thread Jungtaek Lim (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-16949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15323688#comment-15323688
 ] 

Jungtaek Lim commented on AMBARI-16949:
---

[~avijayan]
Thanks for merging this!

> Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric 
> name
> 
>
> Key: AMBARI-16949
> URL: https://issues.apache.org/jira/browse/AMBARI-16949
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-metrics
>Affects Versions: 2.4.0
>Reporter: Jungtaek Lim
> Fix For: 2.4.0
>
> Attachments: AMBARI-16949-trunk-v1.patch
>
>
> When we request '/ws/v1/timeline/metrics' with metric name which contains %25 
> (escaped '%'), response for the API is json describing there's NPE.
> And NPE is logged for ambari-metrics-collector log file.
> {code}
> 2016-05-30 09:15:05,061 WARN 
> org.apache.hadoop.yarn.webapp.GenericExceptionHandler: INTERNAL_SERVER_ERROR
> java.lang.NullPointerException
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.appendAggregateMetricFromResultSet(PhoenixHBaseAccessor.java:810)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.getAggregateMetricRecords(PhoenixHBaseAccessor.java:772)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.HBaseTimelineMetricStore.getTimelineMetrics(HBaseTimelineMetricStore.java:178)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TimelineWebServices.getTimelineMetrics(TimelineWebServices.java:372)
>   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
> {code}
> Reason of NPE: 
> Metrics are properly fetched with wildcard. But when applying functions to 
> result set, actual metric name is not exist from map of metric name to list 
> of function.



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


[jira] [Commented] (AMBARI-16949) Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric name

2016-06-09 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-16949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15323172#comment-15323172
 ] 

Hudson commented on AMBARI-16949:
-

FAILURE: Integrated in Ambari-trunk-Commit #5044 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/5044/])
AMBARI-16949 Metrics Collector API shows NPE if we use wildcard (%25 for 
(avijayan: 
[http://git-wip-us.apache.org/repos/asf?p=ambari.git=commit=316a1811fe6b1374f7a7b2aa9d721f2366484b55])
* 
ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java


> Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric 
> name
> 
>
> Key: AMBARI-16949
> URL: https://issues.apache.org/jira/browse/AMBARI-16949
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-metrics
>Affects Versions: 2.4.0
>Reporter: Jungtaek Lim
> Fix For: 2.4.0
>
> Attachments: AMBARI-16949-trunk-v1.patch
>
>
> When we request '/ws/v1/timeline/metrics' with metric name which contains %25 
> (escaped '%'), response for the API is json describing there's NPE.
> And NPE is logged for ambari-metrics-collector log file.
> {code}
> 2016-05-30 09:15:05,061 WARN 
> org.apache.hadoop.yarn.webapp.GenericExceptionHandler: INTERNAL_SERVER_ERROR
> java.lang.NullPointerException
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.appendAggregateMetricFromResultSet(PhoenixHBaseAccessor.java:810)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.getAggregateMetricRecords(PhoenixHBaseAccessor.java:772)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.HBaseTimelineMetricStore.getTimelineMetrics(HBaseTimelineMetricStore.java:178)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TimelineWebServices.getTimelineMetrics(TimelineWebServices.java:372)
>   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
> {code}
> Reason of NPE: 
> Metrics are properly fetched with wildcard. But when applying functions to 
> result set, actual metric name is not exist from map of metric name to list 
> of function.



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


[jira] [Commented] (AMBARI-16949) Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric name

2016-05-31 Thread Jungtaek Lim (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-16949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15307378#comment-15307378
 ] 

Jungtaek Lim commented on AMBARI-16949:
---

Reason to not including tests: 
I think it's good to add some tests to ITPhoenixHBaseAccessor, but IT tests are 
marked as @Ignore from suite, and when I test existing tests manually, tests 
fail often at local machine.
If we want to add tests anyway, I'm happy to add. Otherwise, I guess we're good 
to go.

> Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric 
> name
> 
>
> Key: AMBARI-16949
> URL: https://issues.apache.org/jira/browse/AMBARI-16949
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-metrics
>Affects Versions: 2.4.0
>Reporter: Jungtaek Lim
> Attachments: AMBARI-16949-trunk-v1.patch
>
>
> When we request '/ws/v1/timeline/metrics' with metric name which contains %25 
> (escaped '%'), response for the API is json describing there's NPE.
> And NPE is logged for ambari-metrics-collector log file.
> {code}
> 2016-05-30 09:15:05,061 WARN 
> org.apache.hadoop.yarn.webapp.GenericExceptionHandler: INTERNAL_SERVER_ERROR
> java.lang.NullPointerException
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.appendAggregateMetricFromResultSet(PhoenixHBaseAccessor.java:810)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.getAggregateMetricRecords(PhoenixHBaseAccessor.java:772)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.HBaseTimelineMetricStore.getTimelineMetrics(HBaseTimelineMetricStore.java:178)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TimelineWebServices.getTimelineMetrics(TimelineWebServices.java:372)
>   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
> {code}
> Reason of NPE: 
> Metrics are properly fetched with wildcard. But when applying functions to 
> result set, actual metric name is not exist from map of metric name to list 
> of function.



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


[jira] [Commented] (AMBARI-16949) Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric name

2016-05-31 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-16949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15307371#comment-15307371
 ] 

Hadoop QA commented on AMBARI-16949:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12807056/AMBARI-16949-trunk-v1.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
ambari-metrics/ambari-metrics-timelineservice.

Test results: 
https://builds.apache.org/job/Ambari-trunk-test-patch/7062//testReport/
Console output: 
https://builds.apache.org/job/Ambari-trunk-test-patch/7062//console

This message is automatically generated.

> Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric 
> name
> 
>
> Key: AMBARI-16949
> URL: https://issues.apache.org/jira/browse/AMBARI-16949
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-metrics
>Affects Versions: 2.4.0
>Reporter: Jungtaek Lim
> Attachments: AMBARI-16949-trunk-v1.patch
>
>
> When we request '/ws/v1/timeline/metrics' with metric name which contains %25 
> (escaped '%'), response for the API is json describing there's NPE.
> And NPE is logged for ambari-metrics-collector log file.
> {code}
> 2016-05-30 09:15:05,061 WARN 
> org.apache.hadoop.yarn.webapp.GenericExceptionHandler: INTERNAL_SERVER_ERROR
> java.lang.NullPointerException
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.appendAggregateMetricFromResultSet(PhoenixHBaseAccessor.java:810)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.getAggregateMetricRecords(PhoenixHBaseAccessor.java:772)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.HBaseTimelineMetricStore.getTimelineMetrics(HBaseTimelineMetricStore.java:178)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TimelineWebServices.getTimelineMetrics(TimelineWebServices.java:372)
>   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
> {code}
> Reason of NPE: 
> Metrics are properly fetched with wildcard. But when applying functions to 
> result set, actual metric name is not exist from map of metric name to list 
> of function.



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


[jira] [Commented] (AMBARI-16949) Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric name

2016-05-30 Thread Jungtaek Lim (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-16949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15306476#comment-15306476
 ] 

Jungtaek Lim commented on AMBARI-16949:
---

PhoenixHBaseAccessor.appendMetricFromResultSet() doesn't throw NPE but it 
doesn't match proper functions when both wildcard and functions are used.
https://github.com/apache/ambari/blob/branch-2.2.2/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java#L668-L693

I guess this is not expected behavior. What do others think?

> Metrics Collector API shows NPE if we use wildcard (%25 for '%') for metric 
> name
> 
>
> Key: AMBARI-16949
> URL: https://issues.apache.org/jira/browse/AMBARI-16949
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-metrics
>Affects Versions: 2.4.0
>Reporter: Jungtaek Lim
>
> When we request '/ws/v1/timeline/metrics' with metric name which contains %25 
> (escaped '%'), response for the API is json describing there's NPE.
> And NPE is logged for ambari-metrics-collector log file.
> {code}
> 2016-05-30 09:15:05,061 WARN 
> org.apache.hadoop.yarn.webapp.GenericExceptionHandler: INTERNAL_SERVER_ERROR
> java.lang.NullPointerException
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.appendAggregateMetricFromResultSet(PhoenixHBaseAccessor.java:810)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.getAggregateMetricRecords(PhoenixHBaseAccessor.java:772)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.HBaseTimelineMetricStore.getTimelineMetrics(HBaseTimelineMetricStore.java:178)
>   at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TimelineWebServices.getTimelineMetrics(TimelineWebServices.java:372)
>   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
> {code}
> Reason of NPE: 
> Metrics are properly fetched with wildcard. But when applying functions to 
> result set, actual metric name is not exist from map of metric name to list 
> of function.



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