/** * Initializes the Kettle environment. This method will attempt to configure Simple JNDI, by simply calling * init(true). * * @throws KettleException Any errors that occur during initialization will throw a KettleException. * @see KettleEnvironment#init(boolean) */ public static void init() throws KettleException { init( true ); }
private static void shutdown( KettleLifecycleSupport kettleLifecycleSupport ) { if ( isInitialized() ) { try { kettleLifecycleSupport.onEnvironmentShutdown(); } catch ( Throwable t ) { System.err.println( BaseMessages.getString( PKG, "LifecycleSupport.ErrorInvokingKettleEnvironmentShutdownListeners" ) ); t.printStackTrace(); } } }
@Override void cleanUp() { KettleEnvironment.reset(); super.cleanUp(); } }
@Before public void setUp() throws Exception { KettleEnvironment.init(); if ( !KettleEnvironment.isInitialized() ) { throw new Exception( "Kettle Environment not initialized" ); } }
KettleEnvironment.setExecutionInformation( this, repository );
initLifecycleListeners(); ready.set( true ); } catch ( Throwable t ) {
/** * Initialize the Kettle environment with settings from the provided configuration * * @param conf * Configuration to configure Kettle environment with */ private static void initKettleEnvironment( Configuration conf ) throws KettleException { if ( !KettleEnvironment.isInitialized() ) { String kettleHome = getKettleHomeProperty( conf ); String pluginDir = getPluginDirProperty( conf ); String metaStoreDir = getMetastoreDirProperty( conf ); System.setProperty( "KETTLE_HOME", kettleHome ); System.setProperty( Const.PLUGIN_BASE_FOLDERS_PROP, pluginDir ); System.setProperty( Const.PENTAHO_METASTORE_FOLDER, metaStoreDir ); System.out.println( BaseMessages.getString( MRUtil.class, "KettleHome.Info", kettleHome ) ); System.out.println( BaseMessages.getString( MRUtil.class, "PluginDirectory.Info", pluginDir ) ); System.out.println( BaseMessages.getString( MRUtil.class, "MetasStoreDirectory.Info", metaStoreDir ) ); KettleEnvironment.init(); } }
setActive( true ); setInitialized( true ); KettleEnvironment.setExecutionInformation( this, rep );
public static void main( String[] args ) throws Exception { // startup Scale ( a.k.a. PDI minimal/headless environment ) KettleClientEnvironment.getInstance().setClient( KettleClientEnvironment.ClientType.SCALE ); KettleEnvironment.init(); } }
@AfterClass public static void tearDown() { KettleEnvironment.reset(); }
KettleEnvironment.setExecutionInformation( this, rep );
@Override public KettleException call() throws Exception { registerUIPluginObjectTypes(); KettleClientEnvironment.getInstance().setClient( KettleClientEnvironment.ClientType.SPOON ); try { KettleEnvironment.init(); } catch ( KettleException e ) { return e; } return null; } } );
@AfterClass public static void tearDown() { KettleEnvironment.reset(); }
private static void setKettleEnvironment() throws Exception { KettleClientEnvironment.getInstance().setClient( KettleClientEnvironment.ClientType.CARTE ); KettleEnvironment.init(); }
@AfterClass public static void tearDown() { KettleEnvironment.reset(); }
@Before public void setupBefore() throws Exception { // Without initialization of the Kettle Environment, the load of the transformation fails // when run in Windows (saying it cannot find the Database plugin ID for Oracle). Digging into // it I discovered that it's during the read of the shared objects xml which doesn't reference Oracle // at all. Initializing the environment fixed everything. KettleEnvironment.init(); }
@BeforeClass public static void initKettle() throws Exception { KettleEnvironment.init(); }
@BeforeClass public static void setUpBeforeClass() throws KettleException { KettleEnvironment.init( false ); }
@BeforeClass public static void initEnvironment() throws Exception { KettleEnvironment.init(); }
@BeforeClass public static void initKettle() throws Exception { KettleEnvironment.init(); }