services.getConf().set(Services.CONF_SERVICE_CLASSES,
"org.apache.oozie.service.LiteWorkflowAppService, org.apache.oozie.service.HadoopAccessorService");
services.getConf().set(Services.CONF_SERVICE_EXT_CLASSES, "");
services.init();
WorkflowAppService lwas = services.get(WorkflowAppService.class);
HadoopAccessorService has = services.get(HadoopAccessorService.class);
Path dstPath = lwas.getSystemLibPath();
if (sharelibAction.equals(CREATE_CMD) || sharelibAction.equals(UPGRADE_CMD)){
dstPath= new Path(dstPath.toString() + Path.SEPARATOR + SHARE_LIB_PREFIX + getTimestampDirectory() );
}
System.out.println("the destination path for sharelib is: " + dstPath);
URI uri = new Path(hdfsUri).toUri();
Configuration fsConf = has.createJobConf(uri.getAuthority());
FileSystem fs = has.createFileSystem(System.getProperty("user.name"), uri, fsConf);
if (!srcFile.exists()){
throw new IOException(srcPath + " cannot be found");
}