Skip to content

Commit a5c1e3c

Browse files
author
Shailesh Gupta
committed
checkstyle comments
1 parent b2c2605 commit a5c1e3c

File tree

1 file changed

+4
-2
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline

1 file changed

+4
-2
lines changed

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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,10 @@ 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-
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]));
866+
if (StringUtils.isNumeric(ts1[ts1.length - 1])
867+
&& StringUtils.isNumeric(ts2[ts2.length - 1])) {
868+
return (Integer.parseInt(ts1[ts1.length - 1])
869+
- Integer.parseInt(ts2[ts2.length - 1]));
868870
} else {
869871
return o1.getPath().getName().compareTo(o2.getPath().getName());
870872
}

0 commit comments

Comments
 (0)