incubator-s4-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "qiu zhan bo (JIRA)" <j...@apache.org>
Subject [jira] [Created] (S4-51) Adaptor can‘t get the correct event key
Date Mon, 28 May 2012 06:13:22 GMT
qiu zhan bo created S4-51:
-----------------------------

             Summary: Adaptor can‘t get the correct  event key
                 Key: S4-51
                 URL: https://issues.apache.org/jira/browse/S4-51
             Project: Apache S4
          Issue Type: Bug
    Affects Versions: 0.4, 0.3
            Reporter: qiu zhan bo
             Fix For: 0.4, 0.3


Loadgenerator construct Message object and mashall it with json format,and GenericJsonClientStub#eventWrapperFromBytes
method unmarshall the json data to EventWrapper object.
There is something wrong with   key-field-name,GenericJsonClientStub#eventWrapperFromBytes
obtain key-field-name by ‘keys’ field from json,and Message# toJson method marshall
it with ‘keyNames’.we can modify org.apache.s4.client.Message#toJson method as follows
to fix the bug:
   public void toJson(JSONObject json) throws JSONException {
        json.put("stream", this.stream);
        json.put("class", this.clazz);
        if (this.keys != null) {
            json.put("keys", this. keyNames);
        }

        json.put("object", this.object);
}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message