-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71824/
-----------------------------------------------------------

(Updated Dec. 3, 2019, 5:25 a.m.)


Review request for mesos, Andrei Sekretenko and Greg Mann.


Changes
-------

* Moved from Encoder to stateless encode function.


Bugs: MESOS-10026
    https://issues.apache.org/jira/browse/MESOS-10026


Repository: mesos


Description
-------

These previously were templated to operate against typed records,
which imposes a few limitations. Namely, the caller cannot encode
records of different types without using some wrapper type.
Similarly, on the decoding side if the caller expects different
types of records based on some higher level protocol, it needs to
use a wrapper type that just stores the record's bytes for the
caller to decode.

The actual motivation for this patch came from a case where the
caller already has the record in bytes when encoding. We could
use Encoder<string> but it imposes an extra copy of each record,
which is not so straightforward to eliminate while keeping the
interface simple and functional for generic T records.

So, this patch makes the recordio encoder/decoder operate on
records as bytes, and callers can do whatever they wish with
the bytes.


Diffs (updated)
-----

  3rdparty/stout/include/stout/recordio.hpp 
9d226c21ed4ba7f31acf8db817470085792aca45 
  3rdparty/stout/tests/recordio_tests.cpp 
177939427a7ef5f15cac318a98e40cf77b0b0ada 


Diff: https://reviews.apache.org/r/71824/diff/2/

Changes: https://reviews.apache.org/r/71824/diff/1-2/


Testing
-------

Needs the following patch to compile mesos.


Thanks,

Benjamin Mahler

Reply via email to