use of org.apache.oozie.service.HadoopAccessorService in project oozie by apache.
the class DiagBundleCollectorDriver method setHadoopConfig.
private boolean setHadoopConfig() {
final String oozieHome = System.getenv("OOZIE_HOME");
if (oozieHome == null) {
System.err.println("OOZIE_HOME environment variable is not set. Make sure you've set it to an absolute path.");
return false;
}
System.setProperty(Services.OOZIE_HOME_DIR, oozieHome);
try {
final Services services = initOozieServices();
final HadoopAccessorService hadoopAccessorService = services.get(HadoopAccessorService.class);
hadoopConfig = hadoopAccessorService.createConfiguration("*");
} catch (ServiceException e) {
System.err.printf("Could not initialize Hadoop configuration: %s%n", e.getMessage());
return false;
}
return true;
}
Aggregations