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.Builderself()Returns the current instance of the builder.protected voidvalidate()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:
buildin classJobTemplate.BaseBuilder<ShellJobTemplate.Builder,ShellJobTemplate> - Returns:
- the constructed ShellJobTemplate
-
self
Description copied from class:JobTemplate.BaseBuilderReturns the current instance of the builder.- Specified by:
selfin classJobTemplate.BaseBuilder<ShellJobTemplate.Builder,ShellJobTemplate> - Returns:
- the current builder instance
-
validate
protected void validate()Description copied from class:JobTemplate.BaseBuilderValidates the parameters of the job template.- Overrides:
validatein classJobTemplate.BaseBuilder<ShellJobTemplate.Builder,ShellJobTemplate>
-