/** * Finds the RowSet between two steps (or copies of steps). * * @param from the name of the "from" step * @param fromcopy the copy number of the "from" step * @param to the name of the "to" step * @param tocopy the copy number of the "to" step * @return the row set, or null if none found */ public RowSet findRowSet( String from, int fromcopy, String to, int tocopy ) { // Start with the transformation. for ( int i = 0; i < rowsets.size(); i++ ) { RowSet rs = rowsets.get( i ); if ( rs.getOriginStepName().equalsIgnoreCase( from ) && rs.getDestinationStepName().equalsIgnoreCase( to ) && rs .getOriginStepCopy() == fromcopy && rs.getDestinationStepCopy() == tocopy ) { return rs; } } return null; }
try { for ( RowSet rs : outputRowSets ) { if ( rs.getOriginStepName().equalsIgnoreCase( from ) && rs.getDestinationStepName().equalsIgnoreCase( to ) && rs.getOriginStepCopy() == fromcopy && rs.getDestinationStepCopy() == tocopy ) { if ( rs.getOriginStepName().equalsIgnoreCase( from ) ) { return rs;
try { for ( RowSet rs : inputRowSets ) { if ( rs.getOriginStepName().equalsIgnoreCase( from ) && rs.getDestinationStepName().equalsIgnoreCase( to ) && rs.getOriginStepCopy() == fromcopy && rs.getDestinationStepCopy() == tocopy ) {
PKG, "JoinRows.Log.RowsFound", meta.getCacheSize() + "", data.rs[data.filenr].getOriginStepName() ) );
Mockito.when( rowSet.getOriginStepName() ).thenReturn( name ); Mockito.when( rowSet.getDestinationStepName() ).thenReturn( "Validator" ); Mockito.when( rowSet.getOriginStepCopy() ).thenReturn( 0 );
private RowSet mockLookupRowSet( boolean binary ) { final int storageType = binary ? ValueMetaInterface.STORAGE_TYPE_BINARY_STRING : ValueMetaInterface.STORAGE_TYPE_NORMAL; Object[][] data = { { "Value1", "1" }, { "Value2", "2" } }; if ( binary ) { convertDataToBinary( data ); } RowSet lookupRowSet = smh.getMockInputRowSet( data ); doReturn( "Lookup" ).when( lookupRowSet ).getOriginStepName(); doReturn( "StreamLookup" ).when( lookupRowSet ).getDestinationStepName(); RowMeta lookupRowMeta = new RowMeta(); ValueMetaString valueMeta = new ValueMetaString( "Value" ); valueMeta.setStorageType( storageType ); valueMeta.setStorageMetadata( new ValueMetaString() ); lookupRowMeta.addValueMeta( valueMeta ); ValueMetaString idMeta = new ValueMetaString( "Id" ); idMeta.setStorageType( storageType ); idMeta.setStorageMetadata( new ValueMetaString() ); lookupRowMeta.addValueMeta( idMeta ); doReturn( lookupRowMeta ).when( lookupRowSet ).getRowMeta(); return lookupRowSet; }
if ( log.isBasic() ) { logBasic( BaseMessages.getString( PKG, "JoinRows.Log.NoRowsComingFromStep" ) + data.rs[filenr].getOriginStepName() + "]" ); if ( log.isBasic() ) { logBasic( BaseMessages.getString( PKG, "JoinRows.Log.NoRowsComingFromStep" ) + data.rs[filenr].getOriginStepName() + "]" );