This is an automated email from the ASF dual-hosted git repository. granthenke pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit c7ede99d71ef9343f2ccdd57c147d0895223b1b7 Author: Grant Henke <[email protected]> AuthorDate: Fri Apr 30 09:45:50 2021 -0500 [backup] Ensure listed backups are sorted by table Recently we saw a weird failure in the tests that list all the backup graphs (instead of providing exact names) where the order was descending instead of ascending. This patch forces the backup graphs to be sorted to ensure the listing order stays consistent. Change-Id: Icad68f7a3d399c1a5fc302e6328143d4b01227a0 Reviewed-on: http://gerrit.cloudera.org:8080/17375 Tested-by: Grant Henke <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- .../src/main/scala/org/apache/kudu/backup/KuduBackupLister.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/kudu-backup-tools/src/main/scala/org/apache/kudu/backup/KuduBackupLister.scala b/java/kudu-backup-tools/src/main/scala/org/apache/kudu/backup/KuduBackupLister.scala index 8303da9..0fe39d5 100644 --- a/java/kudu-backup-tools/src/main/scala/org/apache/kudu/backup/KuduBackupLister.scala +++ b/java/kudu-backup-tools/src/main/scala/org/apache/kudu/backup/KuduBackupLister.scala @@ -43,7 +43,8 @@ object KuduBackupLister { val io: BackupIO = new BackupIO(new Configuration(), options.rootPath) val backupGraphs = if (sortedTables.isEmpty) - io.readAllBackupGraphs() + // Sort by table name for a consistent ordering. + io.readAllBackupGraphs().sortBy(_.backupBase.metadata.getTableName) else io.readBackupGraphsByTableName(sortedTables)
