Skip to content

Commit

Permalink
[FLINK-9154][REST][docs] Document WebSubmissionExtension handlers
Browse files Browse the repository at this point in the history
This closes apache#5833.
  • Loading branch information
zentol committed May 2, 2018
1 parent e884a3a commit fa321ea
Show file tree
Hide file tree
Showing 3 changed files with 316 additions and 0 deletions.
307 changes: 307 additions & 0 deletions docs/_includes/generated/rest_dispatcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,313 @@
</tr>
</tbody>
</table>
<table class="table table-bordered">
<tbody>
<tr>
<td class="text-left" colspan="2"><strong>/jars</strong></td>
</tr>
<tr>
<td class="text-left" style="width: 20%">Verb: <code>GET</code></td>
<td class="text-left">Response code: <code>200 OK</code></td>
</tr>
<tr>
<td colspan="2">description</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#-525177469">Request</button>
<div id="-525177469" class="collapse">
<pre>
<code>
{} </code>
</pre>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#-1669843955">Response</button>
<div id="-1669843955" class="collapse">
<pre>
<code>
{
"type" : "object",
"id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarListInfo",
"properties" : {
"address" : {
"type" : "string"
},
"files" : {
"type" : "array",
"items" : {
"type" : "object",
"id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarListInfo:JarFileInfo",
"properties" : {
"id" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"uploaded" : {
"type" : "integer"
},
"entry" : {
"type" : "array",
"items" : {
"type" : "object",
"id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarListInfo:JarEntryInfo",
"properties" : {
"name" : {
"type" : "string"
},
"description" : {
"type" : "string"
}
}
}
}
}
}
}
}
} </code>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<tbody>
<tr>
<td class="text-left" colspan="2"><strong>/jars/upload</strong></td>
</tr>
<tr>
<td class="text-left" style="width: 20%">Verb: <code>POST</code></td>
<td class="text-left">Response code: <code>200 OK</code></td>
</tr>
<tr>
<td colspan="2">description</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#919877128">Request</button>
<div id="919877128" class="collapse">
<pre>
<code>
{
"type" : "object",
"id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:FileUpload",
"properties" : {
"path" : {
"type" : "string"
}
}
} </code>
</pre>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#1132420209">Response</button>
<div id="1132420209" class="collapse">
<pre>
<code>
{
"type" : "object",
"id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarUploadResponseBody",
"properties" : {
"filename" : {
"type" : "string"
},
"status" : {
"type" : "string",
"enum" : [ "success" ]
}
}
} </code>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<tbody>
<tr>
<td class="text-left" colspan="2"><strong>/jars/:jarid</strong></td>
</tr>
<tr>
<td class="text-left" style="width: 20%">Verb: <code>DELETE</code></td>
<td class="text-left">Response code: <code>200 OK</code></td>
</tr>
<tr>
<td colspan="2">description</td>
</tr>
<tr>
<td colspan="2">Path parameters</td>
</tr>
<tr>
<td colspan="2">
<ul>
<li><code>jarid</code> - description</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#-974639435">Request</button>
<div id="-974639435" class="collapse">
<pre>
<code>
{} </code>
</pre>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#-789656611">Response</button>
<div id="-789656611" class="collapse">
<pre>
<code>
{} </code>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<tbody>
<tr>
<td class="text-left" colspan="2"><strong>/jars/:jarid/plan</strong></td>
</tr>
<tr>
<td class="text-left" style="width: 20%">Verb: <code>GET</code></td>
<td class="text-left">Response code: <code>200 OK</code></td>
</tr>
<tr>
<td colspan="2">description</td>
</tr>
<tr>
<td colspan="2">Path parameters</td>
</tr>
<tr>
<td colspan="2">
<ul>
<li><code>jarid</code> - description</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2">Query parameters</td>
</tr>
<tr>
<td colspan="2">
<ul>
<li><code>entry-class</code> (optional): description</li>
<li><code>parallelism</code> (optional): description</li>
<li><code>program-args</code> (optional): description</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#-181694384">Request</button>
<div id="-181694384" class="collapse">
<pre>
<code>
{} </code>
</pre>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#1311035100">Response</button>
<div id="1311035100" class="collapse">
<pre>
<code>
{
"type" : "any"
} </code>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<tbody>
<tr>
<td class="text-left" colspan="2"><strong>/jars/:jarid/run</strong></td>
</tr>
<tr>
<td class="text-left" style="width: 20%">Verb: <code>POST</code></td>
<td class="text-left">Response code: <code>200 OK</code></td>
</tr>
<tr>
<td colspan="2">description</td>
</tr>
<tr>
<td colspan="2">Path parameters</td>
</tr>
<tr>
<td colspan="2">
<ul>
<li><code>jarid</code> - description</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2">Query parameters</td>
</tr>
<tr>
<td colspan="2">
<ul>
<li><code>program-args</code> (optional): description</li>
<li><code>entry-class</code> (optional): description</li>
<li><code>parallelism</code> (optional): description</li>
<li><code>allowNonRestoredState</code> (optional): description</li>
<li><code>savepointPath</code> (optional): description</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#1936993190">Request</button>
<div id="1936993190" class="collapse">
<pre>
<code>
{} </code>
</pre>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<button data-toggle="collapse" data-target="#-914083094">Response</button>
<div id="-914083094" class="collapse">
<pre>
<code>
{
"type" : "object",
"id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarRunResponseBody",
"properties" : {
"jobid" : {
"type" : "any"
}
}
} </code>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<tbody>
<tr>
Expand Down
6 changes: 6 additions & 0 deletions flink-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ under the License.
<artifactId>flink-runtime_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<!-- necessary for loading the web-submission extension -->
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime-web_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-yarn_${scala.binary.version}</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.JobManagerOptions;
import org.apache.flink.configuration.RestOptions;
import org.apache.flink.runtime.concurrent.Executors;
import org.apache.flink.runtime.dispatcher.DispatcherGateway;
Expand Down Expand Up @@ -314,6 +315,8 @@ private static class DocumentingDispatcherRestEndpoint extends DispatcherRestEnd
static {
config = new Configuration();
config.setString(RestOptions.ADDRESS, "localhost");
// necessary for loading the web-submission extension
config.setString(JobManagerOptions.ADDRESS, "localhost");
try {
restConfig = RestServerEndpointConfiguration.fromConfiguration(config);
} catch (ConfigurationException e) {
Expand Down

0 comments on commit fa321ea

Please sign in to comment.