Package org.apache.hop.execution.remote
Class RemoteExecutionInfoLocation
- java.lang.Object
-
- org.apache.hop.execution.remote.RemoteExecutionInfoLocation
-
- All Implemented Interfaces:
Cloneable,IExecutionInfoLocation
@GuiPlugin(description="File execution information location GUI elements") @ExecutionInfoLocationPlugin(id="remote-location", name="Remote location", description="Stores execution information on a remote Hop server") public class RemoteExecutionInfoLocation extends Object implements IExecutionInfoLocation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.hop.execution.IExecutionInfoLocation
IExecutionInfoLocation.ExecutionInfoLocationObjectFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected StringlocationNameprotected StringpluginIdprotected StringpluginNameprotected StringserverName
-
Constructor Summary
Constructors Constructor Description RemoteExecutionInfoLocation()RemoteExecutionInfoLocation(RemoteExecutionInfoLocation location)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RemoteExecutionInfoLocationclone()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 executionExecutionInfoLocationgetLocation()Gets locationStringgetLocationName()Gets locationNameStringgetPluginId()Gets pluginIdStringgetPluginName()Gets pluginNameHopServergetServer()Gets serverStringgetServerName()Gets serverNameIVariablesgetVariables()Gets variablesvoidinitialize(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 * *voidsetLocation(ExecutionInfoLocation location)Sets locationvoidsetLocationName(String locationName)Sets locationNamevoidsetPluginId(String pluginId)Sets pluginIdvoidsetPluginName(String pluginName)Sets pluginNamevoidsetServer(HopServer server)Sets servervoidsetServerName(String serverName)Sets serverNamevoidsetVariables(IVariables variables)Sets variablesvoidupdateExecutionState(ExecutionState executionState)update the execution details of an executor: pipeline, workflow, transform or action
-
-
-
Field Detail
-
pluginId
protected String pluginId
-
pluginName
protected String pluginName
-
serverName
@GuiWidgetElement(id="hopServer", order="010", parentId="ExecutionInfoLocation-PluginSpecific-Options", type=METADATA, typeMetadata=HopServerTypeMetadata.class, toolTip="i18n::RemoteExecutionInfoLocation.HopServer.Tooltip", label="i18n::RemoteExecutionInfoLocation.HopServer.Label") protected String serverName
-
locationName
@GuiWidgetElement(id="location", order="020", parentId="ExecutionInfoLocation-PluginSpecific-Options", type=METADATA, typeMetadata=ExecutionInfoLocationTypeMetadata.class, toolTip="i18n::RemoteExecutionInfoLocation.LocationName.Tooltip", label="i18n::RemoteExecutionInfoLocation.LocationName.Label") protected String locationName
-
-
Constructor Detail
-
RemoteExecutionInfoLocation
public RemoteExecutionInfoLocation()
-
RemoteExecutionInfoLocation
public RemoteExecutionInfoLocation(RemoteExecutionInfoLocation location)
-
-
Method Detail
-
clone
public RemoteExecutionInfoLocation clone()
- Specified by:
clonein interfaceIExecutionInfoLocation- Overrides:
clonein classObject
-
initialize
public void initialize(IVariables variables, IHopMetadataProvider metadataProvider) throws HopException
Description copied from interface:IExecutionInfoLocationInitialize a location. Load files, open database connections, ...- Specified by:
initializein interfaceIExecutionInfoLocation- Throws:
HopException
-
close
public void close() throws HopExceptionDescription copied from interface:IExecutionInfoLocationWhen you're done with this location you can call this method to clean up any left-over temporary files, memory structures or database connections.- Specified by:
closein interfaceIExecutionInfoLocation- Throws:
HopException
-
registerExecution
public void registerExecution(Execution execution) throws HopException
Description copied from interface:IExecutionInfoLocationRegister an execution of a pipeline or workflow at this location * *- Specified by:
registerExecutionin interfaceIExecutionInfoLocation- Parameters:
execution- The execution information to register- Throws:
HopException- In case there was a problem with the registration
-
deleteExecution
public boolean deleteExecution(String executionId) throws HopException
Description copied from interface:IExecutionInfoLocationDelete the execution with the given ID, its children and the associated information.- Specified by:
deleteExecutionin interfaceIExecutionInfoLocation- Parameters:
executionId- The ID of the execution to delete- Returns:
- true if the execution was found and deleted.
- Throws:
HopException
-
updateExecutionState
public void updateExecutionState(ExecutionState executionState) throws HopException
Description copied from interface:IExecutionInfoLocationupdate the execution details of an executor: pipeline, workflow, transform or action- Specified by:
updateExecutionStatein interfaceIExecutionInfoLocation- Parameters:
executionState- The execution state to update- Throws:
HopException- In case there was a problem with the update
-
registerData
public void registerData(ExecutionData data) throws HopException
Description copied from interface:IExecutionInfoLocationregister output data for a given transform- Specified by:
registerDatain interfaceIExecutionInfoLocation- Throws:
HopException
-
getExecutionIds
public List<String> getExecutionIds(boolean includeChildren, int limit) throws HopException
Description copied from interface:IExecutionInfoLocationRetrieve a list of execution IDs (log channel IDs) for all pipelines and workflows. The list is reverse ordered by (start of) execution date.- Specified by:
getExecutionIdsin interfaceIExecutionInfoLocation- 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
public Execution getExecution(String executionId) throws HopException
Description copied from interface:IExecutionInfoLocationGet the execution information for a specific execution ID. This is the execution information of a workflow or pipeline.- Specified by:
getExecutionin interfaceIExecutionInfoLocation- 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
-
getExecutionState
public ExecutionState getExecutionState(String executionId) throws HopException
Description copied from interface:IExecutionInfoLocationGet the execution state for an execution- Specified by:
getExecutionStatein interfaceIExecutionInfoLocation- 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
-
findExecutions
public List<Execution> findExecutions(String parentExecutionId) throws HopException
Description copied from interface:IExecutionInfoLocationFind 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.- Specified by:
findExecutionsin interfaceIExecutionInfoLocation- 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.
-
findExecutions
public List<Execution> findExecutions(IExecutionMatcher matcher) throws HopException
Description copied from interface:IExecutionInfoLocationFind executions with a matcher. This will parse through all executions in the location.- Specified by:
findExecutionsin interfaceIExecutionInfoLocation- 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.
-
findPreviousSuccessfulExecution
public Execution findPreviousSuccessfulExecution(ExecutionType executionType, String name) throws HopException
Description copied from interface:IExecutionInfoLocationFind the previous successful execution of a pipeline or workflow.- Specified by:
findPreviousSuccessfulExecutionin interfaceIExecutionInfoLocation- 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
-
getExecutionData
public ExecutionData getExecutionData(String parentExecutionId, String executionId) throws HopException
Description copied from interface:IExecutionInfoLocationGet 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).- Specified by:
getExecutionDatain interfaceIExecutionInfoLocation- 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
public Execution findLastExecution(ExecutionType executionType, String name) throws HopException
Description copied from interface:IExecutionInfoLocationFind the last execution of with a given type and name- Specified by:
findLastExecutionin interfaceIExecutionInfoLocation- 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
public List<String> findChildIds(ExecutionType parentExecutionType, String parentExecutionId) throws HopException
Description copied from interface:IExecutionInfoLocationFind children of an execution. A workflow can find child actions with this method.- Specified by:
findChildIdsin interfaceIExecutionInfoLocation- 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
public String findParentId(String childId) throws HopException
- Specified by:
findParentIdin interfaceIExecutionInfoLocation- Throws:
HopException
-
getPluginId
public String getPluginId()
Gets pluginId- Specified by:
getPluginIdin interfaceIExecutionInfoLocation- Returns:
- value of pluginId
-
setPluginId
public void setPluginId(String pluginId)
Sets pluginId- Specified by:
setPluginIdin interfaceIExecutionInfoLocation- Parameters:
pluginId- value of pluginId
-
getPluginName
public String getPluginName()
Gets pluginName- Specified by:
getPluginNamein interfaceIExecutionInfoLocation- Returns:
- value of pluginName
-
setPluginName
public void setPluginName(String pluginName)
Sets pluginName- Specified by:
setPluginNamein interfaceIExecutionInfoLocation- Parameters:
pluginName- value of pluginName
-
getServer
public HopServer getServer()
Gets server- Returns:
- value of server
-
getServerName
public String getServerName()
Gets serverName- Returns:
- value of serverName
-
setServerName
public void setServerName(String serverName)
Sets serverName- Parameters:
serverName- value of serverName
-
getLocationName
public String getLocationName()
Gets locationName- Returns:
- value of locationName
-
setLocationName
public void setLocationName(String locationName)
Sets locationName- Parameters:
locationName- value of locationName
-
getVariables
public IVariables getVariables()
Gets variables- Returns:
- value of variables
-
setVariables
public void setVariables(IVariables variables)
Sets variables- Parameters:
variables- value of variables
-
setServer
public void setServer(HopServer server)
Sets server- Parameters:
server- value of server
-
getLocation
public ExecutionInfoLocation getLocation()
Gets location- Returns:
- value of location
-
setLocation
public void setLocation(ExecutionInfoLocation location)
Sets location- Parameters:
location- value of location
-
-