Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8702

Replace the manual parsing in Mesos code with the native protobuf map support

    XMLWordPrintableJSON

Details

    Description

      In MESOS-7656, we have updated the JSON <=> protobuf message conversion in stout for map support which means we can use the native protobuf map feature now in Mesos code. So we should replace the manual parsing for the following fields with the native protobuf map.

      https://github.com/apache/mesos/blob/1.5.0/include/mesos/docker/v1.proto#L65:L68

      https://github.com/apache/mesos/blob/1.5.0/include/mesos/oci/spec.proto#L33:L36

      https://github.com/apache/mesos/blob/1.5.0/include/mesos/oci/spec.proto#L61:L64

      https://github.com/apache/mesos/blob/1.5.0/include/mesos/oci/spec.proto#L88:L91

      https://github.com/apache/mesos/blob/1.5.0/include/mesos/oci/spec.proto#L107:L110

      https://github.com/apache/mesos/blob/1.5.0/include/mesos/oci/spec.proto#L151:L154

      Please note, for Appc image manifest, we also have a field repeated Label labels = 4, but we should not replace it with the native protobuf map support, because according to the Appc image spec, this field is not a map, instead it is a list of objects.

      And in mesos.proto, we also have a couple protobuf messages which have field like optional Labels labels = 10, .e.g. TaskInfo.labels, I would not suggest to replace them with native protobuf map since that would be an API changes which may break framework's code.

      Attachments

        Issue Links

          Activity

            People

              qianzhang Qian Zhang
              qianzhang Qian Zhang
              Gilbert Song Gilbert Song
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: