[ 
https://issues.apache.org/jira/browse/MESOS-5567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15320854#comment-15320854
 ] 

Vinod Kone commented on MESOS-5567:
-----------------------------------

There is no "\n" at the end of the chunk as you said. Maybe the doc is not 
clear. Would you mind sending a PR/review to fix it? I'll be happy to shepherd 
and commit it.

> Scheduler HTTP API cuts JSON buffers
> ------------------------------------
>
>                 Key: MESOS-5567
>                 URL: https://issues.apache.org/jira/browse/MESOS-5567
>             Project: Mesos
>          Issue Type: Bug
>          Components: HTTP API
>    Affects Versions: 0.28.1
>         Environment: Ubuntu 14.04 latest
>            Reporter: Tobias Mueller
>
> According to the docs at 
> http://mesos.apache.org/documentation/latest/scheduler-http-api/ I assumed 
> that the message format would only contain "full" (meaning parseable) JSON 
> messages. In fact, I'm partially seeing splitted JSONs, where the next chunk 
> is just continuing the first part:
> {noformat}
> 1983
> {"offers":{"offers":[{"agent_id":{"value":"2a0fb93e-6125-4bcd-b19a-0be41b9d7bbe-S0"},"framework_id":{"value":"f7c62096-7fd3-446b-98df-14c991dc4f7e-0020"},"hostname":"172.17.10.102","id":{"value":"f7c62096-7fd3-446b-98df-14c991dc4f7e-O1055"},"resources":[{"name":"cpus","role":"*","scalar":{"value":2.0},"type":"SCALAR"},{"name":"mem","role":"*","scalar":{"value":1985.0},"type":"SCALAR"},{"name":"disk","role":"*","scalar":{"value":35164.0},"type":"SCALAR"},{"name":"ports","ranges":{"range":[{"begin":31000,"end":32000}]},"role":"*","type":"RANGES"}],"url":{"address":{"hostname":"172.17.10.102","ip":"172.17.10.102","port":5051},"path":"\/slave(1)","scheme":"http"}},{"agent_id":{"value":"2a0fb93e-6125-4bcd-b19a-0be41b9d7bbe-S2"},"framework_id":{"value":"f7c62096-7fd3-446b-98df-14c991dc4f7e-0020"},"hostname":"172.17.10.101","id":{"value":"f7c62096-7fd3-446b-98df-14c991dc4f7e-O1056"},"resources":[{"name":"cpus","role":"*","scalar":{"value":2.0},"type":"SCALAR"},{"name":"mem","role":"*","scalar":{"value":1985.0},"type":"SCALAR"},{"name":"disk","role":"*","scalar":{"value":35164.0},"type":"SCALAR"},{"name":"ports","ranges":{"range":[{"begin":31000,"end":32000}]},"role":"*","type":"RANGES"}],"url":{"address":{"hostname":"172.17.10.101","ip":"172.17.10.101","port":5051},"path":"\/slave(1)","scheme":"http"}},{"agent_id":{"value":"2a0fb93e-6125-4bcd-b19a-0be41b9d7bbe-S1"},"framework_id":{"value":"f7c62096-7fd3-446b-98df-14c991dc
> 4f7e-0020"},"hostname":"172.17.10.103","id":{"value":"f7c62096-7fd3-446b-98df-14c991dc4f7e-O1057"},"resources":[{"name":"cpus","role":"*","scalar":{"value":2.0},"type":"SCALAR"},{"name":"mem","role":"*","scalar":{"value":1985.0},"type":"SCALAR"},{"name":"disk","role":"*","scalar":{"value":35164.0},"type":"SCALAR"},{"name":"ports","ranges":{"range":[{"begin":31000,"end":32000}]},"role":"*","type":"RANGES"}],"url":{"address":{"hostname":"172.17.10.103","ip":"172.17.10.103","port":5051},"path":"\/slave(1)","scheme":"http"}}]},"type":"OFFERS"}
> {noformat}
> I use the standard Node.js (4.4.5) http-client.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to