}
}
}
protected void addSystemShareLibForAction(Configuration conf) throws ActionExecutorException {
ShareLibService shareLibService = Services.get().get(ShareLibService.class);
// ShareLibService is null for test cases
if (shareLibService != null) {
try {
List<Path> listOfPaths = shareLibService.getSystemLibJars(JavaActionExecutor.OOZIE_COMMON_LIBDIR);
if (listOfPaths == null || listOfPaths.isEmpty()) {
throw new ActionExecutorException(ActionExecutorException.ErrorType.FAILED, "EJ001",
"Could not locate Oozie sharelib");
}
FileSystem fs = listOfPaths.get(0).getFileSystem(conf);
for (Path actionLibPath : listOfPaths) {
JobUtils.addFileToClassPath(actionLibPath, conf, fs);
DistributedCache.createSymlink(conf);
}
listOfPaths = shareLibService.getSystemLibJars(getType());
if (listOfPaths != null) {
for (Path actionLibPath : listOfPaths) {
JobUtils.addFileToClassPath(actionLibPath, conf, fs);
DistributedCache.createSymlink(conf);
}