klass = Class.forName("org.apache.oozie.action.hadoop.KerberosDoAs");
}
catch (ClassNotFoundException ex) {
klass = DoAs.class;
}
DoAs doAs = (DoAs) klass.newInstance();
final FileSystem[] fs = new FileSystem[1];
doAs.setCallable(new Callable<Void>() {
public Void call() throws Exception {
Configuration defaultConf = new Configuration();
XConfiguration.copy(conf, defaultConf);
fs[0] = FileSystem.get(defaultConf);
return null;
}
});
doAs.setUser(getTestUser());
doAs.call();
fileSystem = fs[0];
Path path = new Path(fileSystem.getWorkingDirectory(), "oozietests/" + getClass().getName() + "/" + getName());
fsTestDir = fileSystem.makeQualified(path);
System.out.println(XLog.format("Setting FS testcase work dir[{0}]", fsTestDir));