This is an automated email from the ASF dual-hosted git repository.
abmodi pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new f4d6e82 YARN-9400. Remove unnecessary if at EntityGroupFSTimelineStore#parseApplicationId.
Contributed by Prabhu Joseph.
f4d6e82 is described below
commit f4d6e82075b06bf09c1e2848af465c2d33f8531e
Author: Abhishek Modi <abmodi@apache.org>
AuthorDate: Mon Sep 2 10:58:23 2019 +0530
YARN-9400. Remove unnecessary if at EntityGroupFSTimelineStore#parseApplicationId. Contributed
by Prabhu Joseph.
---
.../yarn/server/timeline/EntityGroupFSTimelineStore.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline/EntityGroupFSTimelineStore.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline/EntityGroupFSTimelineStore.java
index cc246d9..e10eb1b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline/EntityGroupFSTimelineStore.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline/EntityGroupFSTimelineStore.java
@@ -549,15 +549,11 @@ public class EntityGroupFSTimelineStore extends CompositeService
// converts the String to an ApplicationId or null if conversion failed
private static ApplicationId parseApplicationId(String appIdStr) {
- ApplicationId appId = null;
- if (appIdStr.startsWith(ApplicationId.appIdStrPrefix)) {
- try {
- appId = ApplicationId.fromString(appIdStr);
- } catch (IllegalArgumentException e) {
- appId = null;
- }
+ try {
+ return ApplicationId.fromString(appIdStr);
+ } catch (IllegalArgumentException e) {
+ return null;
}
- return appId;
}
private static ClassLoader createPluginClassLoader(
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
|