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.
    • Method Detail

      • getPluginId

        String getPluginId()
      • setPluginId

        void setPluginId​(String pluginId)
      • getPluginName

        String getPluginName()
      • setPluginName

        void setPluginName​(String pluginName)
      • close

        void close()
            throws HopException
        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.
        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
        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
      • 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 for
        name - 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 for
        name - 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