Search in sources :

Example 1 with ElException

use of org.apache.oozie.coord.ElException in project oozie by apache.

the class CoordPushDependencyCheckXCommand method resolveCoordConfiguration.

private String resolveCoordConfiguration() throws CommandException {
    try {
        Configuration actionConf = new XConfiguration(new StringReader(coordAction.getRunConf()));
        StringBuilder actionXml = new StringBuilder(coordAction.getActionXml());
        String newActionXml = CoordActionInputCheckXCommand.resolveCoordConfiguration(actionXml, actionConf, actionId, coordAction.getPullInputDependencies(), coordAction.getPushInputDependencies());
        actionXml.replace(0, actionXml.length(), newActionXml);
        return actionXml.toString();
    } catch (ElException e) {
        coordAction.setStatus(CoordinatorAction.Status.FAILED);
        updateCoordAction(coordAction, true);
        throw new CommandException(ErrorCode.E1021, e.getMessage(), e);
    } catch (Exception e) {
        throw new CommandException(ErrorCode.E1021, e.getMessage(), e);
    }
}
Also used : XConfiguration(org.apache.oozie.util.XConfiguration) XConfiguration(org.apache.oozie.util.XConfiguration) Configuration(org.apache.hadoop.conf.Configuration) StringReader(java.io.StringReader) ElException(org.apache.oozie.coord.ElException) CommandException(org.apache.oozie.command.CommandException) JPAExecutorException(org.apache.oozie.executor.jpa.JPAExecutorException) ElException(org.apache.oozie.coord.ElException) IOException(java.io.IOException) CommandException(org.apache.oozie.command.CommandException) PreconditionException(org.apache.oozie.command.PreconditionException)

Aggregations

IOException (java.io.IOException)1 StringReader (java.io.StringReader)1 Configuration (org.apache.hadoop.conf.Configuration)1 CommandException (org.apache.oozie.command.CommandException)1 PreconditionException (org.apache.oozie.command.PreconditionException)1 ElException (org.apache.oozie.coord.ElException)1 JPAExecutorException (org.apache.oozie.executor.jpa.JPAExecutorException)1 XConfiguration (org.apache.oozie.util.XConfiguration)1