|
@@ -91,17 +91,24 @@ public class WebHdfsFileSystem extends HftpFileSystem {
|
|
|
|
|
|
private static final KerberosUgiAuthenticator AUTH = new KerberosUgiAuthenticator();
|
|
|
|
|
|
- private UserGroupInformation ugi;
|
|
|
+ private final UserGroupInformation ugi;
|
|
|
private final AuthenticatedURL.Token authToken = new AuthenticatedURL.Token();
|
|
|
protected Path workingDir;
|
|
|
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ ugi = UserGroupInformation.getCurrentUser();
|
|
|
+ } catch (IOException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public synchronized void initialize(URI uri, Configuration conf
|
|
|
) throws IOException {
|
|
|
super.initialize(uri, conf);
|
|
|
setConf(conf);
|
|
|
|
|
|
- ugi = UserGroupInformation.getCurrentUser();
|
|
|
this.workingDir = getHomeDirectory();
|
|
|
}
|
|
|
|