You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Rares Vernica (JIRA)" <ji...@apache.org> on 2016/02/11 21:53:18 UTC

[jira] [Created] (SPARK-13287) Standalone REST API throttling?

Rares Vernica created SPARK-13287:
-------------------------------------

             Summary: Standalone REST API throttling?
                 Key: SPARK-13287
                 URL: https://issues.apache.org/jira/browse/SPARK-13287
             Project: Spark
          Issue Type: Bug
          Components: Web UI
    Affects Versions: 1.6.0
            Reporter: Rares Vernica
            Priority: Minor


I am using the REST API provided by Spark Standalone mode to check on jobs. It turns out that if I don't pause between requests the server will redirect me to the server homepage instead of offering the requested information.

Here is a simple test to prove this:
{code:JavaScript}
$ curl --silent http://localhost:8080/api/v1/applications/app-20160211003526-0037/jobs | head -2 ; curl --silent http://localhost:8080/api/v1/applications/app-20160211003526-0037/jobs | head -2
[ {
  "jobId" : 0,
<!DOCTYPE html><html>
      <head>
{code}

I am requesting the same information about one application twice using {{curl}}. I print the first two lines from each response. The requests are made immediately one after another. The first two lines are from the first request, the last two lines are from the second request. Again, the request URLs are identical. The response from the second request is identical with the homepage you get from http://localhost:8080/

If I insert a {{sleep 1}} between the two {{curl}} commands, both work fine. For smaller time outs, like {{sleep .8}} it does not work correctly.

I am not sure if this is intentional or a bug.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org