[
https://issues.apache.org/jira/browse/GEODE-6808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Juan José Ramos Cassella reassigned GEODE-6808:
-----------------------------------------------
Assignee: Juan José Ramos Cassella
> 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 José Ramos Cassella
> Assignee: Juan José Ramos Cassella
> Priority: Major
> Labels: GeodeCommons
>
> 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
(v7.6.3#76005)