@GET @Path( "/cleanup/{id : .+}" ) @Produces( { MediaType.APPLICATION_JSON } ) public TransformationStatus cleanupTransformation( @PathParam( "id" ) String id ) { CarteResource.getTransformation( id ).cleanup(); return getTransformationStatus( id ); }
trans.cleanup(); message += Const.CR + BaseMessages.getString( PKG, "TransStatusServlet.Log.TransCleanednup", transName ); } else {
private void disposeTransformation() { try { trans.stopAll(); } catch ( Exception ex ) { ex.printStackTrace(); } try { trans.cleanup(); } catch ( Exception ex ) { ex.printStackTrace(); } }
private void doFinish() { try { trans.cleanup(); } catch ( Exception e ) { //Do Nothing } transformStats.setRowsFinished( true ); transformStats.setTotalRecords( step.getLinesRead() ); // there seems to be an issue with trans.getErrors() reporting 0 - figure it out on our own instead // transformStats.setErrorCount(errorCount); transformStats.setErrorCount( step.getLinesRead() - step.getLinesWritten() ); finished = true; }
trans.cleanup(); } catch ( Exception ex ) { ex.printStackTrace();
protected void executeTransformSync( Trans trans, String listenerStepName, IPentahoSession session ) throws CsvTransformGeneratorException { PdiRowListener rowListener = new PdiRowListener(); if ( listenerStepName != null ) { trans.getStepInterface( listenerStepName, 0 ).addRowListener( rowListener ); } try { trans.startThreads(); } catch ( Exception e ) { error( "Preview Failed: starting threads", e ); //$NON-NLS-1$ throw new CsvTransformGeneratorException( "Preview Failed: starting threads", e, getStackTraceAsString( e ) ); //$NON-NLS-1$ } try { trans.waitUntilFinished(); } catch ( Exception e ) { error( "Preview Failed: running", e ); //$NON-NLS-1$ throw new CsvTransformGeneratorException( "Preview Failed: running", e, getStackTraceAsString( e ) ); //$NON-NLS-1$ } try { trans.cleanup(); } catch ( Exception e ) { error( "Preview Failed: ending", e ); //$NON-NLS-1$ throw new CsvTransformGeneratorException( "Preview Failed: ending", e, getStackTraceAsString( e ) ); //$NON-NLS-1$ } if ( transformStats != null ) { transformStats.setDataRows( rowListener.getWrittenRows() ); } }