Package org.apache.hop.execution
Interface IExecutionInfoLocation
-
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
FileExecutionInfoLocation,RemoteExecutionInfoLocation
public interface IExecutionInfoLocation extends Cloneable
This interface describes how execution information can be interacted with for a certain location. We have methods to register and update execution information as well as methods to query this information.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIExecutionInfoLocation.ExecutionInfoLocationObjectFactoryThis object factory is needed to instantiate the correct plugin class based on the value of the Object ID which is simply the object ID.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IExecutionInfoLocationclone()voidclose()When you're done with this location you can call this method to clean up any left-over temporary files, memory structures or database connections.booleandeleteExecution(String executionId)Delete the execution with the given ID, its children and the associated information.List<String>findChildIds(ExecutionType parentExecutionType, String parentExecutionId)Find children of an execution.List<Execution>findExecutions(String parentExecutionId)Find all the child executions for a particular execution ID.List<Execution>findExecutions(IExecutionMatcher matcher)Find executions with a matcher.ExecutionfindLastExecution(ExecutionType executionType, String name)Find the last execution of with a given type and nameStringfindParentId(String childId)ExecutionfindPreviousSuccessfulExecution(ExecutionType executionType, String name)Find the previous successful execution of a pipeline or workflow.ExecutiongetExecution(String executionId)Get the execution information for a specific execution ID.ExecutionDatagetExecutionData(String parentExecutionId, String executionId)Get execution data for transforms or an action.List<String>getExecutionIds(boolean includeChildren, int limit)Retrieve a list of execution IDs (log channel IDs) for all pipelines and workflows.ExecutionStategetExecutionState(String executionId)Get the execution state for an execution.ExecutionStategetExecutionState(String executionId, boolean includeLogging)Get the execution state for an executionStringgetExecutionStateLoggingText(String executionId, int sizeLimit)Load the logging text of an execution state separately.StringgetPluginId()StringgetPluginName()voidinitialize(IVariables variables, IHopMetadataProvider metadataProvider)Initialize a location.voidregisterData(ExecutionData data)register output data for a given transformvoidregisterExecution(Execution execution)Register an execution of a pipeline or workflow at this location * *voidsetPluginId(String pluginId)voidsetPluginName(String pluginName)voidupdateExecutionState(ExecutionState executionState)update the execution details of an executor: pipeline, workflow, transform or action
-
-
-
Method Detail
-
getPluginId
String getPluginId()
-
setPluginId
void setPluginId(String pluginId)
-
getPluginName
String getPluginName()
-
setPluginName
void setPluginName(String pluginName)
-
clone
IExecutionInfoLocation clone()
-
initialize
void initialize(IVariables variables, IHopMetadataProvider metadataProvider) throws HopException
Initialize a location. Load files, open database connections, ...- Parameters:
variables-metadataProvider-- Throws:
HopException
-
close
void close() throws HopExceptionWhen you're done with this location you can call this method to clean up any left-over temporary files, memory structures or database connections.- Throws:
HopException
-
registerExecution
void registerExecution(Execution execution) throws HopException
Register an execution of a pipeline or workflow at this location * *- Parameters:
execution- The execution information to register- Throws:
HopException- In case there was a problem with the registration
-
updateExecutionState
void updateExecutionState(ExecutionState executionState) throws HopException
update the execution details of an executor: pipeline, workflow, transform or action- Parameters:
executionState- The execution state to update- Throws:
HopException- In case there was a problem with the update
-
deleteExecution
boolean deleteExecution(String executionId) throws HopException
Delete the execution with the given ID, its children and the associated information.- Parameters:
executionId- The ID of the execution to delete- Returns:
- true if the execution was found and deleted.
- Throws:
HopException
-
getExecutionState
ExecutionState getExecutionState(String executionId) throws HopException
Get the execution state for an execution. Any large logging text associated with the requested execution state is also loaded.- Parameters:
executionId- The id of the execution- Returns:
- The state of the execution or null if not found
- Throws:
HopException- In case there was a problem reading the state
-
getExecutionState
ExecutionState getExecutionState(String executionId, boolean includeLogging) throws HopException
Get the execution state for an execution- Parameters:
executionId- The id of the executionincludeLogging- Set to true if the logging text (can be big) also needs to be loaded.- Returns:
- The state of the execution or null if not found
- Throws:
HopException- In case there was a problem reading the state
-
getExecutionStateLoggingText
String getExecutionStateLoggingText(String executionId, int sizeLimit) throws HopException
Load the logging text of an execution state separately.- Parameters:
executionId- The id of the execution to look for.sizeLimit- The maximum amount of characters to load from the logging text. Set the limit to <=0 if you want to load everything up to a global limit of usually 20MB.- Returns:
- The complete logging text
- Throws:
HopException
-
registerData
void registerData(ExecutionData data) throws HopException
register output data for a given transform- Parameters:
data-- Throws:
HopException
-
getExecutionIds
List<String> getExecutionIds(boolean includeChildren, int limit) throws HopException
Retrieve a list of execution IDs (log channel IDs) for all pipelines and workflows. The list is reverse ordered by (start of) execution date.- Parameters:
includeChildren- set to true if you want to see child executions of workflows and pipelines.limit- the maximum number of IDs to retrieve or a value <=0 to get all IDs.- Returns:
- The list of execution IDs
- Throws:
HopException- in case something went wrong
-
getExecution
Execution getExecution(String executionId) throws HopException
Get the execution information for a specific execution ID. This is the execution information of a workflow or pipeline.- Parameters:
executionId- The ID of the execution to look for- Returns:
- The Execution or null if nothing was found
- Throws:
HopException- in case something went wrong
-
findExecutions
List<Execution> findExecutions(String parentExecutionId) throws HopException
Find all the child executions for a particular execution ID. For example if you want to know the execution of a particular action you can use this method.- Parameters:
parentExecutionId- The parent execution ID- Returns:
- A list of executions or an empty list if nothing was found.
- Throws:
HopException- In case of an unexpected error.
-
findPreviousSuccessfulExecution
Execution findPreviousSuccessfulExecution(ExecutionType executionType, String name) throws HopException
Find the previous successful execution of a pipeline or workflow.- Parameters:
executionType- The type of execution to look forname- The name of the executor- Returns:
- The execution or null if no previous successful execution could be found.
- Throws:
HopException
-
findExecutions
List<Execution> findExecutions(IExecutionMatcher matcher) throws HopException
Find executions with a matcher. This will parse through all executions in the location.- Parameters:
matcher- The matcher to allow you to filter any execution from the system.- Returns:
- A list of executions or an empty list if nothing was found.
- Throws:
HopException- In case of an unexpected error.
-
getExecutionData
ExecutionData getExecutionData(String parentExecutionId, String executionId) throws HopException
Get execution data for transforms or an action. The parent ID would typically be a pipeline ID, and you'd get data for all the transforms. You can also get the execution data for specific actions in a workflow (when finished).- Parameters:
parentExecutionId- The ID of the parent (pipeline) execution.executionId- The ID of the transforms (all transforms) or a specific action. Set this parameter to null if you want to collect all the data associated with the parent execution ID. This is for the Beam use case where we don't know up-front how many transforms are running or when they'll pop up.- Returns:
- The ExecutionData
- Throws:
HopException- In case something went wrong
-
findLastExecution
Execution findLastExecution(ExecutionType executionType, String name) throws HopException
Find the last execution of with a given type and name- Parameters:
executionType- The type to look forname- The name to match- Returns:
- The last execution or null if none could be found
- Throws:
HopException
-
findChildIds
List<String> findChildIds(ExecutionType parentExecutionType, String parentExecutionId) throws HopException
Find children of an execution. A workflow can find child actions with this method.- Parameters:
parentExecutionType- The parent execution type (Workflow or Pipeline)parentExecutionId- The parent execution ID to look into- Returns:
- A list of IDs or an empty list if nothing could be found.
- Throws:
HopException- in case of a serialization error
-
findParentId
String findParentId(String childId) throws HopException
- Throws:
HopException
-
-