@Test public void testLoggingObjectIsNotLeakInTrans() throws KettleException { Repository rep = Mockito.mock( Repository.class ); RepositoryDirectoryInterface repInt = Mockito.mock( RepositoryDirectoryInterface.class ); Mockito.when( rep.loadTransformation( Mockito.anyString(), Mockito.any( RepositoryDirectoryInterface.class ), Mockito .any( ProgressMonitorListener.class ), Mockito.anyBoolean(), Mockito.anyString() ) ).thenReturn( meta ); Mockito.when( rep.findDirectory( Mockito.anyString() ) ).thenReturn( repInt ); Trans trans = new Trans( meta, rep, "junit", "junitDir", "fileName" ); assertEquals( "Log channel General assigned", LogChannel.GENERAL.getLogChannelId(), trans.log .getLogChannelId() ); }
@Override public String getLogChannelId() { return log.getLogChannelId(); }
Trans implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface,
    ExecutorInterface, ExtensionDataInterface { @Override public String getLogChannelId() { return log.getLogChannelId(); } }
Trans implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface,
    ExecutorInterface, ExtensionDataInterface { @Override public String getLogChannelId() { return log.getLogChannelId(); } Trans();  Trans( TransMeta transMeta );  Trans( TransMeta transMeta, LoggingObjectInterface parent ); <Parent extends VariableSpace & NamedParams> Trans( Parent parent, Repository rep, String name, String dirname,
      String filename ); }
Trans implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface,
    ExecutorInterface, ExtensionDataInterface { @Override public String getLogChannelId() { return log.getLogChannelId(); } Trans();  Trans( TransMeta transMeta );  Trans( TransMeta transMeta, LoggingObjectInterface parent ); <Parent extends VariableSpace & NamedParams> Trans( Parent parent, Repository rep, String name, String dirname,
      String filename ); void setParent( LoggingObjectInterface parent ); @Override LogChannelInterface getLogChannel(); void setLog( LogChannelInterface log ); String getName(); void execute( String[] arguments ); void prepareExecution( String[] arguments ); void startThreads(); void cleanup(); void logSummary( StepInterface si ); void waitUntilFinished(); int getErrors(); int getEnded(); boolean isFinished(); boolean isFinishedOrStopped(); @Deprecated void killAll(); void printStats( int seconds ); long getLastProcessed(); RowSet findRowSet( String rowsetname ); RowSet findRowSet( String from, int fromcopy, String to, int tocopy ); boolean hasStepStarted( String sname, int copy ); void stopAll(); int nrSteps(); int nrActiveSteps(); boolean[] getTransStepIsRunningLookup(); StepExecutionStatus[] getTransStepExecutionStatusLookup(); StepInterface getRunThread( int i ); StepInterface getRunThread( String name, int copy ); void calculateBatchIdAndDateRange(); void beginProcessing(); Result getResult(); StepInterface findRunThread( String stepname ); List<StepInterface> findBaseSteps( String stepname ); StepInterface findStepInterface( String stepname, int copyNr ); List<StepInterface> findStepInterfaces( String stepname ); StepDataInterface findDataInterface( String name ); Date getStartDate(); Date getEndDate(); boolean isMonitored(); void setMonitored( boolean monitored ); TransMeta getTransMeta(); void setTransMeta( TransMeta transMeta ); Date getCurrentDate(); Date getDepDate(); Date getLogDate(); List<RowSet> getRowsets(); List<StepMetaDataCombi> getSteps(); @Override String toString(); MappingInput[] findMappingInput(); MappingOutput[] findMappingOutput(); StepInterface getStepInterface( String stepname, int copy ); Date getReplayDate(); void setReplayDate( Date replayDate ); void setSafeModeEnabled( boolean safeModeEnabled ); boolean isSafeModeEnabled(); RowProducer addRowProducer( String stepname, int copynr ); Job getParentJob(); void setParentJob( Job parentJob ); StepDataInterface getStepDataInterface( String stepname, int stepcopy ); boolean hasHaltedSteps(); Date getJobStartDate(); Date getJobEndDate(); void setJobEndDate( Date jobEndDate ); void setJobStartDate( Date jobStartDate ); long getPassedBatchId(); void setPassedBatchId( long jobBatchId ); long getBatchId(); void setBatchId( long batchId ); @Deprecated String getThreadName(); @Deprecated void setThreadName( String threadName ); String getStatus(); boolean isInitializing(); void setInitializing( boolean initializing ); boolean isPreparing(); void setPreparing( boolean preparing ); boolean isRunning(); void setRunning( boolean running ); static TransSplitter executeClustered( final TransMeta transMeta,
      final TransExecutionConfiguration executionConfiguration ); static void executeClustered( final TransSplitter transSplitter,
      final TransExecutionConfiguration executionConfiguration ); static final long monitorClusteredTransformation( LogChannelInterface log, TransSplitter transSplitter,
      Job parentJob ); static final long monitorClusteredTransformation( LogChannelInterface log, TransSplitter transSplitter,
      Job parentJob, int sleepTimeSeconds ); static int cleanupCluster( LogChannelInterface log, TransSplitter transSplitter ); static void cleanupSlaveServer( TransSplitter transSplitter, SlaveServer slaveServer,
      TransMeta slaveTransMeta ); static final Result getClusteredTransformationResult( LogChannelInterface log, TransSplitter transSplitter,
      Job parentJob ); static final Result getClusteredTransformationResult( LogChannelInterface log, TransSplitter transSplitter,
      Job parentJob, boolean loggingRemoteWork ); static String sendToSlaveServer( TransMeta transMeta, TransExecutionConfiguration executionConfiguration,
      Repository repository, IMetaStore metaStore ); boolean isReadyToStart(); void setInternalKettleVariables( VariableSpace var ); @Override void copyVariablesFrom( VariableSpace space ); @Override String environmentSubstitute( String aString ); @Override String[] environmentSubstitute( String[] aString ); @Override String fieldSubstitute( String aString, RowMetaInterface rowMeta, Object[] rowData ); @Override VariableSpace getParentVariableSpace(); @Override void setParentVariableSpace( VariableSpace parent ); @Override String getVariable( String variableName, String defaultValue ); @Override String getVariable( String variableName ); @Override boolean getBooleanValueOfVariable( String variableName, boolean defaultValue ); @Override void initializeVariablesFrom( VariableSpace parent ); @Override String[] listVariables(); @Override void setVariable( String variableName, String variableValue ); @Override void shareVariablesWith( VariableSpace space ); @Override void injectVariables( Map<String, String> prop ); void pauseRunning(); void resumeRunning(); boolean isPreview(); void setPreview( boolean preview ); Repository getRepository(); void setRepository( Repository repository ); Map<String, List<StepPerformanceSnapShot>> getStepPerformanceSnapShots(); void setStepPerformanceSnapShots( Map<String, List<StepPerformanceSnapShot>> stepPerformanceSnapShots ); List<TransListener> getTransListeners(); void setTransListeners( List<TransListener> transListeners ); void addTransListener( TransListener transListener ); void setTransStoppedListeners( List<TransStoppedListener> transStoppedListeners ); List<TransStoppedListener> getTransStoppedListeners(); void addTransStoppedListener( TransStoppedListener transStoppedListener ); boolean isPaused(); void setPaused( boolean paused ); boolean isStopped(); void setStopped( boolean stopped ); static void monitorRemoteTransformation( LogChannelInterface log, String carteObjectId, String transName,
      SlaveServer remoteSlaveServer ); static void monitorRemoteTransformation( LogChannelInterface log, String carteObjectId, String transName,
      SlaveServer remoteSlaveServer, int sleepTimeSeconds ); @Override void addParameterDefinition( String key, String defValue, String description ); @Override String getParameterDefault( String key ); @Override String getParameterDescription( String key ); @Override String getParameterValue( String key ); @Override String[] listParameters(); @Override void setParameterValue( String key, String value ); @Override void eraseParameters(); @Override void clearParameters(); @Override void activateParameters(); @Override void copyParametersFrom( NamedParams params ); Trans getParentTrans(); void setParentTrans( Trans parentTrans ); String getMappingStepName(); void setMappingStepName( String mappingStepName ); void setSocketRepository( SocketRepository socketRepository ); SocketRepository getSocketRepository(); @Override String getObjectName(); @Override String getObjectCopy(); @Override String getFilename(); @Override String getLogChannelId(); @Override ObjectId getObjectId(); @Override ObjectRevision getObjectRevision(); @Override LoggingObjectType getObjectType(); @Override LoggingObjectInterface getParent(); @Override RepositoryDirectoryInterface getRepositoryDirectory(); @Override LogLevel getLogLevel(); void setLogLevel( LogLevel logLevel ); List<LoggingHierarchy> getLoggingHierarchy(); @Deprecated Map<String, Trans> getActiveSubtransformations(); void addActiveSubTransformation( final String subTransName, Trans subTrans ); Trans removeActiveSubTransformation( final String subTransName ); Trans getActiveSubTransformation( final String subTransName ); Map<String, Job> getActiveSubjobs(); @Override String getContainerObjectId(); void setContainerObjectId( String containerObjectId ); @Override Date getRegistrationDate(); void setServletPrintWriter( PrintWriter servletPrintWriter ); PrintWriter getServletPrintWriter(); @Override String getExecutingServer(); @Override void setExecutingServer( String executingServer ); @Override String getExecutingUser(); @Override void setExecutingUser( String executingUser ); @Override boolean isGatheringMetrics(); @Override void setGatheringMetrics( boolean gatheringMetrics ); @Override boolean isForcingSeparateLogging(); @Override void setForcingSeparateLogging( boolean forcingSeparateLogging ); List<ResultFile> getResultFiles(); void setResultFiles( List<ResultFile> resultFiles ); List<RowMetaAndData> getResultRows(); void setResultRows( List<RowMetaAndData> resultRows ); Result getPreviousResult(); void setPreviousResult( Result previousResult ); Hashtable<String, Counter> getCounters(); void setCounters( Hashtable<String, Counter> counters ); String[] getArguments(); void setArguments( String[] arguments ); void clearError(); String getTransactionId(); void setTransactionId( String transactionId ); String calculateTransactionId(); IMetaStore getMetaStore(); void setMetaStore( IMetaStore metaStore ); void setServletReponse( HttpServletResponse response ); HttpServletResponse getServletResponse(); void setServletRequest( HttpServletRequest request ); HttpServletRequest getServletRequest(); List<DelegationListener> getDelegationListeners(); void setDelegationListeners( List<DelegationListener> delegationListeners ); void addDelegationListener( DelegationListener delegationListener ); synchronized void doTopologySortOfSteps(); @Override Map<String, Object> getExtensionDataMap(); }
Trans implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface,
    ExecutorInterface, ExtensionDataInterface { @Override public String getLogChannelId() { return log.getLogChannelId(); } Trans();  Trans( TransMeta transMeta );  Trans( TransMeta transMeta, LoggingObjectInterface parent ); <Parent extends VariableSpace & NamedParams> Trans( Parent parent, Repository rep, String name, String dirname,
      String filename ); void setParent( LoggingObjectInterface parent ); @Override LogChannelInterface getLogChannel(); void setLog( LogChannelInterface log ); String getName(); void execute( String[] arguments ); void prepareExecution( String[] arguments ); void startThreads(); void cleanup(); void logSummary( StepInterface si ); void waitUntilFinished(); int getErrors(); int getEnded(); boolean isFinished(); boolean isFinishedOrStopped(); @Deprecated void killAll(); void printStats( int seconds ); long getLastProcessed(); RowSet findRowSet( String rowsetname ); RowSet findRowSet( String from, int fromcopy, String to, int tocopy ); boolean hasStepStarted( String sname, int copy ); void stopAll(); int nrSteps(); int nrActiveSteps(); boolean[] getTransStepIsRunningLookup(); StepExecutionStatus[] getTransStepExecutionStatusLookup(); StepInterface getRunThread( int i ); StepInterface getRunThread( String name, int copy ); void calculateBatchIdAndDateRange(); void beginProcessing(); Result getResult(); StepInterface findRunThread( String stepname ); List<StepInterface> findBaseSteps( String stepname ); StepInterface findStepInterface( String stepname, int copyNr ); List<StepInterface> findStepInterfaces( String stepname ); StepDataInterface findDataInterface( String name ); Date getStartDate(); Date getEndDate(); boolean isMonitored(); void setMonitored( boolean monitored ); TransMeta getTransMeta(); void setTransMeta( TransMeta transMeta ); Date getCurrentDate(); Date getDepDate(); Date getLogDate(); List<RowSet> getRowsets(); List<StepMetaDataCombi> getSteps(); @Override String toString(); MappingInput[] findMappingInput(); MappingOutput[] findMappingOutput(); StepInterface getStepInterface( String stepname, int copy ); Date getReplayDate(); void setReplayDate( Date replayDate ); void setSafeModeEnabled( boolean safeModeEnabled ); boolean isSafeModeEnabled(); RowProducer addRowProducer( String stepname, int copynr ); Job getParentJob(); void setParentJob( Job parentJob ); StepDataInterface getStepDataInterface( String stepname, int stepcopy ); boolean hasHaltedSteps(); Date getJobStartDate(); Date getJobEndDate(); void setJobEndDate( Date jobEndDate ); void setJobStartDate( Date jobStartDate ); long getPassedBatchId(); void setPassedBatchId( long jobBatchId ); long getBatchId(); void setBatchId( long batchId ); @Deprecated String getThreadName(); @Deprecated void setThreadName( String threadName ); String getStatus(); boolean isInitializing(); void setInitializing( boolean initializing ); boolean isPreparing(); void setPreparing( boolean preparing ); boolean isRunning(); void setRunning( boolean running ); static TransSplitter executeClustered( final TransMeta transMeta,
      final TransExecutionConfiguration executionConfiguration ); static void executeClustered( final TransSplitter transSplitter,
      final TransExecutionConfiguration executionConfiguration ); static final long monitorClusteredTransformation( LogChannelInterface log, TransSplitter transSplitter,
      Job parentJob ); static final long monitorClusteredTransformation( LogChannelInterface log, TransSplitter transSplitter,
      Job parentJob, int sleepTimeSeconds ); static int cleanupCluster( LogChannelInterface log, TransSplitter transSplitter ); static void cleanupSlaveServer( TransSplitter transSplitter, SlaveServer slaveServer,
      TransMeta slaveTransMeta ); static final Result getClusteredTransformationResult( LogChannelInterface log, TransSplitter transSplitter,
      Job parentJob ); static final Result getClusteredTransformationResult( LogChannelInterface log, TransSplitter transSplitter,
      Job parentJob, boolean loggingRemoteWork ); static String sendToSlaveServer( TransMeta transMeta, TransExecutionConfiguration executionConfiguration,
      Repository repository, IMetaStore metaStore ); boolean isReadyToStart(); void setInternalKettleVariables( VariableSpace var ); @Override void copyVariablesFrom( VariableSpace space ); @Override String environmentSubstitute( String aString ); @Override String[] environmentSubstitute( String[] aString ); @Override String fieldSubstitute( String aString, RowMetaInterface rowMeta, Object[] rowData ); @Override VariableSpace getParentVariableSpace(); @Override void setParentVariableSpace( VariableSpace parent ); @Override String getVariable( String variableName, String defaultValue ); @Override String getVariable( String variableName ); @Override boolean getBooleanValueOfVariable( String variableName, boolean defaultValue ); @Override void initializeVariablesFrom( VariableSpace parent ); @Override String[] listVariables(); @Override void setVariable( String variableName, String variableValue ); @Override void shareVariablesWith( VariableSpace space ); @Override void injectVariables( Map<String, String> prop ); void pauseRunning(); void resumeRunning(); boolean isPreview(); void setPreview( boolean preview ); Repository getRepository(); void setRepository( Repository repository ); Map<String, List<StepPerformanceSnapShot>> getStepPerformanceSnapShots(); void setStepPerformanceSnapShots( Map<String, List<StepPerformanceSnapShot>> stepPerformanceSnapShots ); List<TransListener> getTransListeners(); void setTransListeners( List<TransListener> transListeners ); void addTransListener( TransListener transListener ); void setTransStoppedListeners( List<TransStoppedListener> transStoppedListeners ); List<TransStoppedListener> getTransStoppedListeners(); void addTransStoppedListener( TransStoppedListener transStoppedListener ); boolean isPaused(); void setPaused( boolean paused ); boolean isStopped(); void setStopped( boolean stopped ); static void monitorRemoteTransformation( LogChannelInterface log, String carteObjectId, String transName,
      SlaveServer remoteSlaveServer ); static void monitorRemoteTransformation( LogChannelInterface log, String carteObjectId, String transName,
      SlaveServer remoteSlaveServer, int sleepTimeSeconds ); @Override void addParameterDefinition( String key, String defValue, String description ); @Override String getParameterDefault( String key ); @Override String getParameterDescription( String key ); @Override String getParameterValue( String key ); @Override String[] listParameters(); @Override void setParameterValue( String key, String value ); @Override void eraseParameters(); @Override void clearParameters(); @Override void activateParameters(); @Override void copyParametersFrom( NamedParams params ); Trans getParentTrans(); void setParentTrans( Trans parentTrans ); String getMappingStepName(); void setMappingStepName( String mappingStepName ); void setSocketRepository( SocketRepository socketRepository ); SocketRepository getSocketRepository(); @Override String getObjectName(); @Override String getObjectCopy(); @Override String getFilename(); @Override String getLogChannelId(); @Override ObjectId getObjectId(); @Override ObjectRevision getObjectRevision(); @Override LoggingObjectType getObjectType(); @Override LoggingObjectInterface getParent(); @Override RepositoryDirectoryInterface getRepositoryDirectory(); @Override LogLevel getLogLevel(); void setLogLevel( LogLevel logLevel ); List<LoggingHierarchy> getLoggingHierarchy(); @Deprecated Map<String, Trans> getActiveSubtransformations(); void addActiveSubTransformation( final String subTransName, Trans subTrans ); Trans removeActiveSubTransformation( final String subTransName ); Trans getActiveSubTransformation( final String subTransName ); Map<String, Job> getActiveSubjobs(); @Override String getContainerObjectId(); void setContainerObjectId( String containerObjectId ); @Override Date getRegistrationDate(); void setServletPrintWriter( PrintWriter servletPrintWriter ); PrintWriter getServletPrintWriter(); @Override String getExecutingServer(); @Override void setExecutingServer( String executingServer ); @Override String getExecutingUser(); @Override void setExecutingUser( String executingUser ); @Override boolean isGatheringMetrics(); @Override void setGatheringMetrics( boolean gatheringMetrics ); @Override boolean isForcingSeparateLogging(); @Override void setForcingSeparateLogging( boolean forcingSeparateLogging ); List<ResultFile> getResultFiles(); void setResultFiles( List<ResultFile> resultFiles ); List<RowMetaAndData> getResultRows(); void setResultRows( List<RowMetaAndData> resultRows ); Result getPreviousResult(); void setPreviousResult( Result previousResult ); Hashtable<String, Counter> getCounters(); void setCounters( Hashtable<String, Counter> counters ); String[] getArguments(); void setArguments( String[] arguments ); void clearError(); String getTransactionId(); void setTransactionId( String transactionId ); String calculateTransactionId(); IMetaStore getMetaStore(); void setMetaStore( IMetaStore metaStore ); void setServletReponse( HttpServletResponse response ); HttpServletResponse getServletResponse(); void setServletRequest( HttpServletRequest request ); HttpServletRequest getServletRequest(); List<DelegationListener> getDelegationListeners(); void setDelegationListeners( List<DelegationListener> delegationListeners ); void addDelegationListener( DelegationListener delegationListener ); synchronized void doTopologySortOfSteps(); @Override Map<String, Object> getExtensionDataMap(); static final String REPLAY_DATE_FORMAT; public List<RowSet> rowsets; public int class_nr; static final int TYPE_DISP_1_1; static final int TYPE_DISP_1_N; static final int TYPE_DISP_N_1; static final int TYPE_DISP_N_N; static final int TYPE_DISP_N_M; static final String STRING_FINISHED; static final String STRING_FINISHED_WITH_ERRORS; static final String STRING_RUNNING; static final String STRING_PAUSED; static final String STRING_PREPARING; static final String STRING_INITIALIZING; static final String STRING_WAITING; static final String STRING_STOPPED; static final String STRING_HALTING; static final String CONFIGURATION_IN_EXPORT_FILENAME; }