Unverified Commit 83bdc31c authored by yangzehan's avatar yangzehan Committed by GitHub

Fixed URL misspelling causing the request to fail (#2859)

* Fixed URL misspelling causing the request to fail * Fixed URL misspelling causing the request to fail
parent 4437c847
...@@ -48,7 +48,6 @@ import java.util.Collections; ...@@ -48,7 +48,6 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import cn.hutool.core.util.ReUtil;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
/** /**
...@@ -105,13 +104,11 @@ public class YarnApplicationGateway extends YarnGateway { ...@@ -105,13 +104,11 @@ public class YarnApplicationGateway extends YarnGateway {
while (jobDetailsList.isEmpty() && counts-- > 0) { while (jobDetailsList.isEmpty() && counts-- > 0) {
Thread.sleep(1000); Thread.sleep(1000);
String url = ReUtil.replaceAll( String url = yarnClient
yarnClient
.getApplicationReport(clusterClient.getClusterId()) .getApplicationReport(clusterClient.getClusterId())
.getTrackingUrl() .getTrackingUrl()
+ JobsOverviewHeaders.URL, + JobsOverviewHeaders.URL.substring(1);
"/+",
"/");
String json = HttpUtil.get(url); String json = HttpUtil.get(url);
MultipleJobsDetails jobsDetails = FlinkJsonUtil.toBean(json, JobsOverviewHeaders.getInstance()); MultipleJobsDetails jobsDetails = FlinkJsonUtil.toBean(json, JobsOverviewHeaders.getInstance());
jobDetailsList.addAll(jobsDetails.getJobs()); jobDetailsList.addAll(jobsDetails.getJobs());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment