HADOOP-14427. Avoid reloading of Configuration in ViewFileSystem creation. Contributed by Vinayakumar B

(cherry picked from commit eb7791b474)
This commit is contained in:
Mingliang Liu 2017-05-17 13:12:14 -07:00
parent b295924d49
commit 94755e2d6d
1 changed files with 4 additions and 4 deletions

View File

@ -178,7 +178,7 @@ public class ViewFileSystem extends FileSystem {
protected protected
FileSystem getTargetFileSystem(final INodeDir<FileSystem> dir) FileSystem getTargetFileSystem(final INodeDir<FileSystem> dir)
throws URISyntaxException { throws URISyntaxException {
return new InternalDirOfViewFs(dir, creationTime, ugi, myUri); return new InternalDirOfViewFs(dir, creationTime, ugi, myUri, config);
} }
@Override @Override
@ -778,11 +778,11 @@ public class ViewFileSystem extends FileSystem {
final URI myUri; final URI myUri;
public InternalDirOfViewFs(final InodeTree.INodeDir<FileSystem> dir, public InternalDirOfViewFs(final InodeTree.INodeDir<FileSystem> dir,
final long cTime, final UserGroupInformation ugi, URI uri) final long cTime, final UserGroupInformation ugi, URI uri,
throws URISyntaxException { Configuration config) throws URISyntaxException {
myUri = uri; myUri = uri;
try { try {
initialize(myUri, new Configuration()); initialize(myUri, config);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException("Cannot occur"); throw new RuntimeException("Cannot occur");
} }