Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaochen-zhou committed Apr 1, 2024
1 parent 3d53038 commit 2766ca1
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ private SeaTunnelServer getSeaTunnelServer(boolean shouldBeMaster) {
this.textCommandService.getNode().getNodeExtension().createExtensionServices();
SeaTunnelServer seaTunnelServer =
(SeaTunnelServer) extensionServices.get(Constant.SEATUNNEL_SERVICE_NAME);
if (!seaTunnelServer.isMasterNode() && shouldBeMaster) {
if (shouldBeMaster && !seaTunnelServer.isMasterNode()) {
return null;
}
return seaTunnelServer;
Expand All @@ -373,8 +373,12 @@ private JsonObject convertToJson(JobInfo jobInfo, long jobId) {
.getNodeEngine()
.getSerializationService()
.toObject(jobInfo.getJobImmutableInformation()));
SeaTunnelServer seaTunnelServer = getSeaTunnelServer(true);

ClassLoaderService classLoaderService = getSeaTunnelServer(false).getClassLoaderService();
ClassLoaderService classLoaderService =
seaTunnelServer == null
? getSeaTunnelServer(false).getClassLoaderService()
: seaTunnelServer.getClassLoaderService();
ClassLoader classLoader =
classLoaderService.getClassLoader(
jobId, jobImmutableInformation.getPluginJarsUrls());
Expand All @@ -385,7 +389,6 @@ private JsonObject convertToJson(JobInfo jobInfo, long jobId) {
jobImmutableInformation.getLogicalDag());
classLoaderService.releaseClassLoader(jobId, jobImmutableInformation.getPluginJarsUrls());

SeaTunnelServer seaTunnelServer = getSeaTunnelServer(true);
String jobMetrics;
JobStatus jobStatus;
if (seaTunnelServer == null) {
Expand Down

0 comments on commit 2766ca1

Please sign in to comment.