Class JobTemplate
- Direct Known Subclasses:
ShellJobTemplate
,SparkJobTemplate
JobType is enum to define the type of the job, because Gravitino needs different runtime environments to execute different types of jobs, so the job type is required.
Some parameters can be templated, which means that they can be replaced with actual values when running the job, for example, arguments can be { "{{input_path}}", "{{output_path}}" }, environment variables can be { "foo": "{{foo_value}}", "bar": "{{bar_value}}" }. the parameters support templating are:
- arguments
- environments
executable is the path to the executable that will be run, it should be an absolute path that can be accessed by the Gravitino server, current Gravitino can support executables in the local file system, or on the web server (e.g., HTTP or HTTPS, FTP). Distributed file systems like HDFS or S3 will be supported in the future.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
JobTemplate.BaseBuilder<B extends JobTemplate.BaseBuilder<B,
P>, P extends JobTemplate> Builder class for constructing JobTemplate instances.static enum
JobType is an enum to define the type of the job. -
Field Summary
FieldsModifier and TypeFieldDescriptionThe list of arguments for the job template.protected final String
The comment or description of the job template.The map of custom fields for the job template.The map of environment variables for the job template.protected final String
The executable path for the job template.protected final String
The name of the job template. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JobTemplate
(JobTemplate.BaseBuilder<?, ?> builder) Constructs a JobTemplate instance with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionGet the arguments for the job template.comment()
Get the comment for the job template.Get the custom fields for the job template.Get the environment variables for the job template.boolean
Get the executable for the job template.int
hashCode()
abstract JobTemplate.JobType
jobType()
Get the job type.name()
Get the name of the job template.toString()
-
Field Details
-
name
The name of the job template. -
comment
The comment or description of the job template. -
executable
The executable path for the job template. -
arguments
The list of arguments for the job template. -
environments
The map of environment variables for the job template. -
customFields
The map of custom fields for the job template.
-
-
Constructor Details
-
JobTemplate
Constructs a JobTemplate instance with the specified parameters.- Parameters:
builder
- the builder containing the job template parameters
-
-
Method Details
-
jobType
Get the job type.- Returns:
- the type of the job template
-
name
Get the name of the job template.- Returns:
- the name of the job template
-
comment
Get the comment for the job template.- Returns:
- the comment
-
executable
Get the executable for the job template.- Returns:
- the executable path
-
arguments
Get the arguments for the job template.- Returns:
- the list of arguments
-
environments
Get the environment variables for the job template.- Returns:
- the map of environment variables
-
customFields
Get the custom fields for the job template.- Returns:
- the map of custom fields
-
equals
-
hashCode
public int hashCode() -
toString
-