Package org.pentaho.di.www
Class TransformationMap
java.lang.Object
org.pentaho.di.www.TransformationMap
This is a map between the transformation name and the (running/waiting/finished) transformation.
- Author:
- Matt
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTransformation
(String transformationName, String containerObjectId, Trans trans, TransConfiguration transConfiguration) Add a transformation to the mapallocateServerSocketPort
(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.createSlaveSequence
(String name) void
deallocateServerSocketPort
(int port, String hostname) void
deallocateServerSocketPorts
(String transName, String carteObjectId) Deallocate all the ports for the given transformation name, across all hosts.void
Deallocate all the ports for the given transformation entry, across all hosts.getConfiguration
(String transformationName) getConfiguration
(CarteObjectEntry entry) getFirstCarteObjectEntry
(String transName) getHostServerSocketPorts
(String hostname) getSlaveSequence
(String name) getTransformation
(String transformationName) Find the first transformation in the list that comes to mind!boolean
void
registerTransformation
(Trans trans, TransConfiguration transConfiguration) void
void
setSlaveServerConfig
(SlaveServerConfig slaveServerConfig)
-
Constructor Details
-
TransformationMap
public TransformationMap()
-
-
Method Details
-
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 addcontainerObjectId
- the unique ID of the transformation in this container.trans
- The transformation to addtransConfiguration
- the transformation configuration to add
-
registerTransformation
-
getTransformation
Find the first transformation in the list that comes to mind!- Parameters:
transformationName
-- Returns:
- the first transformation with the specified name
-
getTransformation
- Parameters:
entry
- The Carte transformation object- Returns:
- the transformation with the specified entry
-
getConfiguration
- Parameters:
transformationName
-- Returns:
- The first transformation configuration with the specified name
-
getConfiguration
- Parameters:
entry
- The Carte transformation object- Returns:
- the transformation configuration with the specified entry
-
removeTransformation
- Parameters:
entry
- the Carte object entry
-
getTransformationObjects
-
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 schemahostname
- the host name to allocate this address forclusteredRunId
- A unique id, created for each new clustered run during transformation split.transformationName
-sourceStepName
-sourceStepCopy
-- Returns:
-
deallocateServerSocketPorts
Deallocate all the ports for the given transformation name, across all hosts.- Parameters:
transName
- the transformation name to releasecarteObjectId
- the carte object ID to reference
-
deallocateServerSocketPorts
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
-
getFirstCarteObjectEntry
-
getSlaveServerConfig
- Returns:
- the slaveServerConfig
-
setSlaveServerConfig
- Parameters:
slaveServerConfig
- the slaveServerConfig to set
-
getHostServerSocketPorts
- Returns:
- the hostServerSocketPortsMap
-
getSlaveSequence
-
isAutomaticSlaveSequenceCreationAllowed
public boolean isAutomaticSlaveSequenceCreationAllowed() -
createSlaveSequence
public SlaveSequence createSlaveSequence(String name) throws org.pentaho.di.core.exception.KettleException - Throws:
org.pentaho.di.core.exception.KettleException
-