protected boolean pathExists(String sPath, Configuration actionConf) throws IOException {
LOG.debug("checking for the file " + sPath);
Path path = new Path(sPath);
String user = ParamChecker.notEmpty(actionConf.get(OozieClient.USER_NAME), OozieClient.USER_NAME);
try {
HadoopAccessorService has = Services.get().get(HadoopAccessorService.class);
Configuration fsConf = has.createJobConf(path.toUri().getAuthority());
return has.createFileSystem(user, path.toUri(), fsConf).exists(path);
}
catch (HadoopAccessorException e) {
coordAction.setErrorCode(e.getErrorCode().toString());
coordAction.setErrorMessage(e.getMessage());
throw new IOException(e);