Package org.pentaho.di.trans.step
Class RemoteStep
- java.lang.Object
-
- org.pentaho.di.trans.step.RemoteStep
-
- All Implemented Interfaces:
Cloneable,Comparable<RemoteStep>,org.pentaho.di.core.xml.XMLInterface
public class RemoteStep extends Object implements Cloneable, org.pentaho.di.core.xml.XMLInterface, Comparable<RemoteStep>
Defines and handles communication to and from remote steps. TODO: add compression as a parameter/option TODO add buffer size as a parameter- Author:
- Matt
-
-
Field Summary
Fields Modifier and Type Field Description protected BufferedOutputStreambufferedOutputStreamprotected org.pentaho.di.core.row.RowMetaInterfacerowMetaAtomicBooleanstoppedstatic StringXML_TAG
-
Constructor Summary
Constructors Constructor Description RemoteStep(String hostname, String remoteHostname, String port, String sourceStep, int sourceStepCopyNr, String targetStep, int targetStepCopyNr, String sourceSlaveServerName, String targetSlaveServerName, int bufferSize, boolean compressingStreams, org.pentaho.di.core.row.RowMetaInterface rowMeta)RemoteStep(Node node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()Close left-over sockets, streams and so on.Objectclone()intcompareTo(RemoteStep remoteStep)booleanequals(Object obj)protected voidfinalize()intgetBufferSize()StringgetHostname()byte[]getKey()StringgetPort()intStringgetRemoteHostname()org.pentaho.di.core.row.RowMetaInterfacegetRowMeta()ServerSocketgetServerSocket()SocketgetSocket()StringgetSourceSlaveServerName()StringgetSourceStep()intgetSourceStepCopyNr()StringgetTargetSlaveServerName()StringgetTargetStep()intgetTargetStepCopyNr()StringgetXML()inthashCode()booleanisCompressingStreams()booleanisEncryptingStreams()org.pentaho.di.core.BlockingRowSetopenReaderSocket(BaseStep baseStep)voidopenServerSocket(BaseStep baseStep)org.pentaho.di.core.BlockingRowSetopenWriterSocket()Open a socket for writing.voidsetBufferSize(int bufferSize)voidsetCompressingStreams(boolean compressingStreams)voidsetEncryptingStreams(boolean encryptingStreams)voidsetHostname(String hostname)voidsetKey(byte[] key)voidsetPort(String port)voidsetRemoteHostname(String remoteHostname)voidsetRowMeta(org.pentaho.di.core.row.RowMetaInterface rowMeta)voidsetSocket(Socket socket)voidsetSourceSlaveServerName(String sourceSlaveServerName)voidsetSourceStep(String sourceStep)voidsetSourceStepCopyNr(int sourceStepCopyNr)voidsetTargetSlaveServerName(String targetSlaveServerName)voidsetTargetStep(String targetStep)voidsetTargetStepCopyNr(int targetStepCopyNr)StringtoString()
-
-
-
Field Detail
-
XML_TAG
public static final String XML_TAG
- See Also:
- Constant Field Values
-
stopped
public AtomicBoolean stopped
-
bufferedOutputStream
protected BufferedOutputStream bufferedOutputStream
-
rowMeta
protected org.pentaho.di.core.row.RowMetaInterface rowMeta
-
-
Constructor Detail
-
RemoteStep
public RemoteStep(String hostname, String remoteHostname, String port, String sourceStep, int sourceStepCopyNr, String targetStep, int targetStepCopyNr, String sourceSlaveServerName, String targetSlaveServerName, int bufferSize, boolean compressingStreams, org.pentaho.di.core.row.RowMetaInterface rowMeta)
- Parameters:
hostname-remoteHostname-port-sourceStep-sourceStepCopyNr-targetStep-targetStepCopyNr-sourceSlaveServerName-targetSlaveServerName-bufferSize-compressingStreams-rowMeta- The expected row layout to pass through this step. (input or output)
-
RemoteStep
public RemoteStep(Node node) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
-
Method Detail
-
getXML
public String getXML()
- Specified by:
getXMLin interfaceorg.pentaho.di.core.xml.XMLInterface
-
compareTo
public int compareTo(RemoteStep remoteStep)
- Specified by:
compareToin interfaceComparable<RemoteStep>
-
getHostname
public String getHostname()
- Returns:
- the host name
-
setHostname
public void setHostname(String hostname)
- Parameters:
hostname- the host name to set
-
getPort
public String getPort()
int- Returns:
- the port
-
setPort
public void setPort(String port)
- Parameters:
port- the port to set
-
openServerSocket
public void openServerSocket(BaseStep baseStep) throws IOException
- Throws:
IOException
-
getServerSocket
public ServerSocket getServerSocket()
- Returns:
- the serverSocket that is created by the open server socket method.
-
getSocket
public Socket getSocket()
- Returns:
- the socket
-
setSocket
public void setSocket(Socket socket)
- Parameters:
socket- the socket to set
-
openWriterSocket
public org.pentaho.di.core.BlockingRowSet openWriterSocket() throws IOExceptionOpen a socket for writing.- Returns:
- the RowSet created that will accept the rows for the remote step
- Throws:
IOException
-
cleanup
public void cleanup()
Close left-over sockets, streams and so on.
-
openReaderSocket
public org.pentaho.di.core.BlockingRowSet openReaderSocket(BaseStep baseStep) throws IOException, org.pentaho.di.core.exception.KettleException
- Throws:
IOExceptionorg.pentaho.di.core.exception.KettleException
-
getSourceStep
public String getSourceStep()
- Returns:
- the sourceStep
-
setSourceStep
public void setSourceStep(String sourceStep)
- Parameters:
sourceStep- the sourceStep to set
-
getTargetStep
public String getTargetStep()
- Returns:
- the targetStep
-
setTargetStep
public void setTargetStep(String targetStep)
- Parameters:
targetStep- the targetStep to set
-
getTargetSlaveServerName
public String getTargetSlaveServerName()
- Returns:
- the targetSlaveServerName
-
setTargetSlaveServerName
public void setTargetSlaveServerName(String targetSlaveServerName)
- Parameters:
targetSlaveServerName- the targetSlaveServerName to set
-
getSourceStepCopyNr
public int getSourceStepCopyNr()
- Returns:
- the sourceStepCopyNr
-
setSourceStepCopyNr
public void setSourceStepCopyNr(int sourceStepCopyNr)
- Parameters:
sourceStepCopyNr- the sourceStepCopyNr to set
-
getTargetStepCopyNr
public int getTargetStepCopyNr()
- Returns:
- the targetStepCopyNr
-
setTargetStepCopyNr
public void setTargetStepCopyNr(int targetStepCopyNr)
- Parameters:
targetStepCopyNr- the targetStepCopyNr to set
-
getBufferSize
public int getBufferSize()
- Returns:
- the bufferSize
-
setBufferSize
public void setBufferSize(int bufferSize)
- Parameters:
bufferSize- the bufferSize to set
-
isCompressingStreams
public boolean isCompressingStreams()
- Returns:
- the compressingStreams
-
setCompressingStreams
public void setCompressingStreams(boolean compressingStreams)
- Parameters:
compressingStreams- the compressingStreams to set
-
getRemoteHostname
public String getRemoteHostname()
- Returns:
- the remoteHostname
-
setRemoteHostname
public void setRemoteHostname(String remoteHostname)
- Parameters:
remoteHostname- the remoteHostname to set
-
getSourceSlaveServerName
public String getSourceSlaveServerName()
- Returns:
- the sourceSlaveServer name
-
setSourceSlaveServerName
public void setSourceSlaveServerName(String sourceSlaveServerName)
- Parameters:
sourceSlaveServerName- the sourceSlaveServerName to set
-
finalize
protected void finalize() throws Throwable
-
getRowMeta
public org.pentaho.di.core.row.RowMetaInterface getRowMeta()
-
setRowMeta
public void setRowMeta(org.pentaho.di.core.row.RowMetaInterface rowMeta)
-
isEncryptingStreams
public boolean isEncryptingStreams()
-
setEncryptingStreams
public void setEncryptingStreams(boolean encryptingStreams)
-
getKey
public byte[] getKey()
-
setKey
public void setKey(byte[] key)
-
-