Uploaded image for project: 'Apache S4'
  1. Apache S4
  2. S4-51

Adaptor can‘t get the correct event key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.4, 0.3
    • 0.4, 0.3

    Description

      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);
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              qiuboboy bohr.qiu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified