svn merge -c 1176178 from trunk for HDFS-2366.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1189425 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9154afd034
commit
11046ba5a1
|
@ -1076,6 +1076,9 @@ Release 0.23.0 - Unreleased
|
|||
HDFS-2333. Change DFSOutputStream back to package private, otherwise,
|
||||
there are two SC_START_IN_CTOR findbugs warnings. (szetszwo)
|
||||
|
||||
HDFS-2366. Initialize WebHdfsFileSystem.ugi in object construction.
|
||||
(szetszwo)
|
||||
|
||||
BREAKDOWN OF HDFS-1073 SUBTASKS
|
||||
|
||||
HDFS-1521. Persist transaction ID on disk between NN restarts.
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue