[ 
https://issues.apache.org/jira/browse/YARN-11217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17679376#comment-17679376
 ] 

ASF GitHub Bot commented on YARN-11217:
---------------------------------------

slfan1989 commented on code in PR #5272:
URL: https://github.com/apache/hadoop/pull/5272#discussion_r1083220366


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java:
##########
@@ -1145,10 +1146,66 @@ public SchedulerTypeInfo getSchedulerInfo() {
     throw new NotImplementedException("Code is not implemented");
   }
 
+  /**
+   * This method dumps the scheduler logs for the time got in input, and it is
+   * reachable by using {@link RMWSConsts#SCHEDULER_LOGS}.
+   *
+   * @param time the period of time. It is a FormParam.
+   * @param hsr the servlet request
+   * @return the result of the operation
+   * @throws IOException when it cannot create dump log file
+   */
   @Override
   public String dumpSchedulerLogs(String time, HttpServletRequest hsr)
       throws IOException {
-    throw new NotImplementedException("Code is not implemented");
+
+    try {
+      if (StringUtils.isBlank(time)) {
+        routerMetrics.incrDumpSchedulerLogsFailedRetrieved();
+        throw new IllegalArgumentException("Parameter error, the time is empty 
or null.");
+      }
+

Review Comment:
   Thanks for your suggestion, I will modify the code.





> [Federation] Add dumpSchedulerLogs REST APIs for Router
> -------------------------------------------------------
>
>                 Key: YARN-11217
>                 URL: https://issues.apache.org/jira/browse/YARN-11217
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>    Affects Versions: 3.4.0, 3.3.4
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Major
>              Labels: pull-request-available
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to