Skip to content

Commit

Permalink
fix class not found exception (apache#5063)
Browse files Browse the repository at this point in the history
  • Loading branch information
liugddx authored and liunaijie committed Jul 13, 2023
1 parent 8cc3c0f commit 24e528a
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.seatunnel.shade.com.fasterxml.jackson.databind.ObjectMapper;

import org.apache.seatunnel.engine.common.Constant;
import org.apache.seatunnel.engine.common.loader.SeaTunnelChildFirstClassLoader;
import org.apache.seatunnel.engine.core.dag.logical.LogicalDag;
import org.apache.seatunnel.engine.core.job.JobImmutableInformation;
import org.apache.seatunnel.engine.core.job.JobInfo;
Expand All @@ -42,6 +43,7 @@
import com.hazelcast.internal.json.JsonValue;
import com.hazelcast.internal.util.JsonUtil;
import com.hazelcast.internal.util.StringUtil;
import com.hazelcast.jet.impl.execution.init.CustomClassLoadedObject;
import com.hazelcast.map.IMap;
import com.hazelcast.spi.impl.NodeEngine;

Expand Down Expand Up @@ -227,12 +229,14 @@ private JsonObject convertToJson(JobInfo jobInfo, long jobId) {
.getNodeEngine()
.getSerializationService()
.toObject(jobInfo.getJobImmutableInformation()));

ClassLoader classLoader =
new SeaTunnelChildFirstClassLoader(jobImmutableInformation.getPluginJarsUrls());
LogicalDag logicalDag =
this.textCommandService
.getNode()
.getNodeEngine()
.getSerializationService()
.toObject(jobImmutableInformation.getLogicalDag());
CustomClassLoadedObject.deserializeWithCustomClassLoader(
this.textCommandService.getNode().getNodeEngine().getSerializationService(),
classLoader,
jobImmutableInformation.getLogicalDag());

String jobMetrics =
getSeaTunnelServer().getCoordinatorService().getJobMetrics(jobId).toJsonString();
Expand Down

0 comments on commit 24e528a

Please sign in to comment.