/** * Checks the execution status of each step in the transformations. * * @return an array associated with the step list, indicating the status of that step. */ public StepExecutionStatus[] getTransStepExecutionStatusLookup() { if ( steps == null ) { return null; } // we need this snapshot for the TransGridDelegate refresh method to handle the // difference between a timed refresh and continual step status updates int totalSteps = steps.size(); StepExecutionStatus[] tList = new StepExecutionStatus[ totalSteps ]; for ( int i = 0; i < totalSteps; i++ ) { StepMetaDataCombi sid = steps.get( i ); tList[ i ] = sid.step.getStatus(); } return tList; }
/** * Checks whether the transformation steps are running lookup. * * @return a boolean array associated with the step list, indicating whether that step is running a lookup. */ public boolean[] getTransStepIsRunningLookup() { if ( steps == null ) { return null; } boolean[] tResult = new boolean[ steps.size() ]; for ( int i = 0; i < steps.size(); i++ ) { StepMetaDataCombi sid = steps.get( i ); tResult[ i ] = ( sid.step.isRunning() || sid.step.getStatus() != StepExecutionStatus.STATUS_FINISHED ); } return tResult; }
/** * Gets the number of active (i.e. not finished) steps in this transformation * * @return the number of active steps */ public int nrActiveSteps() { if ( steps == null ) { return 0; } int nr = 0; for ( int i = 0; i < steps.size(); i++ ) { StepMetaDataCombi sid = steps.get( i ); // without also considering a step status of not finished, // the step execution results grid shows empty while // the transformation has steps still running. // if ( sid.step.isRunning() ) nr++; if ( sid.step.isRunning() || sid.step.getStatus() != StepExecutionStatus.STATUS_FINISHED ) { nr++; } } return nr; }
@GET @Path( "/status/{id : .+}" ) @Produces( { MediaType.APPLICATION_JSON } ) public TransformationStatus getTransformationStatus( @PathParam( "id" ) String id ) { TransformationStatus status = new TransformationStatus(); // find trans Trans trans = CarteResource.getTransformation( id ); CarteObjectEntry entry = CarteResource.getCarteObjectEntry( id ); status.setId( entry.getId() ); status.setName( entry.getName() ); status.setStatus( trans.getStatus() ); for ( int i = 0; i < trans.nrSteps(); i++ ) { StepInterface step = trans.getRunThread( i ); if ( ( step.isRunning() ) || step.getStatus() != StepExecutionStatus.STATUS_EMPTY ) { StepStatus stepStatus = new StepStatus( step ); status.addStepStatus( stepStatus ); } } return status; }
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(); }
if ( ( baseStep.isRunning() ) || baseStep.getStatus() != StepExecutionStatus.STATUS_EMPTY ) { StepStatus stepStatus = new StepStatus( baseStep ); transStatus.getStepStatusList().add( stepStatus ); for ( int i = 0; i < trans.nrSteps(); i++ ) { StepInterface step = trans.getRunThread( i ); if ( ( step.isRunning() ) || step.getStatus() != StepExecutionStatus.STATUS_EMPTY ) { StepStatus stepStatus = new StepStatus( step ); boolean snif = false;
Entry<Integer, StepInterface> e = it.next(); StepInterface step = e.getValue(); if ( step.getStatus() != StepExecutionStatus.STATUS_FINISHED ) {
private void drawStepStatusIndicator( StepMeta stepMeta ) { if ( stepMeta == null ) { return; } // draw status indicator if ( trans != null ) { Point pt = stepMeta.getLocation(); if ( pt == null ) { pt = new Point( 50, 50 ); } Point screen = real2screen( pt.x, pt.y ); int x = screen.x; int y = screen.y; List<StepInterface> steps = trans.findBaseSteps( stepMeta.getName() ); for ( StepInterface step : steps ) { if ( step.getStatus().equals( StepExecutionStatus.STATUS_FINISHED ) ) { gc.drawImage( EImage.TRUE, ( x + iconsize ) - ( MINI_ICON_SIZE / 2 ) + 4, y - ( MINI_ICON_SIZE / 2 ) - 1, magnification ); } } } }
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();
StepInterface step = e.getValue(); if ( step.getStatus() != StepExecutionStatus.STATUS_FINISHED ) {
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 ) ) {