You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/14 07:33:00 UTC

[GitHub] [flink] Myracle commented on a diff in pull request #20001: [FLINK-27659][table] Planner support to use jar which is registered by 'CREATE FUNTION USING JAR' syntax

Myracle commented on code in PR #20001:
URL: https://github.com/apache/flink/pull/20001#discussion_r920845158


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/ResourceManager.java:
##########
@@ -69,43 +74,58 @@ public URLClassLoader getUserClassLoader() {
         return userClassLoader;
     }
 
-    public void registerResource(ResourceUri resourceUri) throws IOException {
-        // check whether the resource has been registered
-        if (resourceInfos.containsKey(resourceUri)) {
-            LOG.info(
-                    "Resource [{}] has been registered, overwriting of registered resource is not supported "
-                            + "in the current version, skipping.",
-                    resourceUri.getUri());
-            return;
-        }
+    /**
+     * Due to anyone of the resource in list maybe fail during register, so we should stage it
+     * before actual register to guarantee transaction process. If all the resources are avaliable,
+     * register them into the {@link ResourceManager}.
+     */
+    public void registerJarResource(List<ResourceUri> resourceUris) throws IOException {

Review Comment:
   registerJarResources?



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org