ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Perroud (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-9056) GangliaReportPropertyProvider does not handle properly "NaN" values
Date Fri, 09 Jan 2015 12:34:35 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-9056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benoit Perroud updated AMBARI-9056:
-----------------------------------
    Attachment: AMBARI-9056-reproduce.patch

This is a simple test method which reproduce the issue.

The complete exception generated is:

{code}
org.codehaus.jackson.map.JsonMappingException: Can not construct instance of java.lang.Number
from String value 'NaN': not a valid number
 at [Source: java.io.StringReader@42a0a884; line: 1, column: 189] (through reference chain:
org.apache.ambari.server.controller.ganglia.GangliaMetric["datapoints"])
	at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163)
	at org.codehaus.jackson.map.deser.StdDeserializationContext.weirdStringException(StdDeserializationContext.java:243)
	at org.codehaus.jackson.map.deser.std.StdDeserializer$NumberDeserializer.deserialize(StdDeserializer.java:932)
	at org.codehaus.jackson.map.deser.std.StdDeserializer$NumberDeserializer.deserialize(StdDeserializer.java:883)
	at org.codehaus.jackson.map.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:104)
	at org.codehaus.jackson.map.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:18)
	at org.codehaus.jackson.map.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:104)
	at org.codehaus.jackson.map.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:18)
	at org.codehaus.jackson.map.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:299)
	at org.codehaus.jackson.map.deser.SettableBeanProperty$MethodProperty.deserializeAndSet(SettableBeanProperty.java:414)
	at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:697)
	at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
	at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2723)
	at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1854)
	at org.apache.ambari.server.controller.ganglia.GangliaMetricTest.testDeserializationWithNaNValue(GangliaMetricTest.java:124)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
{code}

> GangliaReportPropertyProvider does not handle properly "NaN" values
> -------------------------------------------------------------------
>
>                 Key: AMBARI-9056
>                 URL: https://issues.apache.org/jira/browse/AMBARI-9056
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-metrics, ambari-server
>    Affects Versions: 1.7.0
>         Environment: Ambari 1.7 on Ubuntu 14.04
>            Reporter: Benoit Perroud
>            Priority: Minor
>         Attachments: AMBARI-9056-reproduce.patch
>
>
> On a fresh install of HDP 2.2, I get this error:
> {code}
> 11:59:24,622 ERROR [qtp2010902743-25918] GangliaReportPropertyProvider:153 - Caught exception
getting Ganglia metrics : org.codehaus.jackson.map.JsonMappingException: Can not construct
instance of java.lang.Number from String value 'NaN': not a valid number
>  at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@4f3df2c8; line:
1, column: 4496] (through reference chain: org.apache.ambari.server.controller.ganglia.GangliaMetric["datapoints"])
: spec=http://daplab-wn-06/ganglia/graph.php?g=cpu_report&json=1
> {code}
> When I'm having a look at the data returned by Ganglia, I get:
> {code}
> curl "http://daplab-wn-06/ganglia/graph.php?g=cpu_report&json=1" 
> [{"ds_name":"a0","cluster_name":"","graph_type":"stack","host_name":"","metric_name":"1-min","color":"#BBBBBB","datapoints":[[0.12266666667,1420798065],[0.14,1420798080],...snip...[0.17,1420801650],["NaN",1420801665]]},...snip...]
> {code}
> Seems the last "NaN" datapoint is not parsed properly.



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

Mime
View raw message