public synchronized void registerHadoopConfigurationListener( HadoopConfigurationListener hadoopConfigurationListener ) throws ConfigurationException { if ( hadoopConfigurationListeners.add( hadoopConfigurationListener ) && provider != null ) { hadoopConfigurationListener.onConfigurationOpen( getProvider().getActiveConfiguration(), true ); } }
activeConfig = p.getActiveConfiguration(); } catch ( Exception ex ) { throw new ConfigurationException( BaseMessages provider.getConfigurations().size(), hadoopConfigurationsDir ); } catch ( Exception ex ) { if ( ex instanceof ConfigurationException ) {
public String getMainClass( URL localJarUrl ) throws Exception { HadoopShim shim = HadoopConfigurationBootstrap.getHadoopConfigurationProvider().getActiveConfiguration().getHadoopShim(); final Class<?> mainClass = util.getMainClassFromManifest( localJarUrl, shim.getClass().getClassLoader() ); if ( mainClass != null ) { return mainClass.getName(); } else { List<Class<?>> classesWithMains = util.getClassesInJarWithMain( localJarUrl.toExternalForm(), shim.getClass().getClassLoader() ); if ( !classesWithMains.isEmpty() ) { return classesWithMains.get( 0 ).getName(); } } throw new RuntimeException( "Could not find main class in: " + localJarUrl.toExternalForm() ); }
public synchronized void setActiveShim( String shimId ) throws ConfigurationException { if ( provider != null && !shimId.equals( provider.getActiveConfiguration().getIdentifier() ) && prompter != null ) { prompter.promptForRestart(); } getPluginProperties().setProperty( PROPERTY_ACTIVE_HADOOP_CONFIGURATION, shimId ); }
@Override public synchronized String getActiveConfigurationId() throws ConfigurationException { if ( provider != null ) { return provider.getActiveConfiguration().getIdentifier(); } return getWillBeActiveConfigurationId(); }
/** * Get the file provider for the active Hadoop configuration that is registered for the scheme provided. * * @param scheme URI scheme to look up file provider by * @return A File Provider registered for the active Hadoop configuration that supports the provided scheme * @throws FileSystemException If the active configuration cannot be determined or the active configuration doesn't * support the provided scheme */ public FileProvider getActiveFileProvider( String scheme ) throws FileSystemException { try { return getFileProvider( configProvider.getActiveConfiguration(), scheme ); } catch ( ConfigurationException e ) { throw new FileSystemException( e ); } }
classloader = new KettleURLClassLoader( urls, HadoopConfigurationBootstrap.getHadoopConfigurationProvider() .getActiveConfiguration().getHadoopShim().getClass().getClassLoader() ); classLoaderMap.put( librarySet, classloader );
HadoopConfiguration hadoopConfiguration = hadoopConfigurationProvider.getActiveConfiguration(); activeConfigurationId = hadoopConfiguration.getIdentifier(); Configuration config = hadoopConfiguration.getHadoopShim().createConfiguration();