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

Fix javac warnings caused by deprecation of APIs in TestViewFsDefaultValue

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 3.0.0-alpha2
    • 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.

      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

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

            Dates

              Created:
              Updated:
              Resolved: