You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Michael Park <mp...@apache.org> on 2016/02/04 00:11:59 UTC
Review Request 43159: Removed the duplicate "active" field in json
schema of `Framework`.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43159/
-----------------------------------------------------------
Review request for mesos, Benjamin Hindman and Joris Van Remoortere.
Bugs: MESOS-4582
https://issues.apache.org/jira/browse/MESOS-4582
Repository: mesos
Description
-------
The new `jsonify` library is a writer-based approach, and does not keep track of the fields that have been written out so far.
The previous version of `summarize(framework)` and `model(framework)` had a duplicate `"active"` field which was de-duplicated since they simply get inserted to a `std::map`, overriding the previous value.
In the `jsonify` case, this pattern results in duplicate key in the JSON output. Although the presence of duplicate keys is technically not __invalid__ according to the JSON specification, some JSON libraries disallow them.
As such, we should generate JSON outputs without duplicate keys.
Diffs
-----
src/master/http.cpp 3d7a624b78fd85a8d99bce609e37411ed660678c
Diff: https://reviews.apache.org/r/43159/diff/
Testing
-------
Verified that `make check` __with__ https://reviews.apache.org/r/43160/ + https://reviews.apache.org/r/43161/ and __without__ this patch breaks.
Thanks,
Michael Park
Re: Review Request 43159: Removed the duplicate "active" field in json
schema of `Framework`.
Posted by Alexander Rojas <al...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43159/#review118833
-----------------------------------------------------------
Ship it!
Ship It!
- Alexander Rojas
On Feb. 4, 2016, 12:11 a.m., Michael Park wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43159/
> -----------------------------------------------------------
>
> (Updated Feb. 4, 2016, 12:11 a.m.)
>
>
> Review request for mesos, Benjamin Hindman and Joris Van Remoortere.
>
>
> Bugs: MESOS-4582
> https://issues.apache.org/jira/browse/MESOS-4582
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The new `jsonify` library is a writer-based approach, and does not keep track of the fields that have been written out so far.
> The previous version of `summarize(framework)` and `model(framework)` had a duplicate `"active"` field which was de-duplicated since they simply get inserted to a `std::map`, overriding the previous value.
>
> In the `jsonify` case, this pattern results in duplicate key in the JSON output. Although the presence of duplicate keys is technically not __invalid__ according to the JSON specification, some JSON libraries disallow them.
> As such, we should generate JSON outputs without duplicate keys.
>
>
> Diffs
> -----
>
> src/master/http.cpp 3d7a624b78fd85a8d99bce609e37411ed660678c
>
> Diff: https://reviews.apache.org/r/43159/diff/
>
>
> Testing
> -------
>
> Verified that `make check` __with__ https://reviews.apache.org/r/43160/ + https://reviews.apache.org/r/43161/ and __without__ this patch breaks.
>
>
> Thanks,
>
> Michael Park
>
>
Re: Review Request 43159: Removed the duplicate "active" field in json
schema of `Framework`.
Posted by Klaus Ma <kl...@gmail.com>.
> On Feb. 7, 2016, 11:29 a.m., Klaus Ma wrote:
> > Ship It!
Add test case for duplicated keys in our output: did not prase json, just `std::count` should be OK.
- Klaus
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43159/#review118166
-----------------------------------------------------------
On Feb. 4, 2016, 7:11 a.m., Michael Park wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43159/
> -----------------------------------------------------------
>
> (Updated Feb. 4, 2016, 7:11 a.m.)
>
>
> Review request for mesos, Benjamin Hindman and Joris Van Remoortere.
>
>
> Bugs: MESOS-4582
> https://issues.apache.org/jira/browse/MESOS-4582
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The new `jsonify` library is a writer-based approach, and does not keep track of the fields that have been written out so far.
> The previous version of `summarize(framework)` and `model(framework)` had a duplicate `"active"` field which was de-duplicated since they simply get inserted to a `std::map`, overriding the previous value.
>
> In the `jsonify` case, this pattern results in duplicate key in the JSON output. Although the presence of duplicate keys is technically not __invalid__ according to the JSON specification, some JSON libraries disallow them.
> As such, we should generate JSON outputs without duplicate keys.
>
>
> Diffs
> -----
>
> src/master/http.cpp 3d7a624b78fd85a8d99bce609e37411ed660678c
>
> Diff: https://reviews.apache.org/r/43159/diff/
>
>
> Testing
> -------
>
> Verified that `make check` __with__ https://reviews.apache.org/r/43160/ + https://reviews.apache.org/r/43161/ and __without__ this patch breaks.
>
>
> Thanks,
>
> Michael Park
>
>
Re: Review Request 43159: Removed the duplicate "active" field in json
schema of `Framework`.
Posted by Klaus Ma <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43159/#review118166
-----------------------------------------------------------
Ship it!
Ship It!
- Klaus Ma
On Feb. 4, 2016, 7:11 a.m., Michael Park wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43159/
> -----------------------------------------------------------
>
> (Updated Feb. 4, 2016, 7:11 a.m.)
>
>
> Review request for mesos, Benjamin Hindman and Joris Van Remoortere.
>
>
> Bugs: MESOS-4582
> https://issues.apache.org/jira/browse/MESOS-4582
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The new `jsonify` library is a writer-based approach, and does not keep track of the fields that have been written out so far.
> The previous version of `summarize(framework)` and `model(framework)` had a duplicate `"active"` field which was de-duplicated since they simply get inserted to a `std::map`, overriding the previous value.
>
> In the `jsonify` case, this pattern results in duplicate key in the JSON output. Although the presence of duplicate keys is technically not __invalid__ according to the JSON specification, some JSON libraries disallow them.
> As such, we should generate JSON outputs without duplicate keys.
>
>
> Diffs
> -----
>
> src/master/http.cpp 3d7a624b78fd85a8d99bce609e37411ed660678c
>
> Diff: https://reviews.apache.org/r/43159/diff/
>
>
> Testing
> -------
>
> Verified that `make check` __with__ https://reviews.apache.org/r/43160/ + https://reviews.apache.org/r/43161/ and __without__ this patch breaks.
>
>
> Thanks,
>
> Michael Park
>
>
Re: Review Request 43159: Removed the duplicate "active" field in json
schema of `Framework`.
Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43159/#review119351
-----------------------------------------------------------
Ship it!
Ship It!
- Joris Van Remoortere
On Feb. 3, 2016, 11:11 p.m., Michael Park wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43159/
> -----------------------------------------------------------
>
> (Updated Feb. 3, 2016, 11:11 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Joris Van Remoortere.
>
>
> Bugs: MESOS-4582
> https://issues.apache.org/jira/browse/MESOS-4582
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The new `jsonify` library is a writer-based approach, and does not keep track of the fields that have been written out so far.
> The previous version of `summarize(framework)` and `model(framework)` had a duplicate `"active"` field which was de-duplicated since they simply get inserted to a `std::map`, overriding the previous value.
>
> In the `jsonify` case, this pattern results in duplicate key in the JSON output. Although the presence of duplicate keys is technically not __invalid__ according to the JSON specification, some JSON libraries disallow them.
> As such, we should generate JSON outputs without duplicate keys.
>
>
> Diffs
> -----
>
> src/master/http.cpp 3d7a624b78fd85a8d99bce609e37411ed660678c
>
> Diff: https://reviews.apache.org/r/43159/diff/
>
>
> Testing
> -------
>
> Verified that `make check` __with__ https://reviews.apache.org/r/43160/ + https://reviews.apache.org/r/43161/ and __without__ this patch breaks.
>
>
> Thanks,
>
> Michael Park
>
>