Package org.pentaho.di.www
Class TransformationMap
- java.lang.Object
-
- org.pentaho.di.www.TransformationMap
-
public class TransformationMap extends Object
This is a map between the transformation name and the (running/waiting/finished) transformation.- Author:
- Matt
-
-
Constructor Summary
Constructors Constructor Description TransformationMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTransformation(String transformationName, String containerObjectId, Trans trans, TransConfiguration transConfiguration)
Add a transformation to the mapSocketPortAllocation
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.SlaveSequence
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
deallocateServerSocketPorts(CarteObjectEntry entry)
Deallocate all the ports for the given transformation entry, across all hosts.TransConfiguration
getConfiguration(String transformationName)
TransConfiguration
getConfiguration(CarteObjectEntry entry)
CarteObjectEntry
getFirstCarteObjectEntry(String transName)
List<SocketPortAllocation>
getHostServerSocketPorts(String hostname)
SlaveSequence
getSlaveSequence(String name)
SlaveServerConfig
getSlaveServerConfig()
Trans
getTransformation(String transformationName)
Find the first transformation in the list that comes to mind!Trans
getTransformation(CarteObjectEntry entry)
List<CarteObjectEntry>
getTransformationObjects()
boolean
isAutomaticSlaveSequenceCreationAllowed()
void
registerTransformation(Trans trans, TransConfiguration transConfiguration)
void
removeTransformation(CarteObjectEntry entry)
void
setSlaveServerConfig(SlaveServerConfig slaveServerConfig)
-
-
-
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 addcontainerObjectId
- the unique ID of the transformation in this container.trans
- The transformation to addtransConfiguration
- 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
-
getTransformationObjects
public List<CarteObjectEntry> 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
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 releasecarteObjectId
- 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)
-
getFirstCarteObjectEntry
public CarteObjectEntry getFirstCarteObjectEntry(String transName)
-
getSlaveServerConfig
public SlaveServerConfig getSlaveServerConfig()
- Returns:
- the slaveServerConfig
-
setSlaveServerConfig
public void setSlaveServerConfig(SlaveServerConfig slaveServerConfig)
- Parameters:
slaveServerConfig
- the slaveServerConfig to set
-
getHostServerSocketPorts
public List<SocketPortAllocation> getHostServerSocketPorts(String hostname)
- Returns:
- the hostServerSocketPortsMap
-
getSlaveSequence
public SlaveSequence getSlaveSequence(String name)
-
isAutomaticSlaveSequenceCreationAllowed
public boolean isAutomaticSlaveSequenceCreationAllowed()
-
createSlaveSequence
public SlaveSequence createSlaveSequence(String name) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
-