Class TransformationMap


  • public class TransformationMap
    extends Object
    This is a map between the transformation name and the (running/waiting/finished) transformation.
    Author:
    Matt
    • Constructor Detail

      • TransformationMap

        public TransformationMap()
    • Method Detail

      • addTransformation

        public void addTransformation​(String transformationName,
                                      String containerObjectId,
                                      Trans trans,
                                      TransConfiguration transConfiguration)
        Add a transformation to the map
        Parameters:
        transformationName - The name of the transformation to add
        containerObjectId - the unique ID of the transformation in this container.
        trans - The transformation to add
        transConfiguration - the transformation configuration to add
      • registerTransformation

        public void registerTransformation​(Trans trans,
                                           TransConfiguration transConfiguration)
      • getTransformation

        public Trans getTransformation​(String transformationName)
        Find the first transformation in the list that comes to mind!
        Parameters:
        transformationName -
        Returns:
        the first transformation with the specified name
      • getTransformation

        public Trans getTransformation​(CarteObjectEntry entry)
        Parameters:
        entry - The Carte transformation object
        Returns:
        the transformation with the specified entry
      • getConfiguration

        public TransConfiguration getConfiguration​(String transformationName)
        Parameters:
        transformationName -
        Returns:
        The first transformation configuration with the specified name
      • getConfiguration

        public TransConfiguration getConfiguration​(CarteObjectEntry entry)
        Parameters:
        entry - The Carte transformation object
        Returns:
        the transformation configuration with the specified entry
      • removeTransformation

        public void removeTransformation​(CarteObjectEntry entry)
        Parameters:
        entry - the Carte object entry
      • allocateServerSocketPort

        public SocketPortAllocation allocateServerSocketPort​(int portRangeStart,
                                                             String hostname,
                                                             String clusteredRunId,
                                                             String transformationName,
                                                             String sourceSlaveName,
                                                             String sourceStepName,
                                                             String sourceStepCopy,
                                                             String targetSlaveName,
                                                             String targetStepName,
                                                             String targetStepCopy)
        This is the meat of the whole problem. We'll allocate a port for a given slave, transformation and step copy, always on the same host. Algorithm: 1) Search for the right map in the hostPortMap
        Parameters:
        portRangeStart - the start of the port range as described in the used cluster schema
        hostname - the host name to allocate this address for
        clusteredRunId - A unique id, created for each new clustered run during transformation split.
        transformationName -
        sourceStepName -
        sourceStepCopy -
        Returns:
      • deallocateServerSocketPorts

        public void deallocateServerSocketPorts​(String transName,
                                                String carteObjectId)
        Deallocate all the ports for the given transformation name, across all hosts.
        Parameters:
        transName - the transformation name to release
        carteObjectId - the carte object ID to reference
      • deallocateServerSocketPorts

        public void deallocateServerSocketPorts​(CarteObjectEntry entry)
        Deallocate all the ports for the given transformation entry, across all hosts.
        Parameters:
        entry - the transformation object entry name to release the sockets for
      • deallocateServerSocketPort

        public void deallocateServerSocketPort​(int port,
                                               String hostname)
      • getSlaveServerConfig

        public SlaveServerConfig getSlaveServerConfig()
        Returns:
        the slaveServerConfig
      • setSlaveServerConfig

        public void setSlaveServerConfig​(SlaveServerConfig slaveServerConfig)
        Parameters:
        slaveServerConfig - the slaveServerConfig to set
      • isAutomaticSlaveSequenceCreationAllowed

        public boolean isAutomaticSlaveSequenceCreationAllowed()
      • createSlaveSequence

        public SlaveSequence createSlaveSequence​(String name)
                                          throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException