Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11116

Fix javac warnings caused by deprecation of APIs in TestViewFsDefaultValue

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      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.

        Attachments

        1. HDFS-11116.001.patch
          3 kB
          Yiqun Lin
        2. HDFS-11116.002.patch
          4 kB
          Yiqun Lin
        3. HDFS-11116.003.patch
          4 kB
          Yiqun Lin

          Activity

            People

            • Assignee:
              linyiqun Yiqun Lin
              Reporter:
              linyiqun Yiqun Lin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: