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


##########
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/resource/ClientResourceManager.java:
##########
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.flink.table.client.resource;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.table.resource.ResourceManager;
+import org.apache.flink.table.resource.ResourceType;
+import org.apache.flink.table.resource.ResourceUri;
+import org.apache.flink.util.MutableURLClassLoader;
+
+import java.net.URL;
+
+/**
+ * This is only used by SqlClient, which expose {@code removeURL} method to 
support {@code REMOVE
+ * JAR} clause.
+ */
+@Internal
+public class ClientResourceManager extends ResourceManager {
+
+    public ClientResourceManager(Configuration config, MutableURLClassLoader 
userClassLoader) {
+        super(config, userClassLoader);
+    }
+
+    /**
+     * The method is only used to SqlClient for supporting remove jar syntax. 
SqlClient must
+     * guarantee also remove the jar from userClassLoader because it is {@code
+     * ClientMutableURLClassLoader}.
+     */
+    public URL unregisterJarResource(String jarPath) {
+        return resourceInfos.remove(new ResourceUri(ResourceType.JAR, 
jarPath));

Review Comment:
   We have qualified it in `SessionContext#removeJar` method, so here no need 
it. BTW, we should check it in here after 
[FLINK-27790](https://issues.apache.org/jira/browse/FLINK-27790) which we can 
support to remove remote jar.



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to