geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick Cavender (Jira)" <j...@apache.org>
Subject [jira] [Closed] (GEODE-6808) Backward compatibility broken in DistributedSystemMXBean.queryData
Date Thu, 26 Sep 2019 18:03:09 GMT

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

Dick Cavender closed GEODE-6808.
--------------------------------

> Backward compatibility broken in DistributedSystemMXBean.queryData
> ------------------------------------------------------------------
>
>                 Key: GEODE-6808
>                 URL: https://issues.apache.org/jira/browse/GEODE-6808
>             Project: Geode
>          Issue Type: Bug
>          Components: jmx, pulse, querying
>            Reporter: Juan Ramos
>            Assignee: Juan Ramos
>            Priority: Major
>              Labels: GeodeCommons
>             Fix For: 1.10.0
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> As part of thee efforts to remove {{TypedJson}} and move from {{org.json}} to {{Jackson}}
between {{1.8.0}} and {{1.9.0}}, the {{JSON}} string returned by the {{QueryDataFunction}}
doesn't include the object type anymore within the array (at least for primitive types). The
old version used to return results in the form {{\{"result":[["java.lang.String","v"],["java.lang.String","b"]]}\}},
while the new one uses {{\{"result":["v", "b"]\}}}.
> This function is used through {{DistributedSystemMXBean.queryData}}, so any user executing
queries through {{JMX}} and relying on the [documented representation|https://geode.apache.org/releases/latest/javadoc/org/apache/geode/management/DistributedSystemMXBean.html#queryData-java.lang.String-java.lang.String-int-]
to parse the results will fail as soon as they upgrade to {{1.9.0}}.
> Several parsing methods within {{DataBrowser.js}} *still use these deleted types* as
well to create an internal representation that is later used to show the results in {{HTML}}
so, starting with {{1.9.0}}, the query results are always shown as empty.
> {code:javascript}
> // This function creates complete result panel html
> function createHtmlForQueryResults(){
>   var memberResults = responseResult.result;
>   if(memberResults.length > 0){
>     if(memberResults[0].member != undefined || memberResults[0].member != null){
>       //console.log("member wise results found..");      
>       for(var i=0; i<memberResults.length; i++){
>         //console.log(memberResults[i].member);
>         $('#memberAccordion').append(createHtmlForMember(memberResults[i]));
>       }
>     }else{
>       //console.log("cluster level results found..");
>       var accordionContentHtml = "";
>       accordionContentHtml = createClusterAccordionContentHtml(memberResults);
>       var resultHtml = "<div class=\"accordion-content2\">"+ accordionContentHtml
+"</div>";
>       $('#memberAccordion').append(resultHtml);
>     }
>   }else{
>     $('#memberAccordion').append("<span> No Results Found...</span>");
>   }
> }
> {code}
> We need to either re-factor the entire parsing logic to use the new format, or revert
the changes to keep using the old format.
> Cheers.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message