mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand Mazumdar <an...@apache.org>
Subject Re: Review Request 54218: Made `serialize()`/`deserialize()` handle streaming content types.
Date Thu, 01 Dec 2016 00:24:38 GMT


> On Dec. 1, 2016, 12:14 a.m., Vinod Kone wrote:
> > not looking at subsequent reviews, it's not clear to me why the serialize/deserialize
functions of streaming types are same as non-streaming types. i would've imagined the streaming
types to use RecordIO format. maybe add a comment?

I can add a comment for posterity. It's not quite possible for us to re-use `deserialize()`
if it supports "Record-IO" formatting with the `recordio::Reader` abstraction. This was the
reason why `serialize()` supported "Record-IO" formatting in the initial version of this patch
and was inconsistent with `deserialize()` and we made both of them consistent now.


> On Dec. 1, 2016, 12:14 a.m., Vinod Kone wrote:
> > src/common/http.cpp, lines 115-126
> > <https://reviews.apache.org/r/54218/diff/2/?file=1573313#file1573313line115>
> >
> >     instead of lambdas can you do this similar to `deserialize`?
> >     
> >     ```
> >     case ContentType::PROTOBUF:
> >     case ContentType::STREAMING_PROTOBUF: {
> >       return message.SerializeAsString();
> >     }
> >     
> >     case ContentType::JSON:
> >     case ContentType::STREAMING_JSON: {
> >       JSON::Object object = JSON::protobuf(message);
> >       return stringify(object);
> >     }
> >     
> >     ```

Yeah, we don't need the lambdas any more since it's no longer doing "Record-IO" as was the
case previously. :-)


- Anand


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


On Nov. 30, 2016, 10:08 p.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54218/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2016, 10:08 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-6472
>     https://issues.apache.org/jira/browse/MESOS-6472
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `serialize()` helper can now encode a record in 'Record-IO'
> format for streaming content type. Also, `deserialize()` now
> handles a streaming content type by just parsing it the body
> into a corresponding protobuf.
> 
> 
> Diffs
> -----
> 
>   src/common/http.hpp 378208be58d0cd141ff60a6d25a173f2793870dc 
>   src/common/http.cpp 42af33094150001fa6741effb6b0aee1cde3c109 
> 
> Diff: https://reviews.apache.org/r/54218/diff/
> 
> 
> Testing
> -------
> 
> make check (these would be tested later in the chain)
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message