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())));
}
}
}
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);
}
}
}
}
Aggregations