HDFS-2366. Initialize WebHdfsFileSystem.ugi in object construction.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1176178 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
81926396f6
commit
bf78f15ffb
|
@ -69,6 +69,9 @@ Trunk (unreleased changes)
|
||||||
HDFS-46. Change default namespace quota of root directory from
|
HDFS-46. Change default namespace quota of root directory from
|
||||||
Integer.MAX_VALUE to Long.MAX_VALUE. (Uma Maheswara Rao G via szetszwo)
|
Integer.MAX_VALUE to Long.MAX_VALUE. (Uma Maheswara Rao G via szetszwo)
|
||||||
|
|
||||||
|
HDFS-2366. Initialize WebHdfsFileSystem.ugi in object construction.
|
||||||
|
(szetszwo)
|
||||||
|
|
||||||
Release 0.23.0 - Unreleased
|
Release 0.23.0 - Unreleased
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -91,17 +91,24 @@ public class WebHdfsFileSystem extends HftpFileSystem {
|
||||||
|
|
||||||
private static final KerberosUgiAuthenticator AUTH = new KerberosUgiAuthenticator();
|
private static final KerberosUgiAuthenticator AUTH = new KerberosUgiAuthenticator();
|
||||||
|
|
||||||
private UserGroupInformation ugi;
|
private final UserGroupInformation ugi;
|
||||||
private final AuthenticatedURL.Token authToken = new AuthenticatedURL.Token();
|
private final AuthenticatedURL.Token authToken = new AuthenticatedURL.Token();
|
||||||
protected Path workingDir;
|
protected Path workingDir;
|
||||||
|
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
ugi = UserGroupInformation.getCurrentUser();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void initialize(URI uri, Configuration conf
|
public synchronized void initialize(URI uri, Configuration conf
|
||||||
) throws IOException {
|
) throws IOException {
|
||||||
super.initialize(uri, conf);
|
super.initialize(uri, conf);
|
||||||
setConf(conf);
|
setConf(conf);
|
||||||
|
|
||||||
ugi = UserGroupInformation.getCurrentUser();
|
|
||||||
this.workingDir = getHomeDirectory();
|
this.workingDir = getHomeDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue