/** * Logs a summary message for the specified step. * * @param si the step interface */ public void logSummary( StepInterface si ) { log.logBasic( si.getStepname(), BaseMessages.getString( PKG, "Trans.Log.FinishedProcessing", String.valueOf( si .getLinesInput() ), String.valueOf( si.getLinesOutput() ), String.valueOf( si.getLinesRead() ) ) + BaseMessages .getString( PKG, "Trans.Log.FinishedProcessing2", String.valueOf( si.getLinesWritten() ), String.valueOf( si .getLinesUpdated() ), String.valueOf( si.getErrors() ) ) ); }
@Override public long getLinesInput() { if ( getData() != null && getData().linesInputStepNr != -1 ) { return getData().getMappingTrans().getSteps().get( getData().linesInputStepNr ).step.getLinesInput(); } else { return 0; } }
public static double getProcessCount( Context actualContext, Scriptable actualObject, Object[] ArgList, Function FunctionContext ) { if ( ArgList.length == 1 ) { try { Object scmO = actualObject.get( "_step_", actualObject ); StepInterface scm = (StepInterface) Context.jsToJava( scmO, StepInterface.class ); String strType = Context.toString( ArgList[0] ).toLowerCase(); if ( strType.equals( "i" ) ) { return scm.getLinesInput(); } else if ( strType.equals( "o" ) ) { return scm.getLinesOutput(); } else if ( strType.equals( "r" ) ) { return scm.getLinesRead(); } else if ( strType.equals( "u" ) ) { return scm.getLinesUpdated(); } else if ( strType.equals( "w" ) ) { return scm.getLinesWritten(); } else if ( strType.equals( "e" ) ) { return scm.getLinesRejected(); } else { return 0; } } catch ( Exception e ) { // throw Context.reportRuntimeError(e.toString()); return 0; } } else { throw Context.reportRuntimeError( "The function call getProcessCount requires 1 argument." ); } }
step.getLinesRead(), step.getLinesWritten(), step.getLinesInput(), step.getLinesOutput(), step .getLinesUpdated(), step.getLinesRejected(), step.getErrors() );
public synchronized void updateAll( StepInterface baseStep ) { // Proc: nr of lines processed: input + output! this.stepname = baseStep.getStepname(); this.copy = baseStep.getCopy(); this.linesRead = linesRead + baseStep.getLinesRead(); this.linesWritten = linesWritten + baseStep.getLinesWritten(); this.linesInput = linesInput + baseStep.getLinesInput(); this.linesOutput = linesOutput + baseStep.getLinesOutput(); this.linesUpdated = linesUpdated + baseStep.getLinesUpdated(); this.linesRejected = linesRejected + baseStep.getLinesRejected(); this.errors = errors + baseStep.getErrors(); this.accumlatedRuntime = accumlatedRuntime + baseStep.getRuntime(); this.statusDescription = baseStep.getStatus().getDescription(); long in_proc = Math.max( linesInput, linesRead ); long out_proc = Math.max( linesOutput + linesUpdated, linesWritten + linesRejected ); float lapsed = ( (float) accumlatedRuntime ) / 1000; double in_speed = 0; double out_speed = 0; if ( lapsed != 0 ) { in_speed = Math.floor( 10 * ( in_proc / lapsed ) ) / 10; out_speed = Math.floor( 10 * ( out_proc / lapsed ) ) / 10; } double speedNumber = ( in_speed > out_speed ? in_speed : out_speed ); this.seconds = Math.floor( ( lapsed * 10 ) + 0.5 ) / 10; this.speed = lapsed == 0 ? "-" : " " + speedDf.format( speedNumber ); this.priority = baseStep.isRunning() ? " " + baseStep.rowsetInputSize() + "/" + baseStep.rowsetOutputSize() : "-"; this.stopped = baseStep.isStopped(); this.paused = baseStep.isPaused(); }
break; case LINES_INPUT: value = new Long( combi.step.getLinesInput() ); break; case LINES_OUTPUT:
step.getLogChannel().snap( Metrics.METRIC_STEP_EXECUTION_STOP ); try { long li = step.getLinesInput(); long lo = step.getLinesOutput(); long lr = step.getLinesRead();
result.setNrLinesInput( result.getNrLinesInput() + step.getLinesInput() );
rowData[index++] = step.getLinesInput();