コード例 #1
0
 @Override
 protected Configuration setupLauncherConf(
     Configuration conf, Element actionXml, Path appPath, Context context)
     throws ActionExecutorException {
   super.setupLauncherConf(conf, actionXml, appPath, context);
   addDefaultChildEnv(conf);
   return conf;
 }
コード例 #2
0
  @SuppressWarnings("unchecked")
  @Override
  Configuration setupActionConf(
      Configuration actionConf, Context context, Element actionXml, Path appPath)
      throws ActionExecutorException {
    super.setupActionConf(actionConf, context, actionXml, appPath);
    Namespace ns = actionXml.getNamespace();

    String exec = actionXml.getChild("exec", ns).getTextTrim();
    String execName = new Path(exec).getName();
    actionConf.set(ShellMain.CONF_OOZIE_SHELL_EXEC, execName);

    // Setting Shell command's arguments
    setListInConf("argument", actionXml, actionConf, ShellMain.CONF_OOZIE_SHELL_ARGS, false);
    // Setting Shell command's environment variable key=value
    setListInConf("env-var", actionXml, actionConf, ShellMain.CONF_OOZIE_SHELL_ENVS, true);

    // Setting capture output flag
    actionConf.setBoolean(
        ShellMain.CONF_OOZIE_SHELL_CAPTURE_OUTPUT,
        actionXml.getChild("capture-output", ns) != null);

    return actionConf;
  }