hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject hadoop git commit: YARN-8140. Improve log message when launch cmd is ran for stopped yarn service. Contributed by Eric Yang
Date Thu, 26 Apr 2018 20:19:12 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-3.1 921a3e167 -> 91b24278d


YARN-8140. Improve log message when launch cmd is ran for stopped yarn service. Contributed
by Eric Yang

(cherry picked from commit ed4e0676c357d5d18c15998b1f6b5d305848cb04)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/91b24278
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/91b24278
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/91b24278

Branch: refs/heads/branch-3.1
Commit: 91b24278da26a081634dc93282f37f5a9c206065
Parents: 921a3e1
Author: Billie Rinaldi <billie@apache.org>
Authored: Thu Apr 26 12:52:22 2018 -0700
Committer: Billie Rinaldi <billie@apache.org>
Committed: Thu Apr 26 13:18:56 2018 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/yarn/service/webapp/ApiServer.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/91b24278/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/main/java/org/apache/hadoop/yarn/service/webapp/ApiServer.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/main/java/org/apache/hadoop/yarn/service/webapp/ApiServer.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/main/java/org/apache/hadoop/yarn/service/webapp/ApiServer.java
index 6f32598..9a30fcf 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/main/java/org/apache/hadoop/yarn/service/webapp/ApiServer.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/main/java/org/apache/hadoop/yarn/service/webapp/ApiServer.java
@@ -167,8 +167,13 @@ public class ApiServer {
       String message = "Failed to create service " + service.getName()
           + ": {}";
       LOG.error(message, e);
+      if (e.getCause().getMessage().contains("already exists")) {
+        message = "Service name " + service.getName() + " is already taken.";
+      } else {
+        message = e.getCause().getMessage();
+      }
       return formatResponse(Status.INTERNAL_SERVER_ERROR,
-          e.getCause().getMessage());
+          message);
     }
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message