Search in sources :

Example 1 with LauncherURIHandler

use of org.apache.oozie.action.hadoop.LauncherURIHandler in project oozie by apache.

the class URIHandlerService method initLauncherClassesToShip.

/**
 * Initialize classes that need to be shipped for using LauncherURIHandler in the launcher job
 */
private void initLauncherClassesToShip() {
    launcherClassesToShip = new HashSet<Class<?>>();
    launcherClassesToShip.add(LauncherURIHandlerFactory.class);
    launcherClassesToShip.add(LauncherURIHandler.class);
    for (URIHandler handler : cache.values()) {
        launcherClassesToShip.add(handler.getLauncherURIHandlerClass());
        List<Class<?>> classes = handler.getClassesForLauncher();
        if (classes != null) {
            launcherClassesToShip.addAll(classes);
        }
    }
    launcherClassesToShip.add(defaultHandler.getLauncherURIHandlerClass());
}
Also used : LauncherURIHandler(org.apache.oozie.action.hadoop.LauncherURIHandler) URIHandler(org.apache.oozie.dependency.URIHandler) FSURIHandler(org.apache.oozie.dependency.FSURIHandler)

Example 2 with LauncherURIHandler

use of org.apache.oozie.action.hadoop.LauncherURIHandler in project oozie by apache.

the class URIHandlerService method initLauncherURIHandlerConf.

/**
 * Initialize configuration required for using LauncherURIHandler in the launcher job
 */
private void initLauncherURIHandlerConf() {
    launcherConf = new Configuration(false);
    for (URIHandler handler : cache.values()) {
        for (String scheme : handler.getSupportedSchemes()) {
            String schemeConf = LauncherURIHandlerFactory.CONF_LAUNCHER_URIHANDLER_SCHEME_PREFIX + scheme;
            launcherConf.set(schemeConf, handler.getLauncherURIHandlerClass().getName());
        }
    }
    for (String scheme : defaultHandler.getSupportedSchemes()) {
        String schemeConf = LauncherURIHandlerFactory.CONF_LAUNCHER_URIHANDLER_SCHEME_PREFIX + scheme;
        launcherConf.set(schemeConf, defaultHandler.getLauncherURIHandlerClass().getName());
    }
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) LauncherURIHandler(org.apache.oozie.action.hadoop.LauncherURIHandler) URIHandler(org.apache.oozie.dependency.URIHandler) FSURIHandler(org.apache.oozie.dependency.FSURIHandler)

Aggregations

LauncherURIHandler (org.apache.oozie.action.hadoop.LauncherURIHandler)2 FSURIHandler (org.apache.oozie.dependency.FSURIHandler)2 URIHandler (org.apache.oozie.dependency.URIHandler)2 Configuration (org.apache.hadoop.conf.Configuration)1