You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Vitalyi Brodetskyi <vb...@hortonworks.com> on 2014/03/12 13:41:10 UTC
Review Request 19111: API proxy returns "204 No Content" if the underlying
call takes more than a few seconds
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19111/
-----------------------------------------------------------
Review request for Ambari, Dmitro Lisnichenko and Nate Cole.
Bugs: AMBARI-5047
https://issues.apache.org/jira/browse/AMBARI-5047
Repository: ambari
Description
-------
It looks like the API proxy behaves in an expected manner (returns HTTP code 204 with no response) when the underlying API call being proxied does not return in a timely manner.
It seems like this threshold is around 3 seconds.
When I was testing Falcon, I kept getting 204 from Ambari's API proxy, but the underlying API calls were successful when directly run against Falcon.
3 seconds is a bit aggressive. Perhaps we can pass a parameter to change the timeout value in milliseconds, with a hard limit on 15 seconds or so?
Also, returning 204 is not ideal. We should return
{error: "400", message: "Connection timed out"}
or something like that (I didn't check the actual format that we use... just an example), so that the API client can perform appropriate error handling.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 98a7e44
ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 7cbefef
Diff: https://reviews.apache.org/r/19111/diff/
Testing
-------
-------------------------------------------------------
T E S T S
-------------------------------------------------------
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Listening for transport dt_socket at address: 5007
Running org.apache.ambari.server.proxy.ProxyServiceTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.382 sec
Results :
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
Thanks,
Vitalyi Brodetskyi
Re: Review Request 19111: API proxy returns "204 No Content" if the
underlying call takes more than a few seconds
Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19111/#review36918
-----------------------------------------------------------
Ship it!
Ship It!
- Dmitro Lisnichenko
On March 12, 2014, 12:41 p.m., Vitalyi Brodetskyi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19111/
> -----------------------------------------------------------
>
> (Updated March 12, 2014, 12:41 p.m.)
>
>
> Review request for Ambari, Dmitro Lisnichenko and Nate Cole.
>
>
> Bugs: AMBARI-5047
> https://issues.apache.org/jira/browse/AMBARI-5047
>
>
> Repository: ambari
>
>
> Description
> -------
>
> It looks like the API proxy behaves in an expected manner (returns HTTP code 204 with no response) when the underlying API call being proxied does not return in a timely manner.
> It seems like this threshold is around 3 seconds.
> When I was testing Falcon, I kept getting 204 from Ambari's API proxy, but the underlying API calls were successful when directly run against Falcon.
> 3 seconds is a bit aggressive. Perhaps we can pass a parameter to change the timeout value in milliseconds, with a hard limit on 15 seconds or so?
> Also, returning 204 is not ideal. We should return
> {error: "400", message: "Connection timed out"}
>
> or something like that (I didn't check the actual format that we use... just an example), so that the API client can perform appropriate error handling.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 98a7e44
> ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 7cbefef
>
> Diff: https://reviews.apache.org/r/19111/diff/
>
>
> Testing
> -------
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Listening for transport dt_socket at address: 5007
> Running org.apache.ambari.server.proxy.ProxyServiceTest
> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.382 sec
>
> Results :
>
> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
>
>
> Thanks,
>
> Vitalyi Brodetskyi
>
>
Re: Review Request 19111: API proxy returns "204 No Content" if the
underlying call takes more than a few seconds
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19111/#review36920
-----------------------------------------------------------
Ship it!
Ship It!
- Nate Cole
On March 12, 2014, 8:41 a.m., Vitalyi Brodetskyi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19111/
> -----------------------------------------------------------
>
> (Updated March 12, 2014, 8:41 a.m.)
>
>
> Review request for Ambari, Dmitro Lisnichenko and Nate Cole.
>
>
> Bugs: AMBARI-5047
> https://issues.apache.org/jira/browse/AMBARI-5047
>
>
> Repository: ambari
>
>
> Description
> -------
>
> It looks like the API proxy behaves in an expected manner (returns HTTP code 204 with no response) when the underlying API call being proxied does not return in a timely manner.
> It seems like this threshold is around 3 seconds.
> When I was testing Falcon, I kept getting 204 from Ambari's API proxy, but the underlying API calls were successful when directly run against Falcon.
> 3 seconds is a bit aggressive. Perhaps we can pass a parameter to change the timeout value in milliseconds, with a hard limit on 15 seconds or so?
> Also, returning 204 is not ideal. We should return
> {error: "400", message: "Connection timed out"}
>
> or something like that (I didn't check the actual format that we use... just an example), so that the API client can perform appropriate error handling.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 98a7e44
> ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 7cbefef
>
> Diff: https://reviews.apache.org/r/19111/diff/
>
>
> Testing
> -------
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Listening for transport dt_socket at address: 5007
> Running org.apache.ambari.server.proxy.ProxyServiceTest
> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.382 sec
>
> Results :
>
> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
>
>
> Thanks,
>
> Vitalyi Brodetskyi
>
>