Skip to content

RestSubmissionServer

RestSubmissionServer is an abstraction of Application Submission Gateways that can handle submit, kill and status requests using REST API (JSON over HTTP).

URLs and RestServlets

URL Method RestServlet
/v1/submissions/create/* POST SubmitRequestServlet
/v1/submissions/kill/* POST KillRequestServlet
/v1/submissions/status/* GET StatusRequestServlet
/* (all) ErrorServlet

The above URLs and RestServlets are registered when RestSubmissionServer is requested to start.

Contract

killRequestServlet

killRequestServlet: KillRequestServlet

Used when:

statusRequestServlet

statusRequestServlet: StatusRequestServlet

Used when:

submitRequestServlet

submitRequestServlet: SubmitRequestServlet

Used when:

Implementations

Creating Instance

RestSubmissionServer takes the following to be created:

Abstract Class

RestSubmissionServer is an abstract class and cannot be created directly. It is created indirectly for the concrete RestSubmissionServers.

Starting

start(): Int

start starts a REST service on the requested port (or any free higher).

start prints out the following INFO to the logs:

Started REST server for submitting applications on port [port]

In the end, start returns the port of the server.

start is used when:

  • Master (Spark Standalone) is requested to onStart

doStart

doStart(
  startPort: Int): (Server, Int)

doStart...FIXME

Logging

RestSubmissionServer is an abstract class and logging is configured using the logger of the implementations.

Back to top