Package io.digdag.spi
Interface CommandRequest
-
@Immutable public interface CommandRequest
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static io.digdag.spi.ImmutableCommandRequest.Builderbuilder()java.util.List<java.lang.String>getCommandLine()Returns a command line as List object.java.util.Map<java.lang.String,java.lang.String>getEnvironments()Returns pairs of keys and values of environment variables as Map object.java.nio.file.PathgetIoDirectory()Returns a relative path of "IO" directory from CommandContext.getLocalProjectPath().java.nio.file.PathgetWorkingDirectory()Returns a relative path of working dir from CommandContext.getLocalProjectPath().
-
-
-
Method Detail
-
getWorkingDirectory
java.nio.file.Path getWorkingDirectory()
Returns a relative path of working dir from CommandContext.getLocalProjectPath().- Returns:
-
getEnvironments
java.util.Map<java.lang.String,java.lang.String> getEnvironments()
Returns pairs of keys and values of environment variables as Map object.- Returns:
-
getCommandLine
java.util.List<java.lang.String> getCommandLine()
Returns a command line as List object.- Returns:
-
getIoDirectory
java.nio.file.Path getIoDirectory()
Returns a relative path of "IO" directory from CommandContext.getLocalProjectPath(). "IO" directory is a temporal directory that is used for passing/receiving input/output config parameters to/from command runner scripts/operators. Operators serialize input config parameters in JSON format and should write them to input files under the "IO" directory. To receive input config parameters from operators, command runner scripts can read the file and deserialize because command runner scripts should know the "IO" directory. On the other hand When commands finish by the command runner scripts, to send output config parameters to operators, command runner scripts serialize and should write them to output files under the "IO" directory. Operators can extract the output parameters from the files. Command executors don't need to care of actual input/output files. CommandExecutor is executed by operators. And it executes commands with command runner scripts. Instead pairs of operators and command runner scripts are developed by same persons but, CommandExecutors may be developed by different persons from ones who develop operators and command runner scripts. Actual input/output files are not shared to CommandExecutor from operators. The "IO" directory only should be shared. Please see PyOperatorFactory more details.- Returns:
-
builder
static io.digdag.spi.ImmutableCommandRequest.Builder builder()
-
-