| <!DOCTYPE html> |
| <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <title>REST API - Apache Gearpump(incubating)</title> |
| |
| |
| <link rel="shortcut icon" href="../../img/favicon.ico"> |
| |
| |
| <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'> |
| |
| <link rel="stylesheet" href="../../css/theme.css" type="text/css" /> |
| <link rel="stylesheet" href="../../css/theme_extra.css" type="text/css" /> |
| <link rel="stylesheet" href="../../css/highlight.css"> |
| |
| |
| <script> |
| // Current page data |
| var mkdocs_page_name = "REST API"; |
| </script> |
| |
| <script src="../../js/jquery-2.1.1.min.js"></script> |
| <script src="../../js/modernizr-2.8.3.min.js"></script> |
| <script type="text/javascript" src="../../js/highlight.pack.js"></script> |
| <script src="../../js/theme.js"></script> |
| |
| |
| </head> |
| |
| <body class="wy-body-for-nav" role="document"> |
| |
| <div class="wy-grid-for-nav"> |
| |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav"> |
| <div class="wy-side-nav-search"> |
| <a href="../../index.html" class="icon icon-home"> Apache Gearpump(incubating)</a> |
| <div role="search"> |
| <form id ="rtd-search-form" class="wy-form" action="../../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| </form> |
| </div> |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| <ul class="current"> |
| |
| <li> |
| <li class="toctree-l1 "> |
| <a class="" href="../../index.html">Overview</a> |
| |
| </li> |
| <li> |
| |
| <li> |
| <ul class="subnav"> |
| <li><span>Introduction</span></li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../introduction/submit-your-1st-application/index.html">Submit Your 1st Application</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../introduction/commandline/index.html">Client Command Line</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../introduction/basic-concepts/index.html">Basic Concepts</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../introduction/features/index.html">Technical Highlights</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../introduction/message-delivery/index.html">Reliable Message Delivery</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../introduction/performance-report/index.html">Performance</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../introduction/gearpump-internals/index.html">Gearpump Internals</a> |
| |
| </li> |
| |
| |
| </ul> |
| <li> |
| |
| <li> |
| <ul class="subnav"> |
| <li><span>Deployment</span></li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-local/index.html">Local Mode</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-standalone/index.html">Standalone Mode</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-yarn/index.html">YARN Mode</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-docker/index.html">Docker Mode</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-ui-authentication/index.html">UI Authentication</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-ha/index.html">High Availability</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-msg-delivery/index.html">Reliable Message Delivery</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-configuration/index.html">Configuration</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-resource-isolation/index.html">Resource Isolation</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/deployment-security/index.html">YARN Security Guide</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/get-gearpump-distribution/index.html">How to Get Your Gearpump Distribution</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../deployment/hardware-requirement/index.html">Hardware Requirement</a> |
| |
| </li> |
| |
| |
| </ul> |
| <li> |
| |
| <li> |
| <ul class="subnav"> |
| <li><span>Programming Guide</span></li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../dev-write-1st-app/index.html">Write Your 1st App</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../dev-custom-serializer/index.html">Customized Message Passing</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../dev-connectors/index.html">Gearpump Connectors</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../dev-storm/index.html">Storm Compatibility</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../dev-ide-setup/index.html">IDE Setup</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../dev-non-streaming-example/index.html">Non Streaming Examples</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 current"> |
| <a class="current" href="index.html">REST API</a> |
| |
| <ul> |
| |
| <li class="toctree-l3"><a href="#authentication">Authentication.</a></li> |
| |
| <li><a class="toctree-l4" href="#how-to-disable-authentication">How to disable Authentication</a></li> |
| |
| <li><a class="toctree-l4" href="#how-to-authenticate-if-authentication-is-enabled">How to authenticate if Authentication is enabled.</a></li> |
| |
| |
| <li class="toctree-l3"><a href="#query-version">Query version</a></li> |
| |
| <li><a class="toctree-l4" href="#get-version">GET version</a></li> |
| |
| |
| <li class="toctree-l3"><a href="#master-service">Master Service</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10master">GET api/v1.0/master</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10masterapplist">GET api/v1.0/master/applist</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10masterworkerlist">GET api/v1.0/master/workerlist</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10masterconfig">GET api/v1.0/master/config</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10mastermetricsquery_pathreadlatesttruefalse">GET api/v1.0/master/metrics/<query_path>?readLatest=<true|false></a></li> |
| |
| <li><a class="toctree-l4" href="#post-apiv10mastersubmitapp">POST api/v1.0/master/submitapp</a></li> |
| |
| <li><a class="toctree-l4" href="#post-apiv10mastersubmitstormapp">POST api/v1.0/master/submitstormapp</a></li> |
| |
| |
| <li class="toctree-l3"><a href="#worker-service">Worker service</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10workerworkerid">GET api/v1.0/worker/<workerId></a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10workerworkeridconfig">GET api/v1.0/worker/<workerId>/config</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10workerworkeridmetricsquery_pathreadlatesttruefalse">GET api/v1.0/worker/<workerId>/metrics/<query_path>?readLatest=<true|false></a></li> |
| |
| |
| <li class="toctree-l3"><a href="#supervisor-service">Supervisor Service</a></li> |
| |
| <li><a class="toctree-l4" href="#post-apiv10supervisorstatus">POST api/v1.0/supervisor/status</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10supervisor">GET api/v1.0/supervisor</a></li> |
| |
| <li><a class="toctree-l4" href="#post-apiv10supervisoraddworkerworker-count">POST api/v1.0/supervisor/addworker/<worker-count></a></li> |
| |
| <li><a class="toctree-l4" href="#post-apiv10supervisorremoveworkerworker-id">POST api/v1.0/supervisor/removeworker/<worker-id></a></li> |
| |
| |
| <li class="toctree-l3"><a href="#application-service">Application service</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10appmasterappiddetailtruefalse">GET api/v1.0/appmaster/<appId>?detail=<true|false></a></li> |
| |
| <li><a class="toctree-l4" href="#delete-apiv10appmasterappid">DELETE api/v1.0/appmaster/<appId></a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10appmasterappidstallingtasks">GET api/v1.0/appmaster/<appId>/stallingtasks</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10appmasterappidconfig">GET api/v1.0/appmaster/<appId>/config</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10appmasterappidmetricsquery_pathreadlatesttruefalseaggregatoraggregator_class">GET api/v1.0/appmaster/<appId>/metrics/<query_path>?readLatest=<true|false>&aggregator=<aggregator_class></a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10appmasterappiderrors">GET api/v1.0/appmaster/<appId>/errors</a></li> |
| |
| <li><a class="toctree-l4" href="#post-apiv10appmasterappidrestart">POST api/v1.0/appmaster/<appId>/restart</a></li> |
| |
| |
| <li class="toctree-l3"><a href="#executor-service">Executor Service</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10appmasterappidexecutorexecutoridconfig">GET api/v1.0/appmaster/<appId>/executor/<executorid>/config</a></li> |
| |
| <li><a class="toctree-l4" href="#get-apiv10appmasterappidexecutorexecutorid">GET api/v1.0/appmaster/<appId>/executor/<executorid></a></li> |
| |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../api/scala/index.html">Scala API</a> |
| |
| </li> |
| |
| |
| |
| <li class="toctree-l1 "> |
| <a class="" href="../../api/java/index.html">Java API</a> |
| |
| </li> |
| |
| |
| </ul> |
| <li> |
| |
| </ul> |
| </div> |
| |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| |
| |
| <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="../../index.html">Apache Gearpump(incubating)</a> |
| </nav> |
| |
| |
| <div class="wy-nav-content"> |
| <div class="rst-content"> |
| <div role="navigation" aria-label="breadcrumbs navigation"> |
| <ul class="wy-breadcrumbs"> |
| <li><a href="../../index.html">Docs</a> »</li> |
| |
| |
| |
| <li>Programming Guide »</li> |
| |
| |
| |
| <li>REST API</li> |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="https://github.com/apache/incubator-gearpump" class="icon icon-github"> Edit on GitHub</a> |
| |
| |
| </li> |
| </ul> |
| <hr/> |
| </div> |
| <div role="main"> |
| <div class="section"> |
| |
| <h2 id="authentication">Authentication.</h2> |
| <p>For all REST API calls, We need authentication by default. If you don't want authentication, you can disable them.</p> |
| <h3 id="how-to-disable-authentication">How to disable Authentication</h3> |
| <p>To disable Authentication, you can set <code>gearpump-ui.gearpump.ui-security.authentication-enabled = false</code> |
| in gear.conf, please check <a href="../../deployment/deployment-ui-authentication">UI Authentication</a> for details.</p> |
| <h3 id="how-to-authenticate-if-authentication-is-enabled">How to authenticate if Authentication is enabled.</h3> |
| <h4 id="for-user-password-based-authentication">For User-Password based authentication</h4> |
| <p>If Authentication is enabled, then you need to login before calling REST API.</p> |
| <pre class="codehilite"><code class="language-bash">curl -X POST --data username=admin --data password=admin --cookie-jar outputAuthenticationCookie.txt http://127.0.0.1:8090/login</code></pre> |
| |
| |
| <p>This will use default user "admin:admin" to login, and store the authentication cookie to file outputAuthenticationCookie.txt.</p> |
| <p>In All subsequent Rest API calls, you need to add the authentication cookie. For example</p> |
| <pre class="codehilite"><code class="language-bash">curl --cookie outputAuthenticationCookie.txt http://127.0.0.1/api/v1.0/master</code></pre> |
| |
| |
| <p>for more information, please check <a href="../../deployment/deployment-ui-authentication">UI Authentication</a>.</p> |
| <h4 id="for-oauth2-based-authentication">For OAuth2 based authentication</h4> |
| <p>For OAuth2 based authentication, it requires you to have an access token in place.</p> |
| <p>Different OAuth2 service provider have different way to return an access token.</p> |
| <p><strong>For Google</strong>, you can refer to <a href="https://developers.google.com/identity/protocols/OAuth2">OAuth Doc</a>.</p> |
| <p><strong>For CloudFoundry UAA</strong>, you can use the uaac command to get the access token.</p> |
| <pre class="codehilite"><code class="language-bash">$ uaac target http://login.gearpump.gotapaas.eu/ |
| $ uaac token get <user_email_address> |
| |
| ### Find access token |
| $ uaac context |
| |
| [0]*[http://login.gearpump.gotapaas.eu] |
| |
| [0]*[<user_email_address>] |
| user_id: 34e33a79-42c6-479b-a8c1-8c471ff027fb |
| client_id: cf |
| token_type: bearer |
| access_token: eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI |
| expires_in: 599 |
| scope: password.write openid cloud_controller.write cloud_controller.read |
| jti: 74ea49e4-1001-4757-9f8d-a66e52a27557</code></pre> |
| |
| |
| <p>For more information on uaac, please check <a href="https://docs.cloudfoundry.org/adminguide/uaa-user-management.html">UAAC guide</a></p> |
| <p>Now, we have the access token, then let's login to Gearpump UI server with this access token:</p> |
| <pre class="codehilite"><code class="language-bash">## Please replace cloudfoundryuaa with actual OAuth2 service name you have configured in gear.conf |
| curl -X POST --data accesstoken=eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI --cookie-jar outputAuthenticationCookie.txt http://127.0.0.1:8090/login/oauth2/cloudfoundryuaa/accesstoken</code></pre> |
| |
| |
| <p>This will use user <code>user_email_address</code> to login, and store the authentication cookie to file outputAuthenticationCookie.txt.</p> |
| <p>In All subsequent Rest API calls, you need to add the authentication cookie. For example</p> |
| <pre class="codehilite"><code class="language-bash">curl --cookie outputAuthenticationCookie.txt http://127.0.0.1/api/v1.0/master</code></pre> |
| |
| |
| <p><strong>NOTE:</strong> You can default the default permission level for OAuth2 user. for more information, |
| please check <a href="../../deployment/deployment-ui-authentication">UI Authentication</a>.</p> |
| <h2 id="query-version">Query version</h2> |
| <h3 id="get-version">GET version</h3> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/version</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-bash">0.8.3</code></pre> |
| |
| |
| <h2 id="master-service">Master Service</h2> |
| <h3 id="get-apiv10master">GET api/v1.0/master</h3> |
| <p>Get information of masters</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/master</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "masterDescription": { |
| "leader":{"host":"master@127.0.0.1","port":3000}, |
| "cluster":[{"host":"127.0.0.1","port":3000}] |
| "aliveFor": "642941", |
| "logFile": "/Users/foobar/gearpump/logs", |
| "jarStore": "jarstore/", |
| "masterStatus": "synced", |
| "homeDirectory": "/Users/foobar/gearpump" |
| } |
| }</code></pre> |
| |
| |
| <h3 id="get-apiv10masterapplist">GET api/v1.0/master/applist</h3> |
| <p>Query information of all applications</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/master/applist</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "appMasters": [ |
| { |
| "status": "active", |
| "appId": 1, |
| "appName": "wordCount", |
| "appMasterPath": "akka.tcp://app1-executor-1@127.0.0.1:52212/user/daemon/appdaemon1/$c", |
| "workerPath": "akka.tcp://master@127.0.0.1:3000/user/Worker0", |
| "submissionTime": "1450758114766", |
| "startTime": "1450758117294", |
| "user": "lisa" |
| } |
| ] |
| }</code></pre> |
| |
| |
| <h3 id="get-apiv10masterworkerlist">GET api/v1.0/master/workerlist</h3> |
| <p>Query information of all workers</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/master/workerlist</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">[ |
| { |
| "workerId": "1", |
| "state": "active", |
| "actorPath": "akka.tcp://master@127.0.0.1:3000/user/Worker0", |
| "aliveFor": "431565", |
| "logFile": "logs/", |
| "executors": [ |
| { |
| "appId": 1, |
| "executorId": -1, |
| "slots": 1 |
| }, |
| { |
| "appId": 1, |
| "executorId": 0, |
| "slots": 1 |
| } |
| ], |
| "totalSlots": 1000, |
| "availableSlots": 998, |
| "homeDirectory": "/usr/lisa/gearpump/", |
| "jvmName": "11788@lisa" |
| }, |
| { |
| "workerId": "0", |
| "state": "active", |
| "actorPath": "akka.tcp://master@127.0.0.1:3000/user/Worker1", |
| "aliveFor": "431546", |
| "logFile": "logs/", |
| "executors": [ |
| { |
| "appId": 1, |
| "executorId": 1, |
| "slots": 1 |
| } |
| ], |
| "totalSlots": 1000, |
| "availableSlots": 999, |
| "homeDirectory": "/usr/lisa/gearpump/", |
| "jvmName": "11788@lisa" |
| } |
| ]</code></pre> |
| |
| |
| <h3 id="get-apiv10masterconfig">GET api/v1.0/master/config</h3> |
| <p>Get the configuration of all masters</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/master/config</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "extensions": [ |
| "akka.contrib.datareplication.DataReplication$" |
| ] |
| "akka": { |
| "loglevel": "INFO" |
| "log-dead-letters": "off" |
| "log-dead-letters-during-shutdown": "off" |
| "actor": { |
| ## Master forms a akka cluster |
| "provider": "akka.cluster.ClusterActorRefProvider" |
| } |
| "cluster": { |
| "roles": ["master"] |
| "auto-down-unreachable-after": "15s" |
| } |
| "remote": { |
| "log-remote-lifecycle-events": "off" |
| } |
| } |
| }</code></pre> |
| |
| |
| <h3 id="get-apiv10mastermetricsquery_pathreadlatesttruefalse">GET api/v1.0/master/metrics/<query_path>?readLatest=<true|false></h3> |
| <p>Get the master node metrics.</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/master/metrics/master?readLatest=true</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-bash">{ |
| "path" |
| : |
| "master", "metrics" |
| : |
| [{ |
| "time": "1450758725070", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "master:memory.heap.used", "value": "59764272"} |
| }, { |
| "time": "1450758725070", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "master:thread.daemon.count", "value": "18"} |
| }, { |
| "time": "1450758725070", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "master:memory.total.committed", |
| "value": "210239488" |
| } |
| }, { |
| "time": "1450758725070", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "master:memory.heap.max", "value": "880017408"} |
| }, { |
| "time": "1450758725070", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "master:memory.total.max", "value": "997457920"} |
| }, { |
| "time": "1450758725070", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "master:memory.heap.committed", |
| "value": "179830784" |
| } |
| }, { |
| "time": "1450758725070", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "master:memory.total.used", "value": "89117352"} |
| }, { |
| "time": "1450758725070", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "master:thread.count", "value": "28"} |
| }] |
| }</code></pre> |
| |
| |
| <h3 id="post-apiv10mastersubmitapp">POST api/v1.0/master/submitapp</h3> |
| <p>Submit a streaming job jar to Gearpump cluster. It functions like command line</p> |
| <pre class="codehilite"><code class="language-bash">gear app -jar xx.jar -conf yy.conf -executors 1 <command line arguments></code></pre> |
| |
| |
| <p>Required MIME type: "multipart/form-data"</p> |
| <p>Required post form fields:</p> |
| <ol> |
| <li>field name "jar", job jar file.</li> |
| </ol> |
| <p>Optional post form fields:</p> |
| <ol> |
| <li>"configfile", configuration file, in UTF8 format.</li> |
| <li>"configstring", text body of configuration file, in UTF8 format.</li> |
| <li>"executorcount", The count of JVM process to start across the cluster for this application job</li> |
| <li>"args", command line arguments for this job jar.</li> |
| </ol> |
| <p>Example html:</p> |
| <pre class="codehilite"><code class="language-html"><form id="submitapp" action="http://127.0.0.1:8090/api/v1.0/master/submitapp" |
| method="POST" enctype="multipart/form-data"> |
| |
| Job Jar (*.jar) [Required]: <br/> |
| <input type="file" name="jar"/> <br/> <br/> |
| |
| Config file (*.conf) [Optional]: <br/> |
| <input type="file" name="configfile"/> <br/> <br/> |
| |
| Config String, Config File in string format. [Optional]: <br/> |
| <input type="text" name="configstring" value="a.b.c.d=1"/> <br/><br/> |
| |
| Executor count (integer, how many process to start for this streaming job) [Optional]: <br/> |
| <input type="text" name="executorcount" value="1"/> <br/><br/> |
| |
| Application arguments (String) [Optional]: <br/> |
| <input type="text" name="args" value=""/> <br/><br/> |
| |
| <input type="submit" value="Submit"/> |
| |
| </table> |
| |
| </form></code></pre> |
| |
| |
| <h3 id="post-apiv10mastersubmitstormapp">POST api/v1.0/master/submitstormapp</h3> |
| <p>Submit a storm jar to Gearpump cluster. It functions like command line</p> |
| <pre class="codehilite"><code class="language-bash">storm app -jar xx.jar -conf yy.yaml <command line arguments></code></pre> |
| |
| |
| <p>Required MIME type: "multipart/form-data"</p> |
| <p>Required post form fields:</p> |
| <ol> |
| <li>field name "jar", job jar file.</li> |
| </ol> |
| <p>Optional post form fields:</p> |
| <ol> |
| <li>"configfile", .yaml configuration file, in UTF8 format.</li> |
| <li>"args", command line arguments for this job jar.</li> |
| </ol> |
| <p>Example html:</p> |
| <pre class="codehilite"><code class="language-html"><form id="submitstormapp" action="http://127.0.0.1:8090/api/v1.0/master/submitstormapp" |
| method="POST" enctype="multipart/form-data"> |
| |
| Job Jar (*.jar) [Required]: <br/> |
| <input type="file" name="jar"/> <br/> <br/> |
| |
| Config file (*.yaml) [Optional]: <br/> |
| <input type="file" name="configfile"/> <br/> <br/> |
| |
| Application arguments (String) [Optional]: <br/> |
| <input type="text" name="args" value=""/> <br/><br/> |
| |
| <input type="submit" value="Submit"/> |
| |
| </table> |
| |
| </form></code></pre> |
| |
| |
| <h2 id="worker-service">Worker service</h2> |
| <h3 id="get-apiv10workerworkerid">GET api/v1.0/worker/<workerId></h3> |
| <p>Query worker information.</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/worker/0</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "workerId": "0", |
| "state": "active", |
| "actorPath": "akka.tcp://master@127.0.0.1:3000/user/Worker1", |
| "aliveFor": "831069", |
| "logFile": "logs/", |
| "executors": [ |
| { |
| "appId": 1, |
| "executorId": 1, |
| "slots": 1 |
| } |
| ], |
| "totalSlots": 1000, |
| "availableSlots": 999, |
| "homeDirectory": "/usr/lisa/gearpump/", |
| "jvmName": "11788@lisa" |
| }</code></pre> |
| |
| |
| <h3 id="get-apiv10workerworkeridconfig">GET api/v1.0/worker/<workerId>/config</h3> |
| <p>Query worker config</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/worker/0/config</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "extensions": [ |
| "akka.contrib.datareplication.DataReplication$" |
| ] |
| "akka": { |
| "loglevel": "INFO" |
| "log-dead-letters": "off" |
| "log-dead-letters-during-shutdown": "off" |
| "actor": { |
| ## Master forms a akka cluster |
| "provider": "akka.cluster.ClusterActorRefProvider" |
| } |
| "cluster": { |
| "roles": ["master"] |
| "auto-down-unreachable-after": "15s" |
| } |
| "remote": { |
| "log-remote-lifecycle-events": "off" |
| } |
| } |
| }</code></pre> |
| |
| |
| <h3 id="get-apiv10workerworkeridmetricsquery_pathreadlatesttruefalse">GET api/v1.0/worker/<workerId>/metrics/<query_path>?readLatest=<true|false></h3> |
| <p>Get the worker node metrics.</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/worker/0/metrics/worker?readLatest=true</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "path" |
| : |
| "worker", "metrics" |
| : |
| [{ |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.total.used", |
| "value": "152931440" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker1:thread.daemon.count", "value": "18"} |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.heap.used", |
| "value": "123139640" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.total.max", |
| "value": "997457920" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.heap.committed", |
| "value": "179830784" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker0:thread.count", "value": "28"} |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker0:memory.heap.max", "value": "880017408"} |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker1:memory.heap.max", "value": "880017408"} |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.total.committed", |
| "value": "210239488" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.total.used", |
| "value": "152931440" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker1:thread.count", "value": "28"} |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.total.max", |
| "value": "997457920" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.heap.committed", |
| "value": "179830784" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.total.committed", |
| "value": "210239488" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker0:thread.daemon.count", "value": "18"} |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.heap.used", |
| "value": "123139640" |
| } |
| }] |
| }</code></pre> |
| |
| |
| <h2 id="supervisor-service">Supervisor Service</h2> |
| <p>Supervisor service allows user to add or remove a worker machine.</p> |
| <h3 id="post-apiv10supervisorstatus">POST api/v1.0/supervisor/status</h3> |
| <p>Query whether the supervisor service is enabled. If Supervisor service is disabled, you are not allowed to use API like addworker/removeworker.</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl -X POST [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/supervisor/status</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{"enabled":true}</code></pre> |
| |
| |
| <h3 id="get-apiv10supervisor">GET api/v1.0/supervisor</h3> |
| <p>Get the supervisor path</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/supervisor</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{path: "supervisor actor path"}</code></pre> |
| |
| |
| <h3 id="post-apiv10supervisoraddworkerworker-count">POST api/v1.0/supervisor/addworker/<worker-count></h3> |
| <p>Add workerCount new workers in the cluster. It will use the low level resource scheduler like |
| YARN to start new containers and then boot Gearpump worker process.</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl -X POST [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/supervisor/addworker/2</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{success: true}</code></pre> |
| |
| |
| <h3 id="post-apiv10supervisorremoveworkerworker-id">POST api/v1.0/supervisor/removeworker/<worker-id></h3> |
| <p>Remove single worker instance by specifying a worker Id.</p> |
| <p>*<em>NOTE:</em> Use with caution!</p> |
| <p><strong>NOTE:</strong> All executors JVMs under this worker JVM will also be destroyed. It will trigger failover for all |
| applications that have executor started under this worker.</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl -X POST [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/supervisor/removeworker/3</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{success: true}</code></pre> |
| |
| |
| <h2 id="application-service">Application service</h2> |
| <h3 id="get-apiv10appmasterappiddetailtruefalse">GET api/v1.0/appmaster/<appId>?detail=<true|false></h3> |
| <p>Query information of an specific application of Id appId</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/appmaster/1?detail=true</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "appId": 1, |
| "appName": "wordCount", |
| "processors": [ |
| [ |
| 0, |
| { |
| "id": 0, |
| "taskClass": "org.apache.gearpump.streaming.examples.wordcount.Split", |
| "parallelism": 1, |
| "description": "", |
| "taskConf": { |
| "_config": {} |
| }, |
| "life": { |
| "birth": "0", |
| "death": "9223372036854775807" |
| }, |
| "executors": [ |
| 1 |
| ], |
| "taskCount": [ |
| [ |
| 1, |
| { |
| "count": 1 |
| } |
| ] |
| ] |
| } |
| ], |
| [ |
| 1, |
| { |
| "id": 1, |
| "taskClass": "org.apache.gearpump.streaming.examples.wordcount.Sum", |
| "parallelism": 1, |
| "description": "", |
| "taskConf": { |
| "_config": {} |
| }, |
| "life": { |
| "birth": "0", |
| "death": "9223372036854775807" |
| }, |
| "executors": [ |
| 0 |
| ], |
| "taskCount": [ |
| [ |
| 0, |
| { |
| "count": 1 |
| } |
| ] |
| ] |
| } |
| ] |
| ], |
| "processorLevels": [ |
| [ |
| 0, |
| 0 |
| ], |
| [ |
| 1, |
| 1 |
| ] |
| ], |
| "dag": { |
| "vertexList": [ |
| 0, |
| 1 |
| ], |
| "edgeList": [ |
| [ |
| 0, |
| "org.apache.gearpump.partitioner.HashPartitioner", |
| 1 |
| ] |
| ] |
| }, |
| "actorPath": "akka.tcp://app1-executor-1@127.0.0.1:52212/user/daemon/appdaemon1/$c/appmaster", |
| "clock": "1450759382430", |
| "executors": [ |
| { |
| "executorId": 0, |
| "executor": "akka.tcp://app1system0@127.0.0.1:52240/remote/akka.tcp/app1-executor-1@127.0.0.1:52212/user/daemon/appdaemon1/$c/appmaster/executors/0#-1554950276", |
| "workerId": "1", |
| "status": "active" |
| }, |
| { |
| "executorId": 1, |
| "executor": "akka.tcp://app1system1@127.0.0.1:52241/remote/akka.tcp/app1-executor-1@127.0.0.1:52212/user/daemon/appdaemon1/$c/appmaster/executors/1#928082134", |
| "workerId": "0", |
| "status": "active" |
| }, |
| { |
| "executorId": -1, |
| "executor": "akka://app1-executor-1/user/daemon/appdaemon1/$c/appmaster", |
| "workerId": "1", |
| "status": "active" |
| } |
| ], |
| "startTime": "1450758117306", |
| "uptime": "1268472", |
| "user": "lisa", |
| "homeDirectory": "/usr/lisa/gearpump/", |
| "logFile": "logs/", |
| "historyMetricsConfig": { |
| "retainHistoryDataHours": 72, |
| "retainHistoryDataIntervalMs": 3600000, |
| "retainRecentDataSeconds": 300, |
| "retainRecentDataIntervalMs": 15000 |
| } |
| }</code></pre> |
| |
| |
| <h3 id="delete-apiv10appmasterappid">DELETE api/v1.0/appmaster/<appId></h3> |
| <p>shutdown application appId</p> |
| <h3 id="get-apiv10appmasterappidstallingtasks">GET api/v1.0/appmaster/<appId>/stallingtasks</h3> |
| <p>Query list of unhealthy tasks of an specific application of Id appId</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/appmaster/2/stallingtasks</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "tasks": [ |
| { |
| "processorId": 0, |
| "index": 0 |
| } |
| ] |
| }</code></pre> |
| |
| |
| <h3 id="get-apiv10appmasterappidconfig">GET api/v1.0/appmaster/<appId>/config</h3> |
| <p>Query the configuration of specific application appId</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/appmaster/1/config</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "gearpump" : { |
| "appmaster" : { |
| "extraClasspath" : "", |
| "vmargs" : "-server -Xms512M -Xmx1024M -Xss1M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseParNewGC -XX:NewRatio=3" |
| }, |
| "cluster" : { |
| "masters" : [ |
| "127.0.0.1:3000" |
| ] |
| }, |
| "executor" : { |
| "extraClasspath" : "", |
| "vmargs" : "-server -Xms512M -Xmx1024M -Xss1M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseParNewGC -XX:NewRatio=3" |
| }, |
| "jarstore" : { |
| "rootpath" : "jarstore/" |
| }, |
| "log" : { |
| "application" : { |
| "dir" : "logs" |
| }, |
| "daemon" : { |
| "dir" : "logs" |
| } |
| }, |
| "metrics" : { |
| "enabled" : true, |
| "graphite" : { |
| "host" : "127.0.0.1", |
| "port" : 2003 |
| }, |
| "logfile" : {}, |
| "report-interval-ms" : 15000, |
| "reporter" : "akka", |
| "retainHistoryData" : { |
| "hours" : 72, |
| "intervalMs" : 3600000 |
| }, |
| "retainRecentData" : { |
| "intervalMs" : 15000, |
| "seconds" : 300 |
| }, |
| "sample-rate" : 10 |
| }, |
| "netty" : { |
| "base-sleep-ms" : 100, |
| "buffer-size" : 5242880, |
| "flush-check-interval" : 10, |
| "max-retries" : 30, |
| "max-sleep-ms" : 1000, |
| "message-batch-size" : 262144 |
| }, |
| "netty-dispatcher" : "akka.actor.default-dispatcher", |
| "scheduling" : { |
| "scheduler-class" : "org.apache.gearpump.cluster.scheduler.PriorityScheduler" |
| }, |
| "serializers" : { |
| "[B" : "", |
| "[C" : "", |
| "[D" : "", |
| "[F" : "", |
| "[I" : "", |
| "[J" : "", |
| "[Ljava.lang.String;" : "", |
| "[S" : "", |
| "[Z" : "", |
| "org.apache.gearpump.Message" : "org.apache.gearpump.streaming.MessageSerializer", |
| "org.apache.gearpump.streaming.task.Ack" : "org.apache.gearpump.streaming.AckSerializer", |
| "org.apache.gearpump.streaming.task.AckRequest" : "org.apache.gearpump.streaming.AckRequestSerializer", |
| "org.apache.gearpump.streaming.task.LatencyProbe" : "org.apache.gearpump.streaming.LatencyProbeSerializer", |
| "org.apache.gearpump.streaming.task.TaskId" : "org.apache.gearpump.streaming.TaskIdSerializer", |
| "scala.Tuple1" : "", |
| "scala.Tuple2" : "", |
| "scala.Tuple3" : "", |
| "scala.Tuple4" : "", |
| "scala.Tuple5" : "", |
| "scala.Tuple6" : "", |
| "scala.collection.immutable.$colon$colon" : "", |
| "scala.collection.immutable.List" : "" |
| }, |
| "services" : { |
| # gear.conf: 112 |
| "host" : "127.0.0.1", |
| # gear.conf: 113 |
| "http" : 8090, |
| # gear.conf: 114 |
| "ws" : 8091 |
| }, |
| "task-dispatcher" : "akka.actor.pined-dispatcher", |
| "worker" : { |
| # reference.conf: 100 |
| # # How many slots each worker contains |
| "slots" : 100 |
| } |
| } |
| }</code></pre> |
| |
| |
| <h3 id="get-apiv10appmasterappidmetricsquery_pathreadlatesttruefalseaggregatoraggregator_class">GET api/v1.0/appmaster/<appId>/metrics/<query_path>?readLatest=<true|false>&aggregator=<aggregator_class></h3> |
| <p>Query metrics information of a specific application appId |
| Filter metrics with path metrics path</p> |
| <p>aggregator points to a aggregator class, which will aggregate on the current metrics, and return a smaller set.</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/appmaster/1/metrics/app1?readLatest=true&aggregator=org.apache.gearpump.streaming.metrics.ProcessorAggregator</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "path" |
| : |
| "worker", "metrics" |
| : |
| [{ |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.total.used", |
| "value": "152931440" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker1:thread.daemon.count", "value": "18"} |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.heap.used", |
| "value": "123139640" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.total.max", |
| "value": "997457920" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.heap.committed", |
| "value": "179830784" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker0:thread.count", "value": "28"} |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker0:memory.heap.max", "value": "880017408"} |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker1:memory.heap.max", "value": "880017408"} |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.total.committed", |
| "value": "210239488" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker0:memory.total.used", |
| "value": "152931440" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker1:thread.count", "value": "28"} |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.total.max", |
| "value": "997457920" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.heap.committed", |
| "value": "179830784" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.total.committed", |
| "value": "210239488" |
| } |
| }, { |
| "time": "1450759137860", |
| "value": {"$type": "org.apache.gearpump.metrics.Metrics.Gauge", "name": "worker0:thread.daemon.count", "value": "18"} |
| }, { |
| "time": "1450759137860", |
| "value": { |
| "$type": "org.apache.gearpump.metrics.Metrics.Gauge", |
| "name": "worker1:memory.heap.used", |
| "value": "123139640" |
| } |
| }] |
| }</code></pre> |
| |
| |
| <h3 id="get-apiv10appmasterappiderrors">GET api/v1.0/appmaster/<appId>/errors</h3> |
| <p>Get task error messages</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/appmaster/1/errors</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{"time":"0","error":null}</code></pre> |
| |
| |
| <h3 id="post-apiv10appmasterappidrestart">POST api/v1.0/appmaster/<appId>/restart</h3> |
| <p>Restart the application</p> |
| <h2 id="executor-service">Executor Service</h2> |
| <h3 id="get-apiv10appmasterappidexecutorexecutoridconfig">GET api/v1.0/appmaster/<appId>/executor/<executorid>/config</h3> |
| <p>Get executor config</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl http://127.0.0.1:8090/api/v1.0/appmaster/1/executor/1/config</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "extensions": [ |
| "akka.contrib.datareplication.DataReplication$" |
| ] |
| "akka": { |
| "loglevel": "INFO" |
| "log-dead-letters": "off" |
| "log-dead-letters-during-shutdown": "off" |
| "actor": { |
| ## Master forms a akka cluster |
| "provider": "akka.cluster.ClusterActorRefProvider" |
| } |
| "cluster": { |
| "roles": ["master"] |
| "auto-down-unreachable-after": "15s" |
| } |
| "remote": { |
| "log-remote-lifecycle-events": "off" |
| } |
| } |
| }</code></pre> |
| |
| |
| <h3 id="get-apiv10appmasterappidexecutorexecutorid">GET api/v1.0/appmaster/<appId>/executor/<executorid></h3> |
| <p>Get executor information.</p> |
| <p>Example:</p> |
| <pre class="codehilite"><code class="language-bash">curl [--cookie outputAuthenticationCookie.txt] http://127.0.0.1:8090/api/v1.0/appmaster/1/executor/1</code></pre> |
| |
| |
| <p>Sample Response:</p> |
| <pre class="codehilite"><code class="language-json">{ |
| "id": 1, |
| "workerId": "0", |
| "actorPath": "akka.tcp://app1system1@127.0.0.1:52241/remote/akka.tcp/app1-executor-1@127.0.0.1:52212/user/daemon/appdaemon1/$c/appmaster/executors/1", |
| "logFile": "logs/", |
| "status": "active", |
| "taskCount": 1, |
| "tasks": [ |
| [ |
| 0, |
| [ |
| { |
| "processorId": 0, |
| "index": 0 |
| } |
| ] |
| ] |
| ], |
| "jvmName": "21304@lisa" |
| }</code></pre> |
| |
| </div> |
| </div> |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="../../api/scala/index.html" class="btn btn-neutral float-right" title="Scala API"/>Next <span class="icon icon-circle-arrow-right"></span></a> |
| |
| |
| <a href="../dev-non-streaming-example/index.html" class="btn btn-neutral" title="Non Streaming Examples"><span class="icon icon-circle-arrow-left"></span> Previous</a> |
| |
| </div> |
| |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <!-- Copyright etc --> |
| |
| </div> |
| |
| Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| <div class="rst-versions" role="note" style="cursor: pointer"> |
| <span class="rst-current-version" data-toggle="rst-current-version"> |
| |
| <a class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a> |
| |
| |
| <span><a href="../dev-non-streaming-example/index.html" style="color: #fcfcfc;">« Previous</a></span> |
| |
| |
| <span style="margin-left: 15px"><a href="../../api/scala/index.html" style="color: #fcfcfc">Next »</a></span> |
| |
| </span> |
| </div> |
| |
| </body> |
| </html> |