private void drawHop( TransHopMeta hi, boolean isCandidate ) { StepMeta fs = hi.getFromStep(); StepMeta ts = hi.getToStep(); if ( fs != null && ts != null ) { drawLine( fs, ts, hi, isCandidate ); } }
/** * Find a certain hop in the transformation. * * @param hi * The hop information to look for. * @return The hop or null if no hop was found. */ public TransHopMeta findTransHop( TransHopMeta hi ) { return findTransHop( hi.getFromStep(), hi.getToStep() ); }
public Partitioner getInstance() { Partitioner partitioner = new ModPartitioner(); partitioner.setId( getId() ); partitioner.setDescription( getDescription() ); return partitioner; }
/** * Find the fields that are entering a certain step. * * @param stepMeta * The step queried * @return A row containing the fields (w/ origin) entering the step * @throws KettleStepException * the kettle step exception */ public RowMetaInterface getPrevStepFields( StepMeta stepMeta ) throws KettleStepException { return getPrevStepFields( stepMeta, null ); }
protected void executeTrans( Trans trans ) throws KettleException { trans.prepareExecution( null ); trans.startThreads(); trans.waitUntilFinished(); }
/** * Checks if the transformation is referenced by a file. If the transformation is not referenced by a repository, it * is assumed to be referenced by a file. * * @return true if the transformation is referenced by a file, false otherwise * @see #isRepReference() */ public boolean isFileReference() { return !isRepReference( getFilename(), this.getName() ); }
/** * Searches the list of steps for a step with a certain name. * * @param name * The name of the step to look for * @return The step information or null if no nothing was found. */ public StepMeta findStep( String name ) { return findStep( name, null ); }
private void wireUpTestTransMeta( TransMeta transMeta, StepMeta toBeAppended1, StepMeta toBeAppended2, StepMeta append, StepMeta after ) { transMeta.addStep( append ); transMeta.addStep( after ); transMeta.addStep( toBeAppended1 ); transMeta.addStep( toBeAppended2 ); transMeta.addTransHop( new TransHopMeta( toBeAppended1, append ) ); transMeta.addTransHop( new TransHopMeta( toBeAppended2, append ) ); transMeta.addTransHop( new TransHopMeta( append, after ) ); }
/** * Executes the transformation. This method will prepare the transformation for execution and then start all the * threads associated with the transformation and its steps. * * @param arguments the arguments * @throws KettleException if the transformation could not be prepared (initialized) */ public void execute( String[] arguments ) throws KettleException { prepareExecution( arguments ); startThreads(); }
@SuppressWarnings ( "deprecation" ) private void checkCompatibility() { // If we don't have a previous result and transMeta does have one, someone has been using a deprecated method. // if ( transMeta.getPreviousResult() != null && getPreviousResult() == null ) { setPreviousResult( transMeta.getPreviousResult() ); } // If we don't have arguments set and TransMeta has, someone has been using a deprecated method. // if ( transMeta.getArguments() != null && getArguments() == null ) { setArguments( transMeta.getArguments() ); } }
/** * Returns the fields that are emitted by a certain step. * * @param stepMeta * The step to be queried. * @return A row containing the fields emitted. * @throws KettleStepException * the kettle step exception */ public RowMetaInterface getStepFields( StepMeta stepMeta ) throws KettleStepException { return getStepFields( stepMeta, null ); }
public Partitioner clone() { Partitioner partitioner = getInstance(); partitioner.setId( id ); partitioner.setDescription( description ); partitioner.setMeta( meta ); return partitioner; }
@Override public void run() { if ( !isFinished() ) { addStepPerformanceSnapShot(); } } };
private void setHopEnabled( TransHopMeta hop, boolean enabled ) { hop.setEnabled( enabled ); transMeta.clearCaches(); }
/** * Sets the repository object for the transformation. * * @param repository the repository object to set */ public void setRepository( Repository repository ) { this.repository = repository; if ( transMeta != null ) { transMeta.setRepository( repository ); } }
protected void testClone() { T metaToSave = createMeta(); Map<String, FieldLoadSaveValidator<?>> validatorMap = createValidatorMapAndInvokeSetters( xmlAttributes, metaToSave ); @SuppressWarnings( "unchecked" ) T metaLoaded = (T) metaToSave.clone(); validateLoadedMeta( xmlAttributes, validatorMap, metaToSave, metaLoaded ); } }
/** * Builds a list of all the SQL statements that this transformation needs in order to work properly. * * @return An ArrayList of SQLStatement objects. * @throws KettleStepException * if any errors occur during SQL statement generation */ public List<SQLStatement> getSQLStatements() throws KettleStepException { return getSQLStatements( null ); }
/** * Gets the object name. * * @return the object name * @see org.pentaho.di.core.logging.LoggingObjectInterface#getObjectName() */ @Override public String getObjectName() { return getName(); }
public int getPartition( String slaveServerName, String partitionSchemaName, int stepCopyNr ) { return getPartition( new SlaveStepCopy( slaveServerName, partitionSchemaName, stepCopyNr ) ); }
/** * Clear the error in the transformation, clear all the rows from all the row sets... */ public void clearError() { trans.clearError(); } }