public void stop() { stopped = true; for ( Trans subTrans : running ) { subTrans.stopAll(); } running.clear(); for ( Map.Entry<String, StepStatus> entry : statuses.entrySet() ) { entry.getValue().setStatusDescription( StepExecutionStatus.STATUS_STOPPED.getDescription() ); } }
private synchronized void updateStatuses( Trans subtrans ) { List<StepMetaDataCombi> steps = subtrans.getSteps(); for ( StepMetaDataCombi combi : steps ) { StepStatus stepStatus; if ( statuses.containsKey( combi.stepname ) ) { stepStatus = statuses.get( combi.stepname ); stepStatus.updateAll( combi.step ); } else { stepStatus = new StepStatus( combi.step ); statuses.put( combi.stepname, stepStatus ); } stepStatus.setStatusDescription( StepExecutionStatus.STATUS_RUNNING.getDescription() ); } }
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(); }
String[] subFields = subStepStatus.getTransLogFields( baseStep.getStatus().getDescription() ); subFields[ STEP_NAME_COLUMN ] = " " + subFields[ STEP_NAME_COLUMN ]; TableItem subItem = new TableItem( table, SWT.NONE ); String[] subFields = subStepStatus.getTransLogFields( baseStep.getStatus().getDescription() ); subFields[ STEP_NAME_COLUMN ] = " " + subFields[ STEP_NAME_COLUMN ]; if ( ( subFields[ STEP_NAME_COLUMN ] ).equals( tableSubStepName ) ) {
verify( daemonEndpoint ).sendMessage( argThat( matchesSafeStop() ) ); List<StepMetaDataCombi> steps = adapter.getSteps(); steps.stream().map( s -> s.step ).forEach( step -> assertEquals( "Halting", step.getStatus().getDescription() ) ); latch.countDown();
/** * Gets the status description. * * @return the status description */ public String getStatusDescription() { return getStatus().getDescription(); }