Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.0.0-alpha1
-
None
-
None
-
Incompatible change, Reviewed
-
ViewFileSystem#getServerDefaults(Path) throws NotInMountException instead of FileNotFoundException for unmounted path.
Description
There were some Jenkins warinings related with TestViewFsDefaultValue in each Jenkins building.
[WARNING] /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsDefaultValue.java:[108,9] [deprecation] getDefaultBlockSize() in FileSystem has been deprecated [WARNING] /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsDefaultValue.java:[123,9] [deprecation] getDefaultReplication() in FileSystem has been deprecated [WARNING] /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsDefaultValue.java:[138,43] [deprecation] getServerDefaults() in FileSystem has been deprecated
We should use the method getDefaultBlockSize(Path) replace with deprecation API getDefaultBlockSize. The same to the getDefaultReplication and getServerDefaults. The Path can be a not-in-mountpoint path in filesystem to trigger the NotInMountpointException in test.