try {
String bundleAppPathStr = conf.get(OozieClient.BUNDLE_APP_PATH);
Path bundleAppPath = new Path(bundleAppPathStr);
String user = ParamChecker.notEmpty(conf.get(OozieClient.USER_NAME), OozieClient.USER_NAME);
HadoopAccessorService has = Services.get().get(HadoopAccessorService.class);
Configuration fsConf = has.createJobConf(bundleAppPath.toUri().getAuthority());
FileSystem fs = has.createFileSystem(user, bundleAppPath.toUri(), fsConf);
// app path could be a directory
if (!fs.isFile(bundleAppPath)) {
configDefault = new Path(bundleAppPath, CONFIG_DEFAULT);