@Override public Path canonicalizePath(Path p) throws IOException { try { Path cp = canonicalizePath(underlyingFs, p); return new PathWrapperWithFileSystem(cp, this); } catch(FSError e) { throw propagateFSError(e); } }
@Override public FileSystem getFileSystem(Configuration conf) throws IOException { // Do not return the original filesystem as-is because: // - the path might have been canonicalized and might point to a different URI (viewFS) // - this method might be called from a different security context (and the filesystem // should reflect this) // Instead recreate a new wrapper (but keep the stats context) return FileSystemWrapper.get(this.toUri(), conf, fs.getOperatorStats()); } }