Skip to content

Commit e92416e

Browse files
guptashailesh92Shailesh Gupta
authored andcommitted
test cases fixed
1 parent 50696ab commit e92416e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3277,7 +3277,7 @@ public static boolean isAclEnabled(Configuration conf) {
32773277
+ "entity-file.fs-support-append";
32783278
public static final boolean TIMELINE_SERVICE_ENTITYFILE_FS_SUPPORT_APPEND_DEFAULT
32793279
= true;
3280-
3280+
32813281
public static final String
32823282
TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_WITH_USER_DIR =
32833283
TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_PREFIX + "with-user-dir";

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline/EntityGroupFSTimelineStore.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,11 @@ long scanForLogs() throws IOException {
863863
public int compare(FileStatus o1, FileStatus o2) {
864864
String[] ts1 = o1.getPath().getName().split("_");
865865
String[] ts2 = o2.getPath().getName().split("_");
866-
return (Integer.parseInt(ts1[ts1.length - 1]) - Integer.parseInt(ts2[ts2.length - 1]));
866+
if (StringUtils.isNumeric(ts1[ts1.length - 1]) && StringUtils.isNumeric(ts2[ts2.length - 1])) {
867+
return (Integer.parseInt(ts1[ts1.length - 1]) - Integer.parseInt(ts2[ts2.length - 1]));
868+
} else {
869+
return o1.getPath().getName().compareTo(o2.getPath().getName());
870+
}
867871
}
868872
});
869873
}

0 commit comments

Comments
 (0)