Register a job template
POST/metalakes/:metalake/jobs/templates
Registers a job template in the specified metalake
Request
Path Parameters
The name of the metalake
- application/vnd.gravitino.v1+json
Body
- ShellJobTemplate
- SparkJobTemplate
jobTemplate
object
required
oneOf
A job template object for shell jobs
The name of the job template
Possible values: [shell]
The type of the job template
A comment about the job template
The executable command of the job template
The arguments of the job template
environments
object
Configured string to string map of environment variables for the job template
customFields
object
Configured string to string map of custom fields for the job template
The scripts of the job template
audit
object
Audit information for a Gravitino resource.
The user who created the resource
The time the resource was created
The user who last modified the resource
The time the resource was last modified
A job template object for Spark jobs
The name of the job template
Possible values: [spark]
The type of the job template
A comment about the job template
The executable command of the job template
The arguments of the job template
environments
object
Configured string to string map of environment variables for the job template
customFields
object
Configured string to string map of custom fields for the job template
The main class of the Spark job template
The JAR files of the Spark job template
The files of the Spark job template
The archives of the Spark job template
configs
object
Configured string to string map of Spark configurations for the job template
audit
object
Audit information for a Gravitino resource.
The user who created the resource
The time the resource was created
The user who last modified the resource
The time the resource was last modified
Responses
- 200
- 409
- 5xx
Represents a response for a base operation
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: [0]
Status code of the response
{
"code": 0
}
{
"code": 0
}
Conflict - The target job template already exists in the specified metalake
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- JobTemplateAlreadyExistsException
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
{
"code": 1002,
"type": "string",
"message": "string",
"stack": [
"string"
]
}
{
"code": 1004,
"type": "JobTemplateAlreadyExistsException",
"message": "Failed to operate job template(s) [my_job] operation [REGISTER], reason [JobTemplateAlreadyExistsException]",
"stack": [
"org.apache.gravitino.exceptions.JobTemplateAlreadyExistsException: job template xxx already exists",
"..."
]
}
A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
{
"code": 1002,
"type": "string",
"message": "string",
"stack": [
"string"
]
}
{
"code": 1002,
"type": "RuntimeException",
"message": "Internal Server Error",
"stack": [
"java.lang.RuntimeException: Internal Server Error"
]
}