当前位置: 首页>>代码示例>>Java>>正文


Java TransExecutionConfiguration类代码示例

本文整理汇总了Java中org.pentaho.di.trans.TransExecutionConfiguration的典型用法代码示例。如果您正苦于以下问题:Java TransExecutionConfiguration类的具体用法?Java TransExecutionConfiguration怎么用?Java TransExecutionConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TransExecutionConfiguration类属于org.pentaho.di.trans包,在下文中一共展示了TransExecutionConfiguration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startTransformation

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
protected void startTransformation( Repository repository, IMetaStore metaStore, final StreamingService service ) {
  try {

    TransMeta transMeta = StreamingConst.loadTransMeta( repository, metaStore, service );
    Trans trans = new Trans( transMeta );
    String carteObjectId = UUID.randomUUID().toString();
    trans.setContainerObjectId( carteObjectId );
    
    if (service.getLogLevel()!=null) {
      trans.setLogLevel(service.getLogLevel());
    }
    TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();
    TransConfiguration transConfiguration = new TransConfiguration( transMeta, transExecutionConfiguration );
    transformationMap.addTransformation( transMeta.getName(), carteObjectId, trans, transConfiguration );
    trans.prepareExecution( null );

    // Start the transformation

    trans.startThreads();
    
    // This transformation routinely never ends so we won't wait for it...
    
  } catch ( Exception e ) {
    throw new RuntimeException( "Unable to start transformation for streaming service '" + service.getName() + "'", e );
  }
}
 
开发者ID:mattcasters,项目名称:pentaho-pdi-streaming,代码行数:27,代码来源:ListStreamingServicesServlet.java

示例2: TransExecutionConfigurationDialog

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
public TransExecutionConfigurationDialog(Shell parent, TransExecutionConfiguration configuration, TransMeta transMeta)
{
    super(parent);
    this.parent = parent;
    this.configuration = configuration;
    this.transMeta  = transMeta;
    
    // Fill the parameters, maybe do this in another place?
    Map<String, String> params = configuration.getParams();
    params.clear();
    String[] paramNames = transMeta.listParameters();
    for ( String name : paramNames ) {
    	params.put(name, "");
    }
            
    props = PropsUI.getInstance();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:18,代码来源:TransExecutionConfigurationDialog.java

示例3: prepareTransformation

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@GET
@Path("/prepare/{id : .+}")
@Produces({ MediaType.APPLICATION_JSON })
public TransformationStatus prepareTransformation(@PathParam("id") String id) {
  Trans trans = CarteResource.getTransformation(id);
  try {

    CarteObjectEntry entry = CarteResource.getCarteObjectEntry(id);
    TransConfiguration transConfiguration = CarteSingleton.getInstance().getTransformationMap().getConfiguration(entry);
    TransExecutionConfiguration executionConfiguration = transConfiguration.getTransExecutionConfiguration();
    // Set the appropriate logging, variables, arguments, replay date, ...
    // etc.
    trans.getTransMeta().setArguments(executionConfiguration.getArgumentStrings());
    trans.setReplayDate(executionConfiguration.getReplayDate());
    trans.setSafeModeEnabled(executionConfiguration.isSafeModeEnabled());
    trans.setGatheringMetrics(executionConfiguration.isGatheringMetrics());
    trans.injectVariables(executionConfiguration.getVariables());

    trans.prepareExecution(null);
  } catch (KettleException e) {
    e.printStackTrace();
  }
  return getTransformationStatus(id);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:25,代码来源:TransformationResource.java

示例4: runSubtransformationClustered

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
/**
 * This test check passing rows to sub-transformation executed on cluster
 * See PDI-10704 for details
 * @throws Exception
 */
public void runSubtransformationClustered() throws Exception {
  TransMeta transMeta =
    loadTransMetaReplaceSlavesInCluster(
      clusterGenerator, "test/org/pentaho/di/cluster/test-subtrans-clustered.ktr" );
  TransExecutionConfiguration config = createClusteredTransExecutionConfiguration();
  Result prevResult = new Result();
  prevResult.setRows( getSampleRows() );
  config.setPreviousResult( prevResult );

  TransSplitter transSplitter = Trans.executeClustered( transMeta, config );
  LogChannel logChannel = createLogChannel( "cluster unit test <runSubtransformationClustered>" );
  long nrErrors = Trans.monitorClusteredTransformation( logChannel, transSplitter, null, 1 );
  assertEquals( 0L, nrErrors );

  String result = loadFileContent( transMeta, "${java.io.tmpdir}/test-subtrans-clustered.txt" );
  assertEqualsIgnoreWhitespacesAndCase( "10", result );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:MasterSlaveIT.java

示例5: prepareTransformation

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@GET
@Path( "/prepare/{id : .+}" )
@Produces( { MediaType.APPLICATION_JSON } )
public TransformationStatus prepareTransformation( @PathParam( "id" ) String id ) {
  Trans trans = CarteResource.getTransformation( id );
  try {

    CarteObjectEntry entry = CarteResource.getCarteObjectEntry( id );
    TransConfiguration transConfiguration =
      CarteSingleton.getInstance().getTransformationMap().getConfiguration( entry );
    TransExecutionConfiguration executionConfiguration = transConfiguration.getTransExecutionConfiguration();
    // Set the appropriate logging, variables, arguments, replay date, ...
    // etc.
    trans.setArguments( executionConfiguration.getArgumentStrings() );
    trans.setReplayDate( executionConfiguration.getReplayDate() );
    trans.setSafeModeEnabled( executionConfiguration.isSafeModeEnabled() );
    trans.setGatheringMetrics( executionConfiguration.isGatheringMetrics() );
    trans.injectVariables( executionConfiguration.getVariables() );
    trans.setPreviousResult( executionConfiguration.getPreviousResult() );

    trans.prepareExecution( null );
  } catch ( KettleException e ) {
    e.printStackTrace();
  }
  return getTransformationStatus( id );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:TransformationResource.java

示例6: execute

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@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 );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:DefaultRunConfigurationExecutor.java

示例7: configureTransExecution

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
private void configureTransExecution( TransExecutionConfiguration transExecutionConfiguration,
                                      DefaultRunConfiguration defaultRunConfiguration, VariableSpace variableSpace,
                                      AbstractMeta meta, Repository repository ) throws KettleException {
  transExecutionConfiguration.setExecutingLocally( defaultRunConfiguration.isLocal() );
  transExecutionConfiguration.setExecutingRemotely( defaultRunConfiguration.isRemote() );
  transExecutionConfiguration.setExecutingClustered( defaultRunConfiguration.isClustered() );
  if ( defaultRunConfiguration.isRemote() ) {
    setSlaveServer( transExecutionConfiguration, meta, defaultRunConfiguration, variableSpace );
  }
  if ( defaultRunConfiguration.isClustered() ) {
    transExecutionConfiguration.setPassingExport( defaultRunConfiguration.isSendResources() );
    transExecutionConfiguration.setClusterShowingTransformation( defaultRunConfiguration.isShowTransformations() );
    transExecutionConfiguration.setClusterPosting( defaultRunConfiguration.isClustered() );
    transExecutionConfiguration.setClusterPreparing( defaultRunConfiguration.isClustered() );
    transExecutionConfiguration.setClusterStarting( defaultRunConfiguration.isClustered() );
    transExecutionConfiguration.setLogRemoteExecutionLocally( defaultRunConfiguration.isLogRemoteExecutionLocally() );
  }
  if ( defaultRunConfiguration.isPentaho() && repository != null ) {
    sendNow( repository, (AbstractMeta) variableSpace );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:DefaultRunConfigurationExecutor.java

示例8: testWebSocketVersionExecute

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@Test
public void testWebSocketVersionExecute() {
  SparkRunConfiguration sparkRunConfiguration = new SparkRunConfiguration();
  sparkRunConfiguration.setName( "Spark Configuration" );
  sparkRunConfiguration.setSchema( "http://" );
  sparkRunConfiguration.setUrl( "127.0.0.2:8121" );

  TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();

  sparkRunConfigurationExecutor
    .execute( sparkRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null );

  verify( variableSpace ).setVariable( "engine", "remote" );
  verify( variableSpace ).setVariable( "engine.remote", "spark" );
  verify( variableSpace ).setVariable( "engine.host", "127.0.0.2" );
  verify( variableSpace ).setVariable( "engine.port", "8121" );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:SparkRunConfigurationExecutorTest.java

示例9: testWebSocketVersionExecuteNoPort

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@Test
public void testWebSocketVersionExecuteNoPort() {
  SparkRunConfiguration sparkRunConfiguration = new SparkRunConfiguration();
  sparkRunConfiguration.setName( "Spark Configuration" );
  doReturn( "2.0" ).when( variableSpace ).getVariable( "KETTLE_AEL_PDI_DAEMON_VERSION", "2.0" );

  TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();

  sparkRunConfigurationExecutor
    .execute( sparkRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null );

  verify( variableSpace ).setVariable( "engine", "remote" );
  verify( variableSpace ).setVariable( "engine.remote", "spark" );
  verify( variableSpace ).setVariable( "engine.protocol", SparkRunConfigurationExecutor.DEFAULT_PROTOCOL );
  verify( variableSpace ).setVariable( "engine.host", SparkRunConfigurationExecutor.DEFAULT_HOST );
  verify( variableSpace ).setVariable( "engine.port", SparkRunConfigurationExecutor.DEFAULT_WEBSOCKET_PORT );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:SparkRunConfigurationExecutorTest.java

示例10: testWssWebSocketVersionExecute

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@Test
public void testWssWebSocketVersionExecute() {
  SparkRunConfiguration sparkRunConfiguration = new SparkRunConfiguration();
  sparkRunConfiguration.setName( "Spark Configuration" );
  sparkRunConfiguration.setSchema( "https://" );
  sparkRunConfiguration.setUrl( "127.0.0.2:8121" );

  TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();

  sparkRunConfigurationExecutor
    .execute( sparkRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null );

  verify( variableSpace ).setVariable( "engine.protocol", "https" );
  verify( variableSpace ).setVariable( "engine.host", "127.0.0.2" );
  verify( variableSpace ).setVariable( "engine.port", "8121" );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:SparkRunConfigurationExecutorTest.java

示例11: testUrlWssWebSocketVersionExecute

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@Test
public void testUrlWssWebSocketVersionExecute() {
  SparkRunConfiguration sparkRunConfiguration = new SparkRunConfiguration();
  sparkRunConfiguration.setName( "Spark Configuration" );
  sparkRunConfiguration.setSchema( "http://" );
  sparkRunConfiguration.setUrl( "  127.0.0.2:8121  " );


  TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();

  sparkRunConfigurationExecutor
    .execute( sparkRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null );

  verify( variableSpace ).setVariable( "engine.protocol", "http" );
  verify( variableSpace ).setVariable( "engine.host", "127.0.0.2" );
  verify( variableSpace ).setVariable( "engine.port", "8121" );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:SparkRunConfigurationExecutorTest.java

示例12: testExecuteWithAelSecurityInstalled

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@Test
public void testExecuteWithAelSecurityInstalled() {
  ICapability aelSecurityCapability = mock( ICapability.class );
  setCapability( aelSecurityCapability, SparkRunConfigurationExecutor.AEL_SECURITY_CAPABILITY_ID, true );

  ICapability jaasCapability = mock( ICapability.class );
  setCapability( jaasCapability, SparkRunConfigurationExecutor.JAAS_CAPABILITY_ID, false );

  SparkRunConfiguration sparkRunConfiguration = new SparkRunConfiguration();
  sparkRunConfiguration.setName( "Spark Configuration" );

  TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();

  sparkRunConfigurationExecutor
    .execute( sparkRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null );

  verify( jaasCapability ).isInstalled();
  verify( jaasCapability ).install();

}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:SparkRunConfigurationExecutorTest.java

示例13: testExecuteRemoteTrans

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@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 );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:DefaultRunConfigurationExecutorTest.java

示例14: testExecutePentahoTrans

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@Test
public void testExecutePentahoTrans() throws Exception {
  DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration();
  defaultRunConfiguration.setName( "Default Configuration" );
  defaultRunConfiguration.setLocal( false );
  defaultRunConfiguration.setPentaho( true );
  defaultRunConfiguration.setRemote( false );

  TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();

  defaultRunConfigurationExecutor
    .execute( defaultRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null );

  assertFalse( transExecutionConfiguration.isExecutingLocally() );
  assertFalse( transExecutionConfiguration.isExecutingRemotely() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:DefaultRunConfigurationExecutorTest.java

示例15: testExecuteClusteredTrans

import org.pentaho.di.trans.TransExecutionConfiguration; //导入依赖的package包/类
@Test
public void testExecuteClusteredTrans() throws Exception {
  DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration();
  defaultRunConfiguration.setName( "Default Configuration" );
  defaultRunConfiguration.setLocal( false );
  defaultRunConfiguration.setRemote( false );
  defaultRunConfiguration.setClustered( true );

  TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();

  defaultRunConfigurationExecutor
    .execute( defaultRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null );

  assertTrue( transExecutionConfiguration.isExecutingClustered() );
  assertFalse( transExecutionConfiguration.isExecutingRemotely() );
  assertFalse( transExecutionConfiguration.isExecutingLocally() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:DefaultRunConfigurationExecutorTest.java


注:本文中的org.pentaho.di.trans.TransExecutionConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。