IOUtils.copyCharStream(reader, writer);
return writer.toString();
}
catch (IOException ex) {
LOG.warn("IOException :" + XmlUtils.prettyPrint(conf), ex);
throw new CoordinatorJobException(ErrorCode.E1001, ex.getMessage(), ex);
}
catch (URISyntaxException ex) {
LOG.warn("URISyException :" + ex.getMessage());
throw new CoordinatorJobException(ErrorCode.E1002, appPath, ex.getMessage(), ex);
}
catch (HadoopAccessorException ex) {
throw new CoordinatorJobException(ex);
}
catch (Exception ex) {
LOG.warn("Exception :", ex);
throw new CoordinatorJobException(ErrorCode.E1001, ex.getMessage(), ex);
}
}