Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[Improve][Zeta]Optimize the logic of RestHttpGetCommandProcessor#getSeaTunnelServer()" #6

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,13 @@ public boolean taskIsEnded(@NonNull TaskGroupLocation taskGroupLocation) {
public boolean isMasterNode() {
// must retry until the cluster have master node
try {
return Boolean.TRUE.equals(
RetryUtils.retryWithException(
() -> nodeEngine.getThisAddress().equals(nodeEngine.getMasterAddress()),
new RetryUtils.RetryMaterial(
Constant.OPERATION_RETRY_TIME,
true,
exception ->
exception instanceof NullPointerException && isRunning,
Constant.OPERATION_RETRY_SLEEP)));
return RetryUtils.retryWithException(
() -> nodeEngine.getThisAddress().equals(nodeEngine.getMasterAddress()),
new RetryUtils.RetryMaterial(
Constant.OPERATION_RETRY_TIME,
true,
exception -> exception instanceof NullPointerException && isRunning,
Constant.OPERATION_RETRY_SLEEP));
} catch (InterruptedException e) {
LOGGER.info("master node check interrupted");
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ private JsonObject convertToJson(JobInfo jobInfo, long jobId) {
SeaTunnelServer seaTunnelServer = getSeaTunnelServer(true);
String jobMetrics;
JobStatus jobStatus;
ClassLoaderService classLoaderService;
if (seaTunnelServer == null) {
jobMetrics =
(String)
Expand All @@ -391,14 +390,15 @@ private JsonObject convertToJson(JobInfo jobInfo, long jobId) {
getNode().nodeEngine,
new GetJobStatusOperation(jobId))
.join()];
classLoaderService = getSeaTunnelServer(false).getClassLoaderService();
seaTunnelServer = getSeaTunnelServer(false);

} else {
jobMetrics =
seaTunnelServer.getCoordinatorService().getJobMetrics(jobId).toJsonString();
jobStatus = seaTunnelServer.getCoordinatorService().getJobStatus(jobId);
classLoaderService = seaTunnelServer.getClassLoaderService();
}

ClassLoaderService classLoaderService = seaTunnelServer.getClassLoaderService();
ClassLoader classLoader =
classLoaderService.getClassLoader(
jobId, jobImmutableInformation.getPluginJarsUrls());
Expand Down
Loading