public interface Worker
Modifier and Type | Method and Description |
---|---|
void |
deleteLocalResources()
Arrange for the deletion of any resources created during worker process
construction.
|
RemoteListener |
getDefaultListener() |
RemoteStatus |
getWorkerStatus() |
boolean |
initWorker(LocalWorker local,
String executeWorkflowCommand,
byte[] workflow,
File workingDir,
File inputBaclavaFile,
Map<String,File> inputRealFiles,
Map<String,String> inputValues,
Map<String,String> inputDelimiters,
File outputBaclavaFile,
File contextDirectory,
char[] keystorePassword,
boolean generateProvenance,
Map<String,String> environment,
String masterToken,
List<String> runtimeSettings)
Fire up the workflow.
|
void |
killWorker()
Kills off the subprocess if it exists and is alive.
|
void |
setURReceiver(UsageRecordReceiver receiver) |
void |
startWorker()
Move the worker out of the stopped state and back to operating.
|
void |
stopWorker()
Move the worker into the stopped state from the operating state.
|
boolean initWorker(LocalWorker local, String executeWorkflowCommand, byte[] workflow, File workingDir, File inputBaclavaFile, Map<String,File> inputRealFiles, Map<String,String> inputValues, Map<String,String> inputDelimiters, File outputBaclavaFile, File contextDirectory, char[] keystorePassword, boolean generateProvenance, Map<String,String> environment, String masterToken, List<String> runtimeSettings) throws Exception
local
- The reference to the factory class for this worker.executeWorkflowCommand
- The command to run to execute the workflow.workflow
- The workflow document to execute.workingDir
- What directory to use as the working directory.inputBaclavaFile
- The baclava file to use for inputs, or null to use
the other input* arguments' values.inputRealFiles
- A mapping of input names to files that supply them. Note that
we assume that nothing mapped here will be mapped in
inputValues.inputValues
- A mapping of input names to values to supply to them. Note
that we assume that nothing mapped here will be mapped in
inputFiles.inputDelimiters
- A mapping of input names to characters used to split them into
lists.outputBaclavaFile
- What baclava file to write the output from the workflow into,
or null to have it written into the out
subdirectory.contextDirectory
- The directory containing the keystore and truststore. Must
not be null.keystorePassword
- The password to the keystore and truststore. Must not be
null.generateProvenance
- Whether to generate a run bundle containing provenance data.environment
- Any environment variables that need to be added to the
invokation.masterToken
- The internal name of the workflow run.runtimeSettings
- List of configuration details for the forked runtime.Exception
- If any of quite a large number of things goes wrong.void killWorker() throws Exception
Exception
- if anything goes badly wrong when the worker is being killed
off.void startWorker() throws Exception
Exception
- if it fails (which it always does; operation currently
unsupported).void stopWorker() throws Exception
Exception
- if it fails (which it always does; operation currently
unsupported).RemoteStatus getWorkerStatus()
RemoteListener getDefaultListener()
void setURReceiver(UsageRecordReceiver receiver)
receiver
- The destination where any final usage records are to be
written in order to log them back to the server.void deleteLocalResources() throws ImplementationException
ImplementationException
- If anything goes wrong.Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.