@Test public void testGetFields() throws Exception { TransExecutorMeta meta = new TransExecutorMeta(); meta = spy( meta ); StepMeta nextStep = mock( StepMeta.class ); meta.getFields( null, null, null, nextStep, null, null, null ); verify( meta, never() ).addFieldToRow( any( RowMetaInterface.class ), anyString(), anyInt() ); RowMetaInterface rowMeta = mock( RowMetaInterface.class ); meta.getFields( rowMeta, null, null, nextStep, null, null, null ); verify( rowMeta, never() ).clear(); StepMeta executionResultTargetStepMeta = mock( StepMeta.class ); meta.setExecutionResultTargetStepMeta( executionResultTargetStepMeta ); meta.getFields( rowMeta, null, null, nextStep, null, null, null ); verify( rowMeta, atMost( 1 ) ).clear(); meta.setExecutionResultTargetStepMeta( null ); StepMeta resultFilesTargetStepMeta = mock( StepMeta.class ); meta.setResultFilesTargetStepMeta( resultFilesTargetStepMeta ); meta.getFields( rowMeta, null, null, nextStep, null, null, null ); verify( rowMeta, atMost( 1 ) ).clear(); meta.setResultFilesTargetStepMeta( null ); StepMeta outputRowsSourceStepMeta = mock( StepMeta.class ); meta.setOutputRowsSourceStepMeta( outputRowsSourceStepMeta ); meta.getFields( rowMeta, null, null, nextStep, null, null, null ); verify( rowMeta, atMost( 1 ) ).clear(); meta.setOutputRowsSourceStepMeta( null ); }
@Override public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException { if ( nextStep != null ) { if ( nextStep.equals( executionResultTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( resultFilesTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFileFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( outputRowsSourceStepMeta ) ) { inputRowMeta.clear(); prepareResultsRowsFields( inputRowMeta ); } } }
TransExecutorMeta extends StepWithMappingMeta implements StepMetaInterface, HasRepositoryInterface { @Override public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException { if ( nextStep != null ) { if ( nextStep.equals( executionResultTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( resultFilesTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFileFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( outputRowsSourceStepMeta ) ) { inputRowMeta.clear(); prepareResultsRowsFields( inputRowMeta ); } } } }
TransExecutorMeta extends StepWithMappingMeta implements StepMetaInterface, HasRepositoryInterface { @Override public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException { if ( nextStep != null ) { if ( nextStep.equals( executionResultTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( resultFilesTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFileFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( outputRowsSourceStepMeta ) ) { inputRowMeta.clear(); prepareResultsRowsFields( inputRowMeta ); } } } TransExecutorMeta(); }
TransExecutorMeta extends StepWithMappingMeta implements StepMetaInterface, HasRepositoryInterface { @Override public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException { if ( nextStep != null ) { if ( nextStep.equals( executionResultTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( resultFilesTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFileFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( outputRowsSourceStepMeta ) ) { inputRowMeta.clear(); prepareResultsRowsFields( inputRowMeta ); } } } TransExecutorMeta(); void allocate( int nrFields ); Object clone(); String getXML(); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); void setDefault(); @Override void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); String[] getInfoSteps(); @Deprecated static synchronized TransMeta loadTransMeta( TransExecutorMeta executorMeta, Repository rep,
      VariableSpace space ); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev,
      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
      IMetaStore metaStore ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
      Trans trans ); @Override List<ResourceReference> getResourceDependencies( TransMeta transMeta, StepMeta stepInfo ); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
      ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ); StepDataInterface getStepData(); @Override StepIOMetaInterface getStepIOMeta(); void handleStreamSelection( StreamInterface stream ); void resetStepIoMeta(); @Override void searchInfoAndTargetSteps( List<StepMeta> steps ); TransformationType[] getSupportedTransformationTypes(); @Override boolean hasRepositoryReferences(); @Override void lookupRepositoryReferences( Repository repository ); TransExecutorParameters getMappingParameters(); void setMappingParameters( TransExecutorParameters mappingParameters ); Repository getRepository(); void setRepository( Repository repository ); TransExecutorParameters getParameters(); void setParameters( TransExecutorParameters parameters ); String getExecutionTimeField(); void setExecutionTimeField( String executionTimeField ); String getExecutionResultField(); void setExecutionResultField( String executionResultField ); String getExecutionNrErrorsField(); void setExecutionNrErrorsField( String executionNrErrorsField ); String getExecutionLinesReadField(); void setExecutionLinesReadField( String executionLinesReadField ); String getExecutionLinesWrittenField(); void setExecutionLinesWrittenField( String executionLinesWrittenField ); String getExecutionLinesInputField(); void setExecutionLinesInputField( String executionLinesInputField ); String getExecutionLinesOutputField(); void setExecutionLinesOutputField( String executionLinesOutputField ); String getExecutionLinesRejectedField(); void setExecutionLinesRejectedField( String executionLinesRejectedField ); String getExecutionLinesUpdatedField(); void setExecutionLinesUpdatedField( String executionLinesUpdatedField ); String getExecutionLinesDeletedField(); void setExecutionLinesDeletedField( String executionLinesDeletedField ); String getExecutionFilesRetrievedField(); void setExecutionFilesRetrievedField( String executionFilesRetrievedField ); String getExecutionExitStatusField(); void setExecutionExitStatusField( String executionExitStatusField ); String getExecutionLogTextField(); void setExecutionLogTextField( String executionLogTextField ); String getExecutionLogChannelIdField(); void setExecutionLogChannelIdField( String executionLogChannelIdField ); String getGroupSize(); void setGroupSize( String groupSize ); String getGroupField(); void setGroupField( String groupField ); String getGroupTime(); void setGroupTime( String groupTime ); @Override boolean excludeFromCopyDistributeVerification(); String getExecutionResultTargetStep(); void setExecutionResultTargetStep( String executionResultTargetStep ); StepMeta getExecutionResultTargetStepMeta(); void setExecutionResultTargetStepMeta( StepMeta executionResultTargetStepMeta ); String getResultFilesFileNameField(); void setResultFilesFileNameField( String resultFilesFileNameField ); String[] getReferencedObjectDescriptions(); boolean[] isReferencedObjectEnabled(); Object loadReferencedObject( int index, Repository rep, IMetaStore metaStore, VariableSpace space ); IMetaStore getMetaStore(); void setMetaStore( IMetaStore metaStore ); String getOutputRowsSourceStep(); void setOutputRowsSourceStep( String outputRowsSourceStep ); StepMeta getOutputRowsSourceStepMeta(); void setOutputRowsSourceStepMeta( StepMeta outputRowsSourceStepMeta ); String[] getOutputRowsField(); void setOutputRowsField( String[] outputRowsField ); int[] getOutputRowsType(); void setOutputRowsType( int[] outputRowsType ); int[] getOutputRowsLength(); void setOutputRowsLength( int[] outputRowsLength ); int[] getOutputRowsPrecision(); void setOutputRowsPrecision( int[] outputRowsPrecision ); String getResultFilesTargetStep(); void setResultFilesTargetStep( String resultFilesTargetStep ); StepMeta getResultFilesTargetStepMeta(); void setResultFilesTargetStepMeta( StepMeta resultFilesTargetStepMeta ); String getExecutorsOutputStep(); void setExecutorsOutputStep( String executorsOutputStep ); StepMeta getExecutorsOutputStepMeta(); void setExecutorsOutputStepMeta( StepMeta executorsOutputStepMeta ); @Override boolean cleanAfterHopFromRemove(); }
TransExecutorMeta extends StepWithMappingMeta implements StepMetaInterface, HasRepositoryInterface { @Override public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException { if ( nextStep != null ) { if ( nextStep.equals( executionResultTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( resultFilesTargetStepMeta ) ) { inputRowMeta.clear(); prepareExecutionResultsFileFields( inputRowMeta, nextStep ); } else if ( nextStep.equals( outputRowsSourceStepMeta ) ) { inputRowMeta.clear(); prepareResultsRowsFields( inputRowMeta ); } } } TransExecutorMeta(); void allocate( int nrFields ); Object clone(); String getXML(); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); void setDefault(); @Override void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); String[] getInfoSteps(); @Deprecated static synchronized TransMeta loadTransMeta( TransExecutorMeta executorMeta, Repository rep,
      VariableSpace space ); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev,
      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
      IMetaStore metaStore ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
      Trans trans ); @Override List<ResourceReference> getResourceDependencies( TransMeta transMeta, StepMeta stepInfo ); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
      ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ); StepDataInterface getStepData(); @Override StepIOMetaInterface getStepIOMeta(); void handleStreamSelection( StreamInterface stream ); void resetStepIoMeta(); @Override void searchInfoAndTargetSteps( List<StepMeta> steps ); TransformationType[] getSupportedTransformationTypes(); @Override boolean hasRepositoryReferences(); @Override void lookupRepositoryReferences( Repository repository ); TransExecutorParameters getMappingParameters(); void setMappingParameters( TransExecutorParameters mappingParameters ); Repository getRepository(); void setRepository( Repository repository ); TransExecutorParameters getParameters(); void setParameters( TransExecutorParameters parameters ); String getExecutionTimeField(); void setExecutionTimeField( String executionTimeField ); String getExecutionResultField(); void setExecutionResultField( String executionResultField ); String getExecutionNrErrorsField(); void setExecutionNrErrorsField( String executionNrErrorsField ); String getExecutionLinesReadField(); void setExecutionLinesReadField( String executionLinesReadField ); String getExecutionLinesWrittenField(); void setExecutionLinesWrittenField( String executionLinesWrittenField ); String getExecutionLinesInputField(); void setExecutionLinesInputField( String executionLinesInputField ); String getExecutionLinesOutputField(); void setExecutionLinesOutputField( String executionLinesOutputField ); String getExecutionLinesRejectedField(); void setExecutionLinesRejectedField( String executionLinesRejectedField ); String getExecutionLinesUpdatedField(); void setExecutionLinesUpdatedField( String executionLinesUpdatedField ); String getExecutionLinesDeletedField(); void setExecutionLinesDeletedField( String executionLinesDeletedField ); String getExecutionFilesRetrievedField(); void setExecutionFilesRetrievedField( String executionFilesRetrievedField ); String getExecutionExitStatusField(); void setExecutionExitStatusField( String executionExitStatusField ); String getExecutionLogTextField(); void setExecutionLogTextField( String executionLogTextField ); String getExecutionLogChannelIdField(); void setExecutionLogChannelIdField( String executionLogChannelIdField ); String getGroupSize(); void setGroupSize( String groupSize ); String getGroupField(); void setGroupField( String groupField ); String getGroupTime(); void setGroupTime( String groupTime ); @Override boolean excludeFromCopyDistributeVerification(); String getExecutionResultTargetStep(); void setExecutionResultTargetStep( String executionResultTargetStep ); StepMeta getExecutionResultTargetStepMeta(); void setExecutionResultTargetStepMeta( StepMeta executionResultTargetStepMeta ); String getResultFilesFileNameField(); void setResultFilesFileNameField( String resultFilesFileNameField ); String[] getReferencedObjectDescriptions(); boolean[] isReferencedObjectEnabled(); Object loadReferencedObject( int index, Repository rep, IMetaStore metaStore, VariableSpace space ); IMetaStore getMetaStore(); void setMetaStore( IMetaStore metaStore ); String getOutputRowsSourceStep(); void setOutputRowsSourceStep( String outputRowsSourceStep ); StepMeta getOutputRowsSourceStepMeta(); void setOutputRowsSourceStepMeta( StepMeta outputRowsSourceStepMeta ); String[] getOutputRowsField(); void setOutputRowsField( String[] outputRowsField ); int[] getOutputRowsType(); void setOutputRowsType( int[] outputRowsType ); int[] getOutputRowsLength(); void setOutputRowsLength( int[] outputRowsLength ); int[] getOutputRowsPrecision(); void setOutputRowsPrecision( int[] outputRowsPrecision ); String getResultFilesTargetStep(); void setResultFilesTargetStep( String resultFilesTargetStep ); StepMeta getResultFilesTargetStepMeta(); void setResultFilesTargetStepMeta( StepMeta resultFilesTargetStepMeta ); String getExecutorsOutputStep(); void setExecutorsOutputStep( String executorsOutputStep ); StepMeta getExecutorsOutputStepMeta(); void setExecutorsOutputStepMeta( StepMeta executorsOutputStepMeta ); @Override boolean cleanAfterHopFromRemove();  }