public class JobKickoffTask extends GenieBaseTask
| Constructor and Description |
|---|
JobKickoffTask(boolean runAsUserEnabled,
boolean userCreationEnabled,
@NotNull org.apache.commons.exec.Executor executor,
@NotNull java.lang.String hostname,
@NotNull io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
changeOwnershipOfDirectory(java.lang.String dir,
java.lang.String user)
Method to change the ownership of a directory.
|
protected void |
createUser(java.lang.String user,
java.lang.String group)
Create user on the system.
|
void |
executeTask(@NotNull java.util.Map<java.lang.String,java.lang.Object> context)
Execute the task.
|
buildLocalFilePathpublic JobKickoffTask(boolean runAsUserEnabled,
boolean userCreationEnabled,
@NotNull
@NotNull org.apache.commons.exec.Executor executor,
@NotNull
@NotNull java.lang.String hostname,
@NotNull
@NotNull io.micrometer.core.instrument.MeterRegistry registry)
runAsUserEnabled - Flag that tells if job should be run as user specified in the requestuserCreationEnabled - Flag that tells if the user specified should be createdexecutor - An executor object used to run jobshostname - Hostname for the node the job is running onregistry - The metrics registry to usepublic void executeTask(@NotNull
@NotNull java.util.Map<java.lang.String,java.lang.Object> context)
throws GenieException,
java.io.IOException
context - Information needed to execute the task.GenieException - if there is an error.java.io.IOException - if there is a problem writing to the disk.protected void createUser(java.lang.String user,
java.lang.String group)
throws GenieException
user - user idgroup - group idGenieException - If there is any problem.protected void changeOwnershipOfDirectory(java.lang.String dir,
java.lang.String user)
throws GenieException
dir - The directory to change the ownership of.user - Userid of the user.GenieException - If there is a problem.