Class SlaveServer

  • All Implemented Interfaces:
    Cloneable, ChangedFlagInterface, org.pentaho.di.core.variables.VariableSpace, org.pentaho.di.core.xml.XMLInterface, org.pentaho.di.repository.RepositoryElementInterface, org.pentaho.di.repository.RepositoryObjectInterface, org.pentaho.di.shared.SharedObjectInterface

    public class SlaveServer
    extends ChangedFlag
    implements Cloneable, org.pentaho.di.shared.SharedObjectInterface, org.pentaho.di.core.variables.VariableSpace, org.pentaho.di.repository.RepositoryElementInterface, org.pentaho.di.core.xml.XMLInterface
    • Field Detail

      • REPOSITORY_ELEMENT_TYPE

        public static final org.pentaho.di.repository.RepositoryObjectType REPOSITORY_ELEMENT_TYPE
      • KETTLE_CARTE_RETRIES

        public static final int KETTLE_CARTE_RETRIES
      • KETTLE_CARTE_RETRY_BACKOFF_INCREMENTS

        public static final int KETTLE_CARTE_RETRY_BACKOFF_INCREMENTS
    • Method Detail

      • getBackoffIncrements

        public static int getBackoffIncrements()
      • getLogChannel

        public org.pentaho.di.core.logging.LogChannelInterface getLogChannel()
      • getXML

        public String getXML()
        Specified by:
        getXML in interface org.pentaho.di.shared.SharedObjectInterface
        Specified by:
        getXML in interface org.pentaho.di.core.xml.XMLInterface
      • replaceMeta

        public void replaceMeta​(SlaveServer slaveServer)
      • getServerAndPort

        public String getServerAndPort()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getHostname

        public String getHostname()
      • setHostname

        public void setHostname​(String urlString)
      • getPassword

        public String getPassword()
        Returns:
        the password
      • setPassword

        public void setPassword​(String password)
        Parameters:
        password - the password to set
      • getUsername

        public String getUsername()
        Returns:
        the username
      • setUsername

        public void setUsername​(String username)
        Parameters:
        username - the username to set
      • getWebAppName

        public String getWebAppName()
        Returns:
        the username
      • setWebAppName

        public void setWebAppName​(String webAppName)
        Parameters:
        webAppName - the web application name to set
      • getNonProxyHosts

        public String getNonProxyHosts()
        Returns:
        the nonProxyHosts
      • setNonProxyHosts

        public void setNonProxyHosts​(String nonProxyHosts)
        Parameters:
        nonProxyHosts - the nonProxyHosts to set
      • getProxyHostname

        public String getProxyHostname()
        Returns:
        the proxyHostname
      • setProxyHostname

        public void setProxyHostname​(String proxyHostname)
        Parameters:
        proxyHostname - the proxyHostname to set
      • getProxyPort

        public String getProxyPort()
        Returns:
        the proxyPort
      • setProxyPort

        public void setProxyPort​(String proxyPort)
        Parameters:
        proxyPort - the proxyPort to set
      • getPropertiesMasterName

        public String getPropertiesMasterName()
        Returns:
        the Master name for read properties
      • isOverrideExistingProperties

        public boolean isOverrideExistingProperties()
        Returns:
        flag for read properties from Master
      • getPort

        public String getPort()
        Returns:
        the port
      • setPort

        public void setPort​(String port)
        Parameters:
        port - the port to set
      • getPortSpecification

        public String getPortSpecification()
      • sendExport

        public String sendExport​(String filename,
                                 String type,
                                 String load)
                          throws Exception
        Send an exported archive over to this slave server
        Parameters:
        filename - The archive to send
        type - The type of file to add to the slave server (AddExportServlet.TYPE_*)
        load - The filename to load in the archive (the .kjb or .ktr)
        Returns:
        the XML of the web result
        Throws:
        Exception - in case something goes awry
      • getAuthContext

        protected org.apache.http.client.protocol.HttpClientContext getAuthContext()
        Returns:
        HttpClientContext with authorization credentials
      • isMaster

        public boolean isMaster()
        Returns:
        the master
      • setMaster

        public void setMaster​(boolean master)
        Parameters:
        master - the master to set
      • getDelay

        public static long getDelay​(int trial)
      • stopTransformation

        public org.pentaho.di.www.WebResult stopTransformation​(String transName,
                                                               String carteObjectId)
                                                        throws Exception
        Throws:
        Exception
      • pauseResumeTransformation

        public org.pentaho.di.www.WebResult pauseResumeTransformation​(String transName,
                                                                      String carteObjectId)
                                                               throws Exception
        Throws:
        Exception
      • removeTransformation

        public org.pentaho.di.www.WebResult removeTransformation​(String transName,
                                                                 String carteObjectId)
                                                          throws Exception
        Throws:
        Exception
      • startTransformation

        public org.pentaho.di.www.WebResult startTransformation​(String transName,
                                                                String carteObjectId)
                                                         throws Exception
        Throws:
        Exception
      • cleanupTransformation

        public org.pentaho.di.www.WebResult cleanupTransformation​(String transName,
                                                                  String carteObjectId)
                                                           throws Exception
        Throws:
        Exception
      • deAllocateServerSockets

        public org.pentaho.di.www.WebResult deAllocateServerSockets​(String transName,
                                                                    String clusteredRunId)
                                                             throws Exception
        Throws:
        Exception
      • findSlaveServer

        public static SlaveServer findSlaveServer​(List<SlaveServer> slaveServers,
                                                  org.pentaho.di.repository.ObjectId id)
      • getName

        public String getName()
        Specified by:
        getName in interface org.pentaho.di.repository.RepositoryElementInterface
        Specified by:
        getName in interface org.pentaho.di.repository.RepositoryObjectInterface
        Specified by:
        getName in interface org.pentaho.di.shared.SharedObjectInterface
      • setName

        public void setName​(String name)
        Specified by:
        setName in interface org.pentaho.di.repository.RepositoryElementInterface
      • isShared

        public boolean isShared()
        Specified by:
        isShared in interface org.pentaho.di.shared.SharedObjectInterface
      • setShared

        public void setShared​(boolean shared)
        Specified by:
        setShared in interface org.pentaho.di.shared.SharedObjectInterface
      • copyVariablesFrom

        public void copyVariablesFrom​(org.pentaho.di.core.variables.VariableSpace space)
        Specified by:
        copyVariablesFrom in interface org.pentaho.di.core.variables.VariableSpace
      • environmentSubstitute

        public String environmentSubstitute​(String aString)
        Specified by:
        environmentSubstitute in interface org.pentaho.di.core.variables.VariableSpace
      • environmentSubstitute

        public String[] environmentSubstitute​(String[] aString)
        Specified by:
        environmentSubstitute in interface org.pentaho.di.core.variables.VariableSpace
      • fieldSubstitute

        public String fieldSubstitute​(String aString,
                                      org.pentaho.di.core.row.RowMetaInterface rowMeta,
                                      Object[] rowData)
                               throws org.pentaho.di.core.exception.KettleValueException
        Specified by:
        fieldSubstitute in interface org.pentaho.di.core.variables.VariableSpace
        Throws:
        org.pentaho.di.core.exception.KettleValueException
      • getParentVariableSpace

        public org.pentaho.di.core.variables.VariableSpace getParentVariableSpace()
        Specified by:
        getParentVariableSpace in interface org.pentaho.di.core.variables.VariableSpace
      • setParentVariableSpace

        public void setParentVariableSpace​(org.pentaho.di.core.variables.VariableSpace parent)
        Specified by:
        setParentVariableSpace in interface org.pentaho.di.core.variables.VariableSpace
      • getVariable

        public String getVariable​(String variableName,
                                  String defaultValue)
        Specified by:
        getVariable in interface org.pentaho.di.core.variables.VariableSpace
      • getVariable

        public String getVariable​(String variableName)
        Specified by:
        getVariable in interface org.pentaho.di.core.variables.VariableSpace
      • getBooleanValueOfVariable

        public boolean getBooleanValueOfVariable​(String variableName,
                                                 boolean defaultValue)
        Specified by:
        getBooleanValueOfVariable in interface org.pentaho.di.core.variables.VariableSpace
      • initializeVariablesFrom

        public void initializeVariablesFrom​(org.pentaho.di.core.variables.VariableSpace parent)
        Specified by:
        initializeVariablesFrom in interface org.pentaho.di.core.variables.VariableSpace
      • listVariables

        public String[] listVariables()
        Specified by:
        listVariables in interface org.pentaho.di.core.variables.VariableSpace
      • setVariable

        public void setVariable​(String variableName,
                                String variableValue)
        Specified by:
        setVariable in interface org.pentaho.di.core.variables.VariableSpace
      • shareVariablesWith

        public void shareVariablesWith​(org.pentaho.di.core.variables.VariableSpace space)
        Specified by:
        shareVariablesWith in interface org.pentaho.di.core.variables.VariableSpace
      • injectVariables

        public void injectVariables​(Map<String,​String> prop)
        Specified by:
        injectVariables in interface org.pentaho.di.core.variables.VariableSpace
      • getObjectId

        public org.pentaho.di.repository.ObjectId getObjectId()
        Specified by:
        getObjectId in interface org.pentaho.di.repository.RepositoryElementInterface
        Specified by:
        getObjectId in interface org.pentaho.di.repository.RepositoryObjectInterface
      • setObjectId

        public void setObjectId​(org.pentaho.di.repository.ObjectId id)
        Specified by:
        setObjectId in interface org.pentaho.di.repository.RepositoryElementInterface
      • getRepositoryDirectory

        public org.pentaho.di.repository.RepositoryDirectoryInterface getRepositoryDirectory()
        Not used in this case, simply return root /
        Specified by:
        getRepositoryDirectory in interface org.pentaho.di.repository.RepositoryElementInterface
      • setRepositoryDirectory

        public void setRepositoryDirectory​(org.pentaho.di.repository.RepositoryDirectoryInterface repositoryDirectory)
        Specified by:
        setRepositoryDirectory in interface org.pentaho.di.repository.RepositoryElementInterface
      • getRepositoryElementType

        public org.pentaho.di.repository.RepositoryObjectType getRepositoryElementType()
        Specified by:
        getRepositoryElementType in interface org.pentaho.di.repository.RepositoryElementInterface
      • getObjectRevision

        public org.pentaho.di.repository.ObjectRevision getObjectRevision()
        Specified by:
        getObjectRevision in interface org.pentaho.di.repository.RepositoryElementInterface
      • setObjectRevision

        public void setObjectRevision​(org.pentaho.di.repository.ObjectRevision objectRevision)
        Specified by:
        setObjectRevision in interface org.pentaho.di.repository.RepositoryElementInterface
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in interface org.pentaho.di.repository.RepositoryElementInterface
      • setDescription

        public void setDescription​(String description)
        Specified by:
        setDescription in interface org.pentaho.di.repository.RepositoryElementInterface
      • verifyAndModifySlaveServerName

        public String verifyAndModifySlaveServerName​(List<SlaveServer> slaveServers,
                                                     String oldname)
        Verify the name of the slave server and if required, change it if it already exists in the list of slave servers.
        Parameters:
        slaveServers - the slave servers to check against.
        oldname - the old name of the slave server
        Returns:
        the new slave server name
      • sniffStep

        public String sniffStep​(String transName,
                                String stepName,
                                String copyNr,
                                int lines,
                                String type)
                         throws Exception
        Sniff rows on a the slave server, return xml containing the row metadata and data.
        Parameters:
        transName - transformation name
        stepName - step name
        copyNr - step copy number
        lines - lines number
        type - step type
        Returns:
        xml with row metadata and data
        Throws:
        Exception
      • getNextSlaveSequenceValue

        public long getNextSlaveSequenceValue​(String slaveSequenceName,
                                              long incrementValue)
                                       throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getChangedDate

        public Date getChangedDate()
        Specified by:
        getChangedDate in interface org.pentaho.di.shared.SharedObjectInterface
        Returns:
        the changedDate
      • setSslMode

        public void setSslMode​(boolean sslMode)
        Parameters:
        sslMode -
      • isSslMode

        public boolean isSslMode()
        Returns:
        the sslMode