HDFS-15596: ViewHDFS#create(f, permission, cflags, bufferSize, replication, blockSize, progress, checksumOpt) should not be restricted to DFS only. (#2333). Contributed by Uma Maheswara Rao G.
Co-authored-by: Uma Maheswara Rao G <umagangumalla@cloudera.com>
This commit is contained in:
parent
486ddb73f9
commit
3ccc962b99
|
@ -376,7 +376,6 @@ public class ViewDistributedFileSystem extends DistributedFileSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//DFS specific API
|
|
||||||
public FSDataOutputStream create(final Path f, final FsPermission permission,
|
public FSDataOutputStream create(final Path f, final FsPermission permission,
|
||||||
final EnumSet<CreateFlag> cflags, final int bufferSize,
|
final EnumSet<CreateFlag> cflags, final int bufferSize,
|
||||||
final short replication, final long blockSize,
|
final short replication, final long blockSize,
|
||||||
|
@ -387,12 +386,8 @@ public class ViewDistributedFileSystem extends DistributedFileSystem {
|
||||||
.create(f, permission, cflags, bufferSize, replication, blockSize,
|
.create(f, permission, cflags, bufferSize, replication, blockSize,
|
||||||
progress, checksumOpt);
|
progress, checksumOpt);
|
||||||
}
|
}
|
||||||
ViewFileSystemOverloadScheme.MountPathInfo<FileSystem> mountPathInfo =
|
return vfs.create(f, permission, cflags, bufferSize, replication, blockSize,
|
||||||
this.vfs.getMountPathInfo(f, getConf());
|
progress, checksumOpt);
|
||||||
checkDFS(mountPathInfo.getTargetFs(), "create");
|
|
||||||
return mountPathInfo.getTargetFs()
|
|
||||||
.create(mountPathInfo.getPathOnTarget(), permission, cflags, bufferSize,
|
|
||||||
replication, blockSize, progress, checksumOpt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkDFS(FileSystem fs, String methodName) {
|
void checkDFS(FileSystem fs, String methodName) {
|
||||||
|
|
Loading…
Reference in New Issue