浏览代码

HDFS-16873 FileStatus compareTo specify ordering by path (#5219)

David Dillon 2 年之前
父节点
当前提交
b63b777c84

+ 4 - 2
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java

@@ -402,7 +402,8 @@ public class FileStatus implements Writable, Comparable<Object>,
   }
   }
 
 
   /**
   /**
-   * Compare this FileStatus to another FileStatus
+   * Compare this FileStatus to another FileStatus based on lexicographical
+   * order of path.
    * @param   o the FileStatus to be compared.
    * @param   o the FileStatus to be compared.
    * @return  a negative integer, zero, or a positive integer as this object
    * @return  a negative integer, zero, or a positive integer as this object
    *   is less than, equal to, or greater than the specified object.
    *   is less than, equal to, or greater than the specified object.
@@ -412,7 +413,8 @@ public class FileStatus implements Writable, Comparable<Object>,
   }
   }
 
 
   /**
   /**
-   * Compare this FileStatus to another FileStatus.
+   * Compare this FileStatus to another FileStatus based on lexicographical
+   * order of path.
    * This method was added back by HADOOP-14683 to keep binary compatibility.
    * This method was added back by HADOOP-14683 to keep binary compatibility.
    *
    *
    * @param   o the FileStatus to be compared.
    * @param   o the FileStatus to be compared.