Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-9435

Fix jersey serialization/deserialization of json objects

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.98.0, 0.96.0
    • Component/s: REST
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      This patch replaces the default jersey json marshaller/unmarshaller with jackson. It updates unit tests to include json serialization/deserialization verification.

      The patch is backward compatible except for the following:

      StorageClusterStatusModel, which is broken and had to be fixed in this patch. It only shows one node in the liveNodes field.

      Previously when submitting requests represented in json, some fields prefixed with the '@' sign were accepted as equivalent to the same field name without the prefix. This was unintended and likely caused by a bug in Jersey. This has been rectified and no longer supported. It should be noted that responses represented in json remain the same (no '@' prefix).
      Show
      This patch replaces the default jersey json marshaller/unmarshaller with jackson. It updates unit tests to include json serialization/deserialization verification. The patch is backward compatible except for the following: StorageClusterStatusModel, which is broken and had to be fixed in this patch. It only shows one node in the liveNodes field. Previously when submitting requests represented in json, some fields prefixed with the '@' sign were accepted as equivalent to the same field name without the prefix. This was unintended and likely caused by a bug in Jersey. This has been rectified and no longer supported. It should be noted that responses represented in json remain the same (no '@' prefix).

      Description

      Stargate uses the default json marshaller/unmarshaller in natural mode. In this mode the unmarshaller has trouble unmarshalling json instances.

      This patch fixes this issue by using jackson as the marshaller/unmarshaller instead.

      I've also updated all the model unit tests to test json serialization/deserialization. Backwards compatibilty can be verified by modify the test base class to use the original marshaller/unmarshaller and see that model tests pass.

      The patch is backward compatible except for StorageClusterStatusModel, which is broken anyway. It only shows one node in the liveNodes field.

        Attachments

        1. HBASE-9435.patch
          69 kB
          Francis Liu
        2. HBASE-9435.patch
          69 kB
          stack

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                toffer Francis Liu
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: