slfan1989 commented on code in PR #4938:
URL: https://github.com/apache/hadoop/pull/4938#discussion_r988650049
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java:
##########
@@ -1521,47 +1679,85 @@ public AppTimeoutInfo getAppTimeout(HttpServletRequest
hsr, String appId,
String type) throws AuthorizationException {
if (appId == null || appId.isEmpty()) {
+ routerMetrics.incrGetAppTimeoutFailedRetrieved();
throw new IllegalArgumentException("Parameter error, the appId is empty
or null.");
}
+ // Check that the appId format is accurate
+ try {
+ ApplicationId.fromString(appId);
Review Comment:
Thanks for your suggestion, I will refactor this part of the code.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]