Last active
January 23, 2016 01:17
Revisions
-
martint revised this gist
Jan 23, 2016 . 1 changed file with 1 addition and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1 @@ See https://github.com/facebook/presto/wiki/HTTP-Protocol -
martint revised this gist
Jun 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,5 +9,5 @@ * The document will contain an `error` field if the query has failed -- this is how you distinguish between a successfully completed query and a failed query when there is no more `nextUri` link * If the response is an HTTP `503`, sleep 50-100ms and try again * Otherwise, if the response is anything other than an HTTP `200` with Content-Type `application/json`, then consider the query failed (this means something has gone wrong, for example, you might receive a `404` or `410`) * The document format is exactly the same for the POST response and the `nextUri` link response -- you might get `data` immediately as a response to the `POST`, or it might take many requests for a longer query
-
martint revised this gist
Jun 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ * If there is no `nextUri` link, then the query is finished (either successfully completed or failed) * Otherwise, keep following the `nextUri` link * The `status` field is only for displaying to humans as a hint about the query's state on the server. It is not in sync in the query state from the client's perspective and must not be used to determine whether the query is finished. * The document will contain an `error` field if the query has failed -- this is how you distinguish between a successfully completed query and a failed query when there is no more `nextUri` link * If the response is an HTTP `503`, sleep 50-100ms and try again * Otherwise, if the response is anything other than an HTTP `200` with Content-Type `application/json`, then consider the query failed (this means something has gone wrong, for example, you might receive a `404` or `410`) * The document format is exactly the same for the POST response and the `nextUri` link response — you might get `data` immediately as a response to the `POST`, or it might take many requests for a longer query -
martint revised this gist
Jun 6, 2015 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,13 @@ * Make a `POST` to `/v1/statement` with the query * You get back a JSON document that might contain a `nextUri` link * The document will contain `columns` if available * The document will contain `data` if available * The `columns` field will always be set if `data` is set (and usually earlier) * If there is no `nextUri` link, then the query is finished (either successfully completed or failed) * Otherwise, keep following the `nextUri` link * The `status` field is only for displaying to humans as a hint about the query's state on the server. It is not in sync in the query state from the client's perspective and must not be used to determine whether the query is finished. * The document will contain an `error` field if the query has failed — this is how you distinguish between a successfully completed query and a failed query when there is no more `nextUri` link * If the response is an HTTP `503`, sleep 50-100ms and try again * Otherwise, if the response is anything other than an HTTP `200` with Content-Type `application/json`, then consider the query failed (this means something has gone wrong, for example, you might receive a `404` or `410`) * The document format is exactly the same for the POST response and the `nextUri` link response — you might get `data` immediately as a response to the `POST`, or it might take many requests for a longer query
-
martint revised this gist
Nov 6, 2013 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ * Make a `POST` to `/v1/statement` with the query * You get back a JSON document that might contain a `next` link * The document will contain `columns` if available * The document will contain `data` if available * The `columns` field will always be set if `data` is set (and usually earlier) * If there is no `next` link, then the query is finished (either successfully completed or failed). The `status` field is for information only. It should not be used to determine whether the query is finished * Otherwise, keep following the `next` link * The document will contain an `error` field if the query has failed — this is how you distinguish between a successfully completed query and a failed query when there is no more `next` link * If the response is an HTTP `503`, sleep 50-100ms and try again * Otherwise, if the response is anything other than an HTTP `200` with Content-Type `application/json`, then consider the query failed (this means something has gone wrong, for example, you might receive a `404` or `410`) * The document format is exactly the same for the POST response and the `next` link response — you might get `data` immediately as a response to the `POST`, or it might take requests for a longer query
-
martint revised this gist
Nov 6, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,10 +3,10 @@ * The document will contain `columns` if available * The document will contain `data` if available * The `columns` field will always be set if "data" is set (and usually earlier) * If there is no `next` link, then the query is finished (either successfully completed or failed). The `status` field is for information only. It should not be used to determine whether the query is finished * Otherwise, keep following the `next` link * The document will contain an `error` field if the query has failed — this is how you distinguish between a successfully completed query and a failed query when there is no more `next` link * If the response is an HTTP 503, sleep 50-100ms and try again * Otherwise, if the response is anything other than an HTTP 200 with Content-Type `application/json`, then consider the query failed (this means something has gone wrong, for example, you might receive a 404 or 410) * The document format is exactly the same for the POST response and the `next` link response — you might get `data` immediately as a response to the POST, or it might take requests for a longer query
-
martint revised this gist
Nov 6, 2013 . 1 changed file with 9 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,12 @@ * Make a POST to /v1/statement with the query * You get back a JSON document that might contain a `next` link * The document will contain `columns` if available * The document will contain `data` if available * The `columns` field will always be set if "data" is set (and usually earlier) * If there is no "next" link, then the query is finished (either successfully completed or failed). The `status` field is for information only. It should not be used to determine whether the query is finished * Otherwise, keep following the `next` link * The document will contain an `error` field if the query has failed — this is how you distinguish between a successfully completed query and a failed query when there is no more `next` link * If the response is an HTTP 503, sleep 50-100ms and try again * Otherwise, if the response is anything other than an HTTP 200 with Content-Type "application/json", then consider the query failed (this means something has gone wrong, for example, you might receive a 404 or 410) * The document format is exactly the same for the POST response and the `next` link response — you might get `data` immediately as a response to the POST, or it might take requests for a longer query
-
martint renamed this gist
Nov 6, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
martint created this gist
Nov 6, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ * Make a POST to /v1/statement with the query * You get back a JSON document that might contain a "next" link * The document will contain "columns" if available * The document will contain "data" if available * The "columns" field will always be set if "data" is set (and usually earlier) * If there is no "next" link, then the query is finished (either successfully completed or failed) * Otherwise, keep following the "next" link * The document will contain an "error" field if the query has failed — this is how you distinguish between a successfully completed query and a failed query when there is no more "next" link * If the response is an HTTP 503, sleep 50-100ms and try again * Otherwise, if the response is anything other than an HTTP 200 with Content-Type "application/json", then consider the query failed (this means something has gone wrong, for example, you might receive a 404 or 410) * The document format is exactly the same for the POST response and the "next" link response — you might get "data" immediately as a response to the POST, or it might take requests for a longer query