goiri commented on code in PR #4695:
URL: https://github.com/apache/hadoop/pull/4695#discussion_r938066334


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/RouterServerUtil.java:
##########
@@ -101,4 +123,26 @@ public static void logAndThrowRunTimeException(String 
errMsg, Throwable t)
       throw new RuntimeException(errMsg);
     }
   }
+
+  /**
+   * Throws an RunTimeException due to an error.
+   *
+   * @param errMsgFormat the error message format string.
+   * @param t the throwable raised in the called class.
+   * @param args referenced by the format specifiers in the format string.
+   * @throws RuntimeException on failure
+   */
+  @Public
+  @Unstable
+  public static void logAndThrowRunTimeException(String errMsgFormat, 
Throwable t, Object... args)

Review Comment:
   The order of the parameters is tricky.
   I wonder if it would be cleaner to have the Throwable first.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/RouterServerUtil.java:
##########
@@ -52,7 +74,7 @@ private RouterServerUtil() {
   @Public
   @Unstable
   public static void logAndThrowException(String errMsg, Throwable t)
-      throws YarnException {
+          throws YarnException {

Review Comment:
   The old indentation was correct, no?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to