From b63b777c84556752fac40da87110729b5dfabaa7 Mon Sep 17 00:00:00 2001 From: David Dillon Date: Tue, 20 Dec 2022 21:11:55 -0500 Subject: [PATCH] HDFS-16873 FileStatus compareTo specify ordering by path (#5219) --- .../src/main/java/org/apache/hadoop/fs/FileStatus.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java index fcef578b07..1d9458148e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java @@ -402,7 +402,8 @@ public void setSymlink(final Path p) { } /** - * 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. * @return a negative integer, zero, or a positive integer as this object * is less than, equal to, or greater than the specified object. @@ -412,7 +413,8 @@ public int compareTo(FileStatus o) { } /** - * 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. * * @param o the FileStatus to be compared.