public static String getConfigurationDirectory() throws ServiceException {
   String oozieHome = Services.getOozieHome();
   String configDir = System.getProperty(OOZIE_CONFIG_DIR, null);
   File file = configDir == null ? new File(oozieHome, "conf") : new File(configDir);
   if (!file.exists()) {
     throw new ServiceException(ErrorCode.E0024, configDir);
   }
   return file.getPath();
 }
 /**
  * Initialize the log service.
  *
  * @param services services instance.
  * @throws ServiceException thrown if the log service could not be initialized.
  */
 public void init(Services services) throws ServiceException {
   configDir = getConfigurationDirectory();
   configFile = System.getProperty(OOZIE_CONFIG_FILE, SITE_CONFIG_FILE);
   if (configFile.contains("/")) {
     throw new ServiceException(ErrorCode.E0022, configFile);
   }
   log.info("Oozie home dir  [{0}]", Services.getOozieHome());
   log.info("Oozie conf dir  [{0}]", configDir);
   log.info("Oozie conf file [{0}]", configFile);
   configFile = new File(configDir, configFile).toString();
   configuration = loadConf();
   if (configuration.getBoolean(CONF_VERIFY_AVAILABLE_PROPS, false)) {
     verifyConfigurationName();
   }
 }