FangYongs commented on code in PR #22718:
URL: https://github.com/apache/flink/pull/22718#discussion_r1224127445
##########
flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java:
##########
@@ -585,6 +586,37 @@ public void releaseUserCodeClassLoader_willRegisterOnce()
releaseHookLatch.await();
}
+ @Test
+ public void testUseSystemClassLoader() throws IOException,
InterruptedException {
+ final BlobLibraryCacheManager libraryCacheManager =
+ new TestingBlobLibraryCacheManagerBuilder().build();
+
+ final LibraryCacheManager.ClassLoaderLease classLoaderLease =
+ libraryCacheManager.registerClassLoaderLease(new JobID(),
true);
+ UserCodeClassLoader userCodeClassLoader1 =
+ classLoaderLease.getOrResolveClassLoader(
+ Collections.emptyList(), Collections.emptyList());
+
+ assertTrue(userCodeClassLoader1 instanceof SimpleUserCodeClassLoader);
Review Comment:
When users add flink connector jars to lib directory and setup a flink
session cluster, jars and classpaths will always be empty if users submit SQL
jobs without udf.
Thanks for pointing out the `CL hook` in the user class loader that I missed
earlier, I will update the classloader in `JobManager` for `CL hook` when there
are no jars and classpaths
--
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]