zhuangchong commented on a change in pull request #4885:
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/4885#discussion_r584094271
##########
File path:
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
##########
@@ -664,12 +661,7 @@ public static String getAcitveRMName(String rmIds) {
}
} catch (Exception e) {
- for (int i = 1; i < rmIdArr.length; i++) {
- String state = getRMState(String.format(yarnUrl,
rmIdArr[i]));
- if (Constants.HADOOP_RM_STATE_ACTIVE.equals(state)) {
- return rmIdArr[i];
- }
Review comment:
My understanding of this code is that the main code in the try code
block is the HTTP request, and the exception is captured inside the HTTP
request. I have a big question about capturing the exception here and
conducting business processing this time, and I think it is not necessary.
---
我对此段代码的理解,try 代码块内主要代码是http请求,并且http请求内部捕获了异常,此次在此捕获异常并进行业务处理
我是存在很大疑问的,我认为是没有必要的。
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]