leonardBang commented on code in PR #21806:
URL: https://github.com/apache/flink/pull/21806#discussion_r1094447834


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/table/lookup/CachingLookupFunction.java:
##########
@@ -177,4 +179,10 @@ private void updateLatestLoadTime(long loadTime) {
         }
         latestLoadTime = loadTime;
     }
+
+    private void initializeFullCache(LookupCache cache, FunctionContext 
context) {

Review Comment:
   ```suggestion
       private void initializeFullCache(LookupFullCache lookupFullCache, 
FunctionContext context) {
                 cache.setUserCodeClassLoader(context.getUserCodeClassLoader());
   ```



##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/table/lookup/fullcache/CacheLoader.java:
##########
@@ -68,9 +68,15 @@ public abstract class CacheLoader implements AutoCloseable, 
Serializable {
     /** @return whether reload was successful and was not interrupted. */
     protected abstract boolean updateCache() throws Exception;
 
-    public void open(Configuration parameters) throws Exception {
+    public void open(Configuration parameters, ClassLoader 
userCodeClassLoader) throws Exception {
         firstLoadLatch = new CountDownLatch(1);
-        reloadExecutor = Executors.newSingleThreadExecutor();
+        reloadExecutor =
+                Executors.newSingleThreadExecutor(
+                        r -> {
+                            Thread thread = 
Executors.defaultThreadFactory().newThread(r);

Review Comment:
   Given a thread name will help debug/troubleshot a lot



-- 
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]

Reply via email to