TransMeta transMeta = transConfiguration.getTransMeta(); transExecutionConfiguration = transConfiguration.getTransExecutionConfiguration(); transMeta.setLogLevel( transExecutionConfiguration.getLogLevel() );
try { transConfiguration = TransConfiguration.fromXML( xml.toString() ); TransMeta transMeta = transConfiguration.getTransMeta(); TransExecutionConfiguration transExecutionConfiguration = transConfiguration.getTransExecutionConfiguration();
protected Trans createTrans( TransConfiguration transConfiguration ) throws UnknownParamException { TransMeta transMeta = transConfiguration.getTransMeta(); TransExecutionConfiguration transExecutionConfiguration = transConfiguration.getTransExecutionConfiguration(); transMeta.setLogLevel( transExecutionConfiguration.getLogLevel() );
public static Trans getTrans( final Configuration conf, final String transXml, boolean singleThreaded ) throws KettleException { initKettleEnvironment( conf ); TransConfiguration transConfiguration = TransConfiguration.fromXML( transXml ); TransMeta transMeta = transConfiguration.getTransMeta(); String carteObjectId = UUID.randomUUID().toString(); SimpleLoggingObject servletLoggingObject = new SimpleLoggingObject( "HADOOP_MAPPER", LoggingObjectType.CARTE, null ); //$NON-NLS-1$ servletLoggingObject.setContainerObjectId( carteObjectId ); TransExecutionConfiguration executionConfiguration = transConfiguration.getTransExecutionConfiguration(); servletLoggingObject.setLogLevel( executionConfiguration.getLogLevel() ); if ( singleThreaded ) { // Set the type to single threaded in case the user forgot... // transMeta.setTransformationType( TransformationType.SingleThreaded ); // Disable thread priority management as it will slow things down needlessly. // The single threaded engine doesn't use threads and doesn't need row locking. // transMeta.setUsingThreadPriorityManagment( false ); } else { transMeta.setTransformationType( TransformationType.Normal ); } return new Trans( transMeta, servletLoggingObject ); }
private void deleteLogging( Optional<TransConfiguration> transConfiguration ) { if ( !transConfiguration.isPresent() ) { return; } TransMeta meta = transConfiguration.get().getTransMeta(); if ( meta == null ) { return; } BaseLogTable table = meta.getStepLogTable(); table.setConnectionName( null ); meta.setStepLogTable( (StepLogTable) table ); table = meta.getMetricsLogTable(); table.setConnectionName( null ); meta.setMetricsLogTable( (MetricsLogTable) table ); table = meta.getPerformanceLogTable(); table.setConnectionName( null ); meta.setPerformanceLogTable( (PerformanceLogTable) table ); table = meta.getTransLogTable(); table.setConnectionName( null ); meta.setTransLogTable( (TransLogTable) table ); table = meta.getChannelLogTable(); table.setConnectionName( null ); meta.setChannelLogTable( (ChannelLogTable) table ); }