Package org.apache.gravitino.job
Class ShellJobTemplate.Builder
java.lang.Object
org.apache.gravitino.job.JobTemplate.BaseBuilder<ShellJobTemplate.Builder,ShellJobTemplate>
org.apache.gravitino.job.ShellJobTemplate.Builder
- Enclosing class:
- ShellJobTemplate
public static class ShellJobTemplate.Builder
extends JobTemplate.BaseBuilder<ShellJobTemplate.Builder,ShellJobTemplate>
Builder for creating instances of
ShellJobTemplate
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the ShellJobTemplate instance.protected ShellJobTemplate.Builder
self()
Returns the current instance of the builder.protected void
validate()
Validates the parameters of the job template.withScripts
(List<String> scripts) Sets the scripts to be executed by the shell job template.Methods inherited from class org.apache.gravitino.job.JobTemplate.BaseBuilder
withArguments, withComment, withCustomFields, withEnvironments, withExecutable, withName
-
Method Details
-
withScripts
Sets the scripts to be executed by the shell job template.- Parameters:
scripts
- the list of scripts to be executed- Returns:
- the builder instance for method chaining
-
build
Build the ShellJobTemplate instance.- Specified by:
build
in classJobTemplate.BaseBuilder<ShellJobTemplate.Builder,
ShellJobTemplate> - Returns:
- the constructed ShellJobTemplate
-
self
Description copied from class:JobTemplate.BaseBuilder
Returns the current instance of the builder.- Specified by:
self
in classJobTemplate.BaseBuilder<ShellJobTemplate.Builder,
ShellJobTemplate> - Returns:
- the current builder instance
-
validate
protected void validate()Description copied from class:JobTemplate.BaseBuilder
Validates the parameters of the job template.- Overrides:
validate
in classJobTemplate.BaseBuilder<ShellJobTemplate.Builder,
ShellJobTemplate>
-