Search in sources :

Example 1 with JavaActionExecutor

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

the class ShareLibService method cacheActionKeySharelibConfList.

private void cacheActionKeySharelibConfList() {
    ActionService actionService = Services.get().get(ActionService.class);
    Set<String> actionTypes = actionService.getActionTypes();
    for (String key : actionTypes) {
        ActionExecutor executor = actionService.getExecutor(key);
        if (executor instanceof JavaActionExecutor) {
            JavaActionExecutor jexecutor = (JavaActionExecutor) executor;
            actionConfSet.addAll(new HashSet<String>(Arrays.asList(jexecutor.getShareLibFilesForActionConf() == null ? new String[0] : jexecutor.getShareLibFilesForActionConf())));
        }
    }
}
Also used : JavaActionExecutor(org.apache.oozie.action.hadoop.JavaActionExecutor) ActionExecutor(org.apache.oozie.action.ActionExecutor) JavaActionExecutor(org.apache.oozie.action.hadoop.JavaActionExecutor)

Example 2 with JavaActionExecutor

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

the class ShareLibService method setupLauncherLibPath.

/**
 * Copy launcher jars to Temp directory.
 *
 * @param fs the FileSystem
 * @param tmpLauncherLibPath the tmp launcher lib path
 * @throws IOException Signals that an I/O exception has occurred.
 */
private void setupLauncherLibPath(FileSystem fs, Path tmpLauncherLibPath) throws IOException {
    ActionService actionService = Services.get().get(ActionService.class);
    List<Class<?>> classes = JavaActionExecutor.getCommonLauncherClasses();
    Path baseDir = new Path(tmpLauncherLibPath, JavaActionExecutor.OOZIE_COMMON_LIBDIR);
    copyJarContainingClasses(classes, fs, baseDir, JavaActionExecutor.OOZIE_COMMON_LIBDIR);
    Set<String> actionTypes = actionService.getActionTypes();
    for (String key : actionTypes) {
        ActionExecutor executor = actionService.getExecutor(key);
        if (executor instanceof JavaActionExecutor) {
            JavaActionExecutor jexecutor = (JavaActionExecutor) executor;
            classes = jexecutor.getLauncherClasses();
            if (classes != null) {
                String type = executor.getType();
                Path executorDir = new Path(tmpLauncherLibPath, type);
                copyJarContainingClasses(classes, fs, executorDir, type);
            }
        }
    }
}
Also used : Path(org.apache.hadoop.fs.Path) JavaActionExecutor(org.apache.oozie.action.hadoop.JavaActionExecutor) ActionExecutor(org.apache.oozie.action.ActionExecutor) JavaActionExecutor(org.apache.oozie.action.hadoop.JavaActionExecutor)

Aggregations

ActionExecutor (org.apache.oozie.action.ActionExecutor)2 JavaActionExecutor (org.apache.oozie.action.hadoop.JavaActionExecutor)2 Path (org.apache.hadoop.fs.Path)1