You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/11/18 18:23:58 UTC

[jira] [Commented] (GEODE-2117) Pulse fails to handle float type mbean attributes

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

ASF GitHub Bot commented on GEODE-2117:
---------------------------------------

GitHub user jaredjstewart opened a pull request:

    https://github.com/apache/incubator-geode/pull/289

    GEODE-2117: Pulse handles float type mbean attributes

     - Added tests for JMXDataUpdater::getDoubleAttribute()
     - JMXDataUpdater::getDoubleAttribute() now returns double approximations for floats rather than logging an error and returning zero.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jaredjstewart/incubator-geode feature/GEODE-2117

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-geode/pull/289.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #289
    
----
commit 36929fe5282339a7c0ac4aa4dbc5ee529524b642
Author: Jared Stewart <js...@pivotal.io>
Date:   2016-11-16T23:22:34Z

    GEODE-2117: Pulse handles float type mbean attributes
    
     - Added tests for JMXDataUpdater::getDoubleAttribute()
     - JMXDataUpdater::getDoubleAttribute() now returns double approximations for floats rather than logging an error and returning zero.

----


> Pulse fails to handle float type mbean attributes
> -------------------------------------------------
>
>                 Key: GEODE-2117
>                 URL: https://issues.apache.org/jira/browse/GEODE-2117
>             Project: Geode
>          Issue Type: Bug
>          Components: pulse
>    Affects Versions: 1.0.0-incubating, 1.0.0-incubating.M2, 1.0.0-incubating.M3
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>
> The following log messages are logged to Pulse log. These attributes correspond to fields on MemberMXBean.
> Pulse reacts to this by using zero as the value for all of these MBeans attributes.
> This seems to have been introduced by these commits in Feb:
> {noformat}
> commit 022733e8837b15b415c466a2e59874e09165e1c1
> Author: Jens Deppe <jd...@pivotal.io>
> Date:   Sat Feb 20 12:15:24 2016 -0800
>     GEODE-907: Switch all fields from floats to doubles
>     
>     - This is because when Jackson serializes a float (to JSON) it does so
>       through an implicit cast to a double which alters the precision.
>       Practically, a number like 23.99F ends up being 23.98999999234D which
>       messes with unit tests and displaying in the UI.
> commit 6d3f55605bd97a3e1172bf05906a9f612c18f1e2
> Author: Jens Deppe <jd...@pivotal.io>
> Date:   Thu Feb 18 16:31:15 2016 -0800
>     GEODE-907: Converted core functionality to use jackson
> {noformat}
> Errors in log file (note they're logged at INFO level as well):
> {noformat}
> [INFO 2016/11/10 21:20:40.594 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18882) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: AverageWrites Expected type: java.lang.Double Received type: java.lang.Float************************
> [INFO 2016/11/10 21:20:45.594 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18883) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: DiskWritesRate Expected type: java.lang.Double Received type: java.lang.Float************************
> [INFO 2016/11/10 21:20:45.595 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18884) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: AverageWrites Expected type: java.lang.Double Received type: java.lang.Float************************
> [INFO 2016/11/10 21:20:45.595 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18885) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: AverageReads Expected type: java.lang.Double Received type: java.lang.Float************************
> [INFO 2016/11/10 21:20:45.595 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18886) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: QueryRequestRate Expected type: java.lang.Double Received type: java.lang.Float************************
> [INFO 2016/11/10 21:20:45.595 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18887) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: DiskReadsRate Expected type: java.lang.Double Received type: java.lang.Float************************
> [INFO 2016/11/10 21:20:45.596 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18888) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: DiskWritesRate Expected type: java.lang.Double Received type: java.lang.Float************************
> [INFO 2016/11/10 21:20:45.596 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18889) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: DiskReadsRate Expected type: java.lang.Double Received type: java.lang.Float************************
> [INFO 2016/11/10 21:20:45.596 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18890) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: CpuUsage Expected type: java.lang.Double Received type: java.lang.Float************************
> [INFO 2016/11/10 21:20:45.596 IST PULSE-dharam-ThinkPad-Edge-E431:1099:null tid=0x6d] (msgTID=109 msgSN=18891) [PULSE]
> [org.apache.geode.tools.pulse.internal.log.PulseLogWriter]
> ************************Unexpected type for attribute: AverageReads Expected type: java.lang.Double Received type: java.lang.Float************************
> {noformat}



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