@Test public void testExecuteRemoteTrans() throws Exception { DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration(); defaultRunConfiguration.setName( "Default Configuration" ); defaultRunConfiguration.setLocal( false ); defaultRunConfiguration.setRemote( true ); defaultRunConfiguration.setServer( "Test Server" ); TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration(); doReturn( slaveServer ).when( abstractMeta ).findSlaveServer( "Test Server" ); defaultRunConfigurationExecutor .execute( defaultRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null ); assertFalse( transExecutionConfiguration.isExecutingLocally() ); assertTrue( transExecutionConfiguration.isExecutingRemotely() ); assertEquals( transExecutionConfiguration.getRemoteServer(), slaveServer ); }
@Override public void execute( RunConfiguration runConfiguration, ExecutionConfiguration executionConfiguration, AbstractMeta meta, VariableSpace variableSpace, Repository repository ) throws KettleException { DefaultRunConfiguration defaultRunConfiguration = (DefaultRunConfiguration) runConfiguration; if ( executionConfiguration instanceof TransExecutionConfiguration ) { configureTransExecution( (TransExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } if ( executionConfiguration instanceof JobExecutionConfiguration ) { configureJobExecution( (JobExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } variableSpace.setVariable( "engine", null ); variableSpace.setVariable( "engine.remote", null ); variableSpace.setVariable( "engine.protocol", null ); variableSpace.setVariable( "engine.host", null ); variableSpace.setVariable( "engine.port", null ); }
DefaultRunConfigurationExecutor implements RunConfigurationExecutor { @Override public void execute( RunConfiguration runConfiguration, ExecutionConfiguration executionConfiguration, AbstractMeta meta, VariableSpace variableSpace, Repository repository ) throws KettleException { DefaultRunConfiguration defaultRunConfiguration = (DefaultRunConfiguration) runConfiguration; if ( executionConfiguration instanceof TransExecutionConfiguration ) { configureTransExecution( (TransExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } if ( executionConfiguration instanceof JobExecutionConfiguration ) { configureJobExecution( (JobExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } variableSpace.setVariable( "engine", null ); variableSpace.setVariable( "engine.remote", null ); variableSpace.setVariable( "engine.protocol", null ); variableSpace.setVariable( "engine.host", null ); variableSpace.setVariable( "engine.port", null ); } }
DefaultRunConfigurationExecutor implements RunConfigurationExecutor { @Override public void execute( RunConfiguration runConfiguration, ExecutionConfiguration executionConfiguration, AbstractMeta meta, VariableSpace variableSpace, Repository repository ) throws KettleException { DefaultRunConfiguration defaultRunConfiguration = (DefaultRunConfiguration) runConfiguration; if ( executionConfiguration instanceof TransExecutionConfiguration ) { configureTransExecution( (TransExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } if ( executionConfiguration instanceof JobExecutionConfiguration ) { configureJobExecution( (JobExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } variableSpace.setVariable( "engine", null ); variableSpace.setVariable( "engine.remote", null ); variableSpace.setVariable( "engine.protocol", null ); variableSpace.setVariable( "engine.host", null ); variableSpace.setVariable( "engine.port", null ); }  }
DefaultRunConfigurationExecutor implements RunConfigurationExecutor { @Override public void execute( RunConfiguration runConfiguration, ExecutionConfiguration executionConfiguration, AbstractMeta meta, VariableSpace variableSpace, Repository repository ) throws KettleException { DefaultRunConfiguration defaultRunConfiguration = (DefaultRunConfiguration) runConfiguration; if ( executionConfiguration instanceof TransExecutionConfiguration ) { configureTransExecution( (TransExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } if ( executionConfiguration instanceof JobExecutionConfiguration ) { configureJobExecution( (JobExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } variableSpace.setVariable( "engine", null ); variableSpace.setVariable( "engine.remote", null ); variableSpace.setVariable( "engine.protocol", null ); variableSpace.setVariable( "engine.host", null ); variableSpace.setVariable( "engine.port", null ); }  @Override void execute( RunConfiguration runConfiguration, ExecutionConfiguration executionConfiguration,
                       AbstractMeta meta, VariableSpace variableSpace, Repository repository ); }
DefaultRunConfigurationExecutor implements RunConfigurationExecutor { @Override public void execute( RunConfiguration runConfiguration, ExecutionConfiguration executionConfiguration, AbstractMeta meta, VariableSpace variableSpace, Repository repository ) throws KettleException { DefaultRunConfiguration defaultRunConfiguration = (DefaultRunConfiguration) runConfiguration; if ( executionConfiguration instanceof TransExecutionConfiguration ) { configureTransExecution( (TransExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } if ( executionConfiguration instanceof JobExecutionConfiguration ) { configureJobExecution( (JobExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace, meta, repository ); } variableSpace.setVariable( "engine", null ); variableSpace.setVariable( "engine.remote", null ); variableSpace.setVariable( "engine.protocol", null ); variableSpace.setVariable( "engine.host", null ); variableSpace.setVariable( "engine.port", null ); }  @Override void execute( RunConfiguration runConfiguration, ExecutionConfiguration executionConfiguration,
                       AbstractMeta meta, VariableSpace variableSpace, Repository repository );  }