Unverified Commit 1aec0c83 authored by andystenhe's avatar andystenhe Committed by GitHub

fix issues 1983 (#1984)

parent ce2c3da2
......@@ -38,6 +38,9 @@ import org.apache.http.util.TextUtils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.ExecutionException;
import cn.hutool.core.util.StrUtil;
/**
* KubernetesApplicationGateway
......@@ -84,7 +87,19 @@ public class KubernetesApplicationGateway extends KubernetesGateway {
while (jobStatusMessages.size() == 0 && counts > 0) {
Thread.sleep(1000);
counts--;
try {
jobStatusMessages = clusterClient.listJobs().get();
} catch (ExecutionException e) {
if (StrUtil.contains(e.getMessage(), "Number of retries has been exhausted.")) {
// refresh the job manager ip address
clusterClient.close();
clusterClient = clusterClientProvider.getClusterClient();
} else {
LogUtil.getError(e);
throw e;
}
}
if (jobStatusMessages.size() > 0) {
break;
}
......
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