Hisoka-X commented on code in PR #6477:
URL: https://github.com/apache/seatunnel/pull/6477#discussion_r1519078222
##########
seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/classloader/DefaultClassLoaderService.java:
##########
@@ -140,7 +140,7 @@ int queryClassLoaderReferenceCount(long jobId,
Collection<URL> jars) {
/** Only for test */
@VisibleForTesting
- int queryClassLoaderCount() {
+ public int queryClassLoaderCount() {
Review Comment:
Why change this?
##########
seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/parse/MultipleTableJobConfigParser.java:
##########
@@ -165,8 +167,15 @@ public ImmutablePair<List<Action>, Set<URL>> parse() {
connectorJars.addAll(commonPluginJars);
}
ClassLoader parentClassLoader =
Thread.currentThread().getContextClassLoader();
- ClassLoader classLoader =
- new SeaTunnelChildFirstClassLoader(connectorJars,
parentClassLoader);
+
+ ClassLoader classLoader;
+ if (classLoaderService == null) {
+ classLoader = new SeaTunnelChildFirstClassLoader(connectorJars);
Review Comment:
I think we shoud keep this logic.
```suggestion
classLoader = new SeaTunnelChildFirstClassLoader(connectorJars,
parentClassLoader);
```
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestJobExecutionEnvironment.java:
##########
@@ -73,7 +75,12 @@ public Long getJobId() {
@Override
protected LogicalDag getLogicalDag() {
- ImmutablePair<List<Action>, Set<URL>> immutablePair =
getJobConfigParser().parse();
+ Map<String, Object> extensionServices =
+
nodeEngine.getNode().getNodeExtension().createExtensionServices();
+ SeaTunnelServer seaTunnelServer =
+ (SeaTunnelServer)
extensionServices.get(Constant.SEATUNNEL_SERVICE_NAME);
Review Comment:
Please reuse
https://github.com/apache/seatunnel/blob/b1332cbbda2df00c8cdbe9929270afb179a45fb6/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java#L100
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]