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/06/14 14:35:08 UTC

[GitHub] [flink] wuchong commented on a diff in pull request #19859: [FLINK-27861][table] Introduce UserResourceManager to manage user defined resource

wuchong commented on code in PR #19859:
URL: https://github.com/apache/flink/pull/19859#discussion_r896739296


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/config/TableConfigOptions.java:
##########
@@ -178,6 +178,15 @@ private TableConfigOptions() {}
                     .withDescription(
                             "Specifies a threshold where class members of generated code will be grouped into arrays by types.");
 
+    @Documentation.TableOption(execMode = Documentation.ExecMode.BATCH_STREAMING)
+    @Documentation.OverrideDefault("System.getProperty(\"java.io.tmpdir\")")
+    public static final ConfigOption<String> DOWNLOADED_RESOURCES_TMP_DIR =
+            key("table.downloaded.resources.tmpdir")

Review Comment:
   Why not reuse the common option `io.tmp.dir`? Almost all the flink components use it as the base temporary path. We can create a unique directory under it, e.g. `flink-table-{UUID}/flink-table-download`. 
   
   We can introduce a dedicated option for the download tmp dir in the future if needed. 



##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/UserResourceManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ *  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.resource;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.FileSystem;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.table.api.config.TableConfigOptions;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.FlinkRuntimeException;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.util.FlinkUserCodeClassLoaders.SafetyNetWrapperClassLoader;
+
+/** A manager for dealing with all user defined resource. */
+@Internal
+public class UserResourceManager {
+
+    private final Logger LOG = LoggerFactory.getLogger(UserResourceManager.class);
+
+    private final Configuration config;
+    private final SafetyNetWrapperClassLoader userClassLoader;

Review Comment:
   How can we ensure the user classloader is `SafetyNetWrapperClassLoader`? 
   If you are using `FlinkUserCodeClassLoaders` to create classloader, the returned classloader might not be `SafetyNetWrapperClassLoader` if `checkClassLoaderLeak` is false. 



##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/UserResourceManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ *  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.resource;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.FileSystem;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.table.api.config.TableConfigOptions;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.FlinkRuntimeException;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.util.FlinkUserCodeClassLoaders.SafetyNetWrapperClassLoader;
+
+/** A manager for dealing with all user defined resource. */
+@Internal
+public class UserResourceManager {
+
+    private final Logger LOG = LoggerFactory.getLogger(UserResourceManager.class);
+
+    private final Configuration config;
+    private final SafetyNetWrapperClassLoader userClassLoader;
+    private final Map<ResourceUri, URL> resourceInfos;
+
+    public UserResourceManager(Configuration config, SafetyNetWrapperClassLoader userClassLoader) {
+        this.config = config;
+        this.userClassLoader = userClassLoader;
+        this.resourceInfos = new HashMap<>();
+    }
+
+    public URLClassLoader getUserClassLoader() {
+        return userClassLoader;
+    }
+
+    public void registerResource(ResourceUri resourceUri) {
+        // 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;
+        }
+
+        Path path = new Path(resourceUri.getUri());
+        // check resource firstly
+        checkResource(resourceUri.getResourceType(), path);
+
+        URL localUrl;
+        // check resource scheme
+        String scheme = StringUtils.lowerCase(path.toUri().getScheme());
+        // download resource to local path firstly if in remote
+        if (scheme != null && !"file".equals(scheme)) {
+            localUrl = downloadResource(path);
+        } else {
+            localUrl = getURLFromPath(path);
+        }
+
+        // only need add jar resource to classloader
+        if (ResourceType.JAR.equals(resourceUri.getResourceType())) {
+            userClassLoader.addURL(localUrl);
+            LOG.info("Added jar resource [{}] to class path.", localUrl.toString());
+        }
+
+        resourceInfos.put(resourceUri, localUrl);
+        LOG.info("Register resource [{}] successfully.", resourceUri.getUri());
+    }
+
+    public Map<ResourceUri, URL> getResources() {
+        return Collections.unmodifiableMap(resourceInfos);
+    }
+
+    public Set<URL> getJarResourceURLs() {
+        return resourceInfos.entrySet().stream()
+                .filter(entry -> ResourceType.JAR.equals(entry.getKey().getResourceType()))
+                .map(Map.Entry::getValue)
+                .collect(Collectors.toSet());
+    }
+
+    private void checkResource(ResourceType resourceType, Path path) {
+        try {
+            FileSystem fs = path.getFileSystem();
+            // check resource exists firstly
+            if (!fs.exists(path)) {
+                throw new IllegalArgumentException(String.format("Resource [%s] not found.", path));
+            }
+
+            // register directory is not allowed for jar resource
+            if (ResourceType.JAR.equals(resourceType) && fs.getFileStatus(path).isDir()) {
+                throw new IllegalArgumentException(
+                        String.format(
+                                "Directory [%s] is not allowed for registering jar resource.",
+                                path));
+            }
+
+        } catch (IOException e) {
+            throw new FlinkRuntimeException(
+                    String.format("Failed to check resource [%s].", path), e);
+        }
+    }
+
+    @VisibleForTesting
+    protected URL downloadResource(Path remotePath) {
+        final String localTmpDir = config.get(TableConfigOptions.DOWNLOADED_RESOURCES_TMP_DIR);
+        // add an uuid prefix for local file name
+        Path localPath =
+                new Path(
+                        String.format(
+                                "%s%s%s-%s",

Review Comment:
   1. Please avoid using string concatenating to get the file path. Usually, you can use `Path#resolve`. 
   2. Please add the correct file suffix (`.jar` in this case) 



##########
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/resource/UserResourceManagerTest.java:
##########
@@ -0,0 +1,195 @@
+/*
+ *  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.resource;
+
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.configuration.CoreOptions;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.FlinkUserCodeClassLoaders;
+import org.apache.flink.util.UserClassLoaderJarTestUtils;
+
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.rules.TemporaryFolder;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.apache.flink.core.testutils.FlinkMatchers.containsMessage;
+import static org.apache.flink.util.FlinkUserCodeClassLoader.NOOP_EXCEPTION_HANDLER;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
+import static org.assertj.core.api.HamcrestCondition.matching;
+import static org.junit.Assert.assertEquals;
+
+/** Tests for {@link UserResourceManager}. */
+public class UserResourceManagerTest {
+
+    @ClassRule public static TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+    @Rule public ExpectedException expectedException = ExpectedException.none();
+
+    public static final String LOWER_UDF_CLASS = "LowerUDF";
+    public static final String UPPER_UDF_CLASS = "UpperUDF";
+    public static final String LOWER_UDF_CODE =
+            "public class "
+                    + LOWER_UDF_CLASS
+                    + " extends org.apache.flink.table.functions.ScalarFunction {\n"
+                    + "  public String eval(String str) {\n"
+                    + "    return str.toLowerCase();\n"
+                    + "  }\n"
+                    + "}\n";
+    public static final String UPPER_UDF_CODE =
+            "public class "
+                    + UPPER_UDF_CLASS
+                    + " extends org.apache.flink.table.functions.ScalarFunction {\n"
+                    + "  public String eval(String str) {\n"
+                    + "    return str.toUpperCase();\n"
+                    + "  }\n"
+                    + "}\n";
+
+    private static File udfJar;
+
+    @BeforeClass
+    public static void prepare() throws Exception {
+        Map<String, String> classNameAndCode = new HashMap<>();
+        classNameAndCode.put(LOWER_UDF_CLASS, LOWER_UDF_CODE);
+        classNameAndCode.put(UPPER_UDF_CLASS, UPPER_UDF_CODE);
+        udfJar =
+                UserClassLoaderJarTestUtils.createJarFile(
+                        temporaryFolder.newFolder("test-jar"),
+                        "test-classloader-udf.jar",
+                        classNameAndCode);
+    }
+
+    @Test
+    public void testRegisterResource() throws Exception {
+        UserResourceManager userResourceManager = createResourceManager(new URL[0]);
+        URLClassLoader userClassLoader = userResourceManager.getUserClassLoader();
+
+        // test class loading before register resource
+        try {
+            Class.forName(LOWER_UDF_CLASS, false, userClassLoader);
+            fail("Should fail.");
+        } catch (ClassNotFoundException e) {
+        }
+
+        // register the same jar repeatedly
+        userResourceManager.registerResource(new ResourceUri(ResourceType.JAR, udfJar.getPath()));
+        userResourceManager.registerResource(new ResourceUri(ResourceType.JAR, udfJar.getPath()));
+
+        // assert resource infos
+        Map<ResourceUri, URL> expected =
+                Collections.singletonMap(
+                        new ResourceUri(ResourceType.JAR, udfJar.getPath()),
+                        userResourceManager.getURLFromPath(new Path(udfJar.getPath())));
+
+        assertEquals(expected, userResourceManager.getResources());
+
+        // test load class
+        final Class<?> clazz1 = Class.forName(LOWER_UDF_CLASS, false, userClassLoader);
+        final Class<?> clazz2 = Class.forName(LOWER_UDF_CLASS, false, userClassLoader);
+
+        assertEquals(clazz1, clazz2);
+    }
+
+    @Test
+    public void testRegisterInvalidResource() throws Exception {
+        UserResourceManager userResourceManager = createResourceManager(new URL[0]);
+
+        // test register non-exist file
+        String uri = temporaryFolder.getRoot().getPath() + Path.SEPARATOR + "test-file";
+        try {
+            userResourceManager.registerResource(new ResourceUri(ResourceType.FILE, uri));
+            fail("Should fail.");
+        } catch (IllegalArgumentException e) {
+            assertThat(e)
+                    .satisfies(
+                            matching(
+                                    containsMessage(
+                                            String.format("Resource [%s] not found.", uri))));
+        }
+
+        // test register directory for jar resource
+        uri = temporaryFolder.newFolder("test-jar-dir").getPath();
+        try {
+            userResourceManager.registerResource(new ResourceUri(ResourceType.JAR, uri));
+            fail("Should fail.");
+        } catch (IllegalArgumentException e) {
+            assertThat(e)
+                    .satisfies(
+                            matching(
+                                    containsMessage(
+                                            String.format(
+                                                    "Directory [%s] is not allowed for registering jar resource.",

Review Comment:
   Can simplify the exception assertion using `org.apache.flink.core.testutils.CommonTestUtils#assertThrows`. 



##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/UserResourceManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ *  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.resource;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.FileSystem;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.table.api.config.TableConfigOptions;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.FlinkRuntimeException;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.util.FlinkUserCodeClassLoaders.SafetyNetWrapperClassLoader;
+
+/** A manager for dealing with all user defined resource. */
+@Internal
+public class UserResourceManager {
+
+    private final Logger LOG = LoggerFactory.getLogger(UserResourceManager.class);
+
+    private final Configuration config;
+    private final SafetyNetWrapperClassLoader userClassLoader;
+    private final Map<ResourceUri, URL> resourceInfos;
+
+    public UserResourceManager(Configuration config, SafetyNetWrapperClassLoader userClassLoader) {
+        this.config = config;
+        this.userClassLoader = userClassLoader;
+        this.resourceInfos = new HashMap<>();
+    }
+
+    public URLClassLoader getUserClassLoader() {
+        return userClassLoader;
+    }
+
+    public void registerResource(ResourceUri resourceUri) {
+        // 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;
+        }
+
+        Path path = new Path(resourceUri.getUri());
+        // check resource firstly
+        checkResource(resourceUri.getResourceType(), path);
+
+        URL localUrl;
+        // check resource scheme
+        String scheme = StringUtils.lowerCase(path.toUri().getScheme());
+        // download resource to local path firstly if in remote
+        if (scheme != null && !"file".equals(scheme)) {
+            localUrl = downloadResource(path);
+        } else {
+            localUrl = getURLFromPath(path);
+        }
+
+        // only need add jar resource to classloader
+        if (ResourceType.JAR.equals(resourceUri.getResourceType())) {
+            userClassLoader.addURL(localUrl);
+            LOG.info("Added jar resource [{}] to class path.", localUrl.toString());
+        }
+
+        resourceInfos.put(resourceUri, localUrl);
+        LOG.info("Register resource [{}] successfully.", resourceUri.getUri());
+    }
+
+    public Map<ResourceUri, URL> getResources() {
+        return Collections.unmodifiableMap(resourceInfos);
+    }
+
+    public Set<URL> getJarResourceURLs() {
+        return resourceInfos.entrySet().stream()
+                .filter(entry -> ResourceType.JAR.equals(entry.getKey().getResourceType()))
+                .map(Map.Entry::getValue)
+                .collect(Collectors.toSet());
+    }
+
+    private void checkResource(ResourceType resourceType, Path path) {
+        try {
+            FileSystem fs = path.getFileSystem();
+            // check resource exists firstly
+            if (!fs.exists(path)) {
+                throw new IllegalArgumentException(String.format("Resource [%s] not found.", path));
+            }
+
+            // register directory is not allowed for jar resource
+            if (ResourceType.JAR.equals(resourceType) && fs.getFileStatus(path).isDir()) {
+                throw new IllegalArgumentException(
+                        String.format(
+                                "Directory [%s] is not allowed for registering jar resource.",
+                                path));
+            }
+
+        } catch (IOException e) {
+            throw new FlinkRuntimeException(
+                    String.format("Failed to check resource [%s].", path), e);
+        }
+    }
+
+    @VisibleForTesting
+    protected URL downloadResource(Path remotePath) {
+        final String localTmpDir = config.get(TableConfigOptions.DOWNLOADED_RESOURCES_TMP_DIR);

Review Comment:
   The tmpdir should be initialized at the constructor of `UserResourceManager`.



##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/UserResourceManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ *  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.resource;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.FileSystem;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.table.api.config.TableConfigOptions;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.FlinkRuntimeException;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.util.FlinkUserCodeClassLoaders.SafetyNetWrapperClassLoader;
+
+/** A manager for dealing with all user defined resource. */
+@Internal
+public class UserResourceManager {
+
+    private final Logger LOG = LoggerFactory.getLogger(UserResourceManager.class);
+
+    private final Configuration config;
+    private final SafetyNetWrapperClassLoader userClassLoader;
+    private final Map<ResourceUri, URL> resourceInfos;
+
+    public UserResourceManager(Configuration config, SafetyNetWrapperClassLoader userClassLoader) {
+        this.config = config;
+        this.userClassLoader = userClassLoader;
+        this.resourceInfos = new HashMap<>();
+    }
+
+    public URLClassLoader getUserClassLoader() {
+        return userClassLoader;
+    }
+
+    public void registerResource(ResourceUri resourceUri) {
+        // 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;
+        }
+
+        Path path = new Path(resourceUri.getUri());
+        // check resource firstly
+        checkResource(resourceUri.getResourceType(), path);
+
+        URL localUrl;
+        // check resource scheme
+        String scheme = StringUtils.lowerCase(path.toUri().getScheme());
+        // download resource to local path firstly if in remote
+        if (scheme != null && !"file".equals(scheme)) {
+            localUrl = downloadResource(path);
+        } else {
+            localUrl = getURLFromPath(path);
+        }
+
+        // only need add jar resource to classloader
+        if (ResourceType.JAR.equals(resourceUri.getResourceType())) {

Review Comment:
   Please check the file is a valid jar as well. (see `org.apache.flink.util.JarUtils#checkJarFile`)



##########
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/resource/UserResourceManagerTest.java:
##########
@@ -0,0 +1,195 @@
+/*
+ *  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.resource;
+
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.configuration.CoreOptions;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.FlinkUserCodeClassLoaders;
+import org.apache.flink.util.UserClassLoaderJarTestUtils;
+
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.rules.TemporaryFolder;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.apache.flink.core.testutils.FlinkMatchers.containsMessage;
+import static org.apache.flink.util.FlinkUserCodeClassLoader.NOOP_EXCEPTION_HANDLER;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
+import static org.assertj.core.api.HamcrestCondition.matching;
+import static org.junit.Assert.assertEquals;
+
+/** Tests for {@link UserResourceManager}. */
+public class UserResourceManagerTest {
+
+    @ClassRule public static TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+    @Rule public ExpectedException expectedException = ExpectedException.none();
+
+    public static final String LOWER_UDF_CLASS = "LowerUDF";
+    public static final String UPPER_UDF_CLASS = "UpperUDF";
+    public static final String LOWER_UDF_CODE =
+            "public class "
+                    + LOWER_UDF_CLASS
+                    + " extends org.apache.flink.table.functions.ScalarFunction {\n"
+                    + "  public String eval(String str) {\n"
+                    + "    return str.toLowerCase();\n"
+                    + "  }\n"
+                    + "}\n";
+    public static final String UPPER_UDF_CODE =
+            "public class "
+                    + UPPER_UDF_CLASS
+                    + " extends org.apache.flink.table.functions.ScalarFunction {\n"
+                    + "  public String eval(String str) {\n"
+                    + "    return str.toUpperCase();\n"
+                    + "  }\n"
+                    + "}\n";
+
+    private static File udfJar;
+
+    @BeforeClass
+    public static void prepare() throws Exception {
+        Map<String, String> classNameAndCode = new HashMap<>();
+        classNameAndCode.put(LOWER_UDF_CLASS, LOWER_UDF_CODE);
+        classNameAndCode.put(UPPER_UDF_CLASS, UPPER_UDF_CODE);
+        udfJar =
+                UserClassLoaderJarTestUtils.createJarFile(
+                        temporaryFolder.newFolder("test-jar"),
+                        "test-classloader-udf.jar",
+                        classNameAndCode);
+    }
+
+    @Test
+    public void testRegisterResource() throws Exception {
+        UserResourceManager userResourceManager = createResourceManager(new URL[0]);
+        URLClassLoader userClassLoader = userResourceManager.getUserClassLoader();
+
+        // test class loading before register resource
+        try {
+            Class.forName(LOWER_UDF_CLASS, false, userClassLoader);
+            fail("Should fail.");
+        } catch (ClassNotFoundException e) {
+        }
+
+        // register the same jar repeatedly
+        userResourceManager.registerResource(new ResourceUri(ResourceType.JAR, udfJar.getPath()));
+        userResourceManager.registerResource(new ResourceUri(ResourceType.JAR, udfJar.getPath()));
+
+        // assert resource infos
+        Map<ResourceUri, URL> expected =
+                Collections.singletonMap(
+                        new ResourceUri(ResourceType.JAR, udfJar.getPath()),
+                        userResourceManager.getURLFromPath(new Path(udfJar.getPath())));
+
+        assertEquals(expected, userResourceManager.getResources());
+
+        // test load class
+        final Class<?> clazz1 = Class.forName(LOWER_UDF_CLASS, false, userClassLoader);
+        final Class<?> clazz2 = Class.forName(LOWER_UDF_CLASS, false, userClassLoader);
+
+        assertEquals(clazz1, clazz2);
+    }
+
+    @Test
+    public void testRegisterInvalidResource() throws Exception {
+        UserResourceManager userResourceManager = createResourceManager(new URL[0]);
+
+        // test register non-exist file
+        String uri = temporaryFolder.getRoot().getPath() + Path.SEPARATOR + "test-file";
+        try {
+            userResourceManager.registerResource(new ResourceUri(ResourceType.FILE, uri));
+            fail("Should fail.");
+        } catch (IllegalArgumentException e) {
+            assertThat(e)
+                    .satisfies(
+                            matching(
+                                    containsMessage(
+                                            String.format("Resource [%s] not found.", uri))));
+        }
+
+        // test register directory for jar resource
+        uri = temporaryFolder.newFolder("test-jar-dir").getPath();
+        try {
+            userResourceManager.registerResource(new ResourceUri(ResourceType.JAR, uri));
+            fail("Should fail.");
+        } catch (IllegalArgumentException e) {
+            assertThat(e)
+                    .satisfies(
+                            matching(
+                                    containsMessage(
+                                            String.format(
+                                                    "Directory [%s] is not allowed for registering jar resource.",
+                                                    uri))));
+        }
+    }
+
+    @Test
+    public void testDownloadResource() throws Exception {
+        Path srcPath = new Path(udfJar.getPath());
+        UserResourceManager userResourceManager = createResourceManager(new URL[0]);
+
+        // test download resource to local path
+        URL localUrl = userResourceManager.downloadResource(srcPath);
+
+        String expected = FileUtils.readFileUtf8(udfJar);
+        String actual = FileUtils.readFileUtf8(new File(localUrl.getFile()));

Review Comment:
   Would be better to use `org.apache.flink.util.FileUtils#readAllBytes`. The jar file may not be compiliant with UTF-8 encoding. 



##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/UserResourceManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ *  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.resource;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.FileSystem;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.table.api.config.TableConfigOptions;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.FlinkRuntimeException;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.util.FlinkUserCodeClassLoaders.SafetyNetWrapperClassLoader;
+
+/** A manager for dealing with all user defined resource. */
+@Internal
+public class UserResourceManager {
+
+    private final Logger LOG = LoggerFactory.getLogger(UserResourceManager.class);
+
+    private final Configuration config;
+    private final SafetyNetWrapperClassLoader userClassLoader;
+    private final Map<ResourceUri, URL> resourceInfos;
+
+    public UserResourceManager(Configuration config, SafetyNetWrapperClassLoader userClassLoader) {
+        this.config = config;
+        this.userClassLoader = userClassLoader;
+        this.resourceInfos = new HashMap<>();
+    }
+
+    public URLClassLoader getUserClassLoader() {
+        return userClassLoader;
+    }
+
+    public void registerResource(ResourceUri resourceUri) {
+        // 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;
+        }
+
+        Path path = new Path(resourceUri.getUri());
+        // check resource firstly
+        checkResource(resourceUri.getResourceType(), path);
+
+        URL localUrl;
+        // check resource scheme
+        String scheme = StringUtils.lowerCase(path.toUri().getScheme());
+        // download resource to local path firstly if in remote
+        if (scheme != null && !"file".equals(scheme)) {
+            localUrl = downloadResource(path);
+        } else {
+            localUrl = getURLFromPath(path);
+        }
+
+        // only need add jar resource to classloader
+        if (ResourceType.JAR.equals(resourceUri.getResourceType())) {
+            userClassLoader.addURL(localUrl);
+            LOG.info("Added jar resource [{}] to class path.", localUrl.toString());
+        }
+
+        resourceInfos.put(resourceUri, localUrl);
+        LOG.info("Register resource [{}] successfully.", resourceUri.getUri());
+    }
+
+    public Map<ResourceUri, URL> getResources() {
+        return Collections.unmodifiableMap(resourceInfos);
+    }
+
+    public Set<URL> getJarResourceURLs() {
+        return resourceInfos.entrySet().stream()
+                .filter(entry -> ResourceType.JAR.equals(entry.getKey().getResourceType()))
+                .map(Map.Entry::getValue)
+                .collect(Collectors.toSet());
+    }
+
+    private void checkResource(ResourceType resourceType, Path path) {
+        try {
+            FileSystem fs = path.getFileSystem();
+            // check resource exists firstly
+            if (!fs.exists(path)) {
+                throw new IllegalArgumentException(String.format("Resource [%s] not found.", path));
+            }
+
+            // register directory is not allowed for jar resource
+            if (ResourceType.JAR.equals(resourceType) && fs.getFileStatus(path).isDir()) {
+                throw new IllegalArgumentException(
+                        String.format(
+                                "Directory [%s] is not allowed for registering jar resource.",
+                                path));
+            }
+
+        } catch (IOException e) {
+            throw new FlinkRuntimeException(
+                    String.format("Failed to check resource [%s].", path), e);
+        }
+    }
+
+    @VisibleForTesting
+    protected URL downloadResource(Path remotePath) {
+        final String localTmpDir = config.get(TableConfigOptions.DOWNLOADED_RESOURCES_TMP_DIR);
+        // add an uuid prefix for local file name
+        Path localPath =
+                new Path(
+                        String.format(
+                                "%s%s%s-%s",
+                                localTmpDir,
+                                Path.SEPARATOR,
+                                UUID.randomUUID(),
+                                remotePath.getName()));
+        try {
+            FileUtils.copy(remotePath, localPath, true);
+            LOG.info(
+                    "Download resource [{}] to local path [{}] successfully.",
+                    remotePath,
+                    localPath);
+        } catch (IOException e) {
+            throw new FlinkRuntimeException(
+                    String.format(
+                            "Failed to download resource [%s] to local path [%s].",
+                            remotePath, localTmpDir),
+                    e);
+        }
+        return getURLFromPath(localPath);
+    }
+
+    @VisibleForTesting
+    protected URL getURLFromPath(Path path) {
+        try {
+            // if scheme is null, rewrite it to file
+            if (path.toUri().getScheme() == null) {

Review Comment:
   The scheme can also be `file`. 



##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/UserResourceManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ *  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.resource;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.FileSystem;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.table.api.config.TableConfigOptions;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.FlinkRuntimeException;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.util.FlinkUserCodeClassLoaders.SafetyNetWrapperClassLoader;
+
+/** A manager for dealing with all user defined resource. */
+@Internal
+public class UserResourceManager {
+
+    private final Logger LOG = LoggerFactory.getLogger(UserResourceManager.class);
+
+    private final Configuration config;
+    private final SafetyNetWrapperClassLoader userClassLoader;
+    private final Map<ResourceUri, URL> resourceInfos;
+
+    public UserResourceManager(Configuration config, SafetyNetWrapperClassLoader userClassLoader) {
+        this.config = config;
+        this.userClassLoader = userClassLoader;
+        this.resourceInfos = new HashMap<>();
+    }
+
+    public URLClassLoader getUserClassLoader() {
+        return userClassLoader;
+    }
+
+    public void registerResource(ResourceUri resourceUri) {
+        // 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;
+        }
+
+        Path path = new Path(resourceUri.getUri());
+        // check resource firstly
+        checkResource(resourceUri.getResourceType(), path);
+
+        URL localUrl;
+        // check resource scheme
+        String scheme = StringUtils.lowerCase(path.toUri().getScheme());
+        // download resource to local path firstly if in remote
+        if (scheme != null && !"file".equals(scheme)) {
+            localUrl = downloadResource(path);
+        } else {
+            localUrl = getURLFromPath(path);
+        }
+
+        // only need add jar resource to classloader
+        if (ResourceType.JAR.equals(resourceUri.getResourceType())) {
+            userClassLoader.addURL(localUrl);
+            LOG.info("Added jar resource [{}] to class path.", localUrl.toString());
+        }
+
+        resourceInfos.put(resourceUri, localUrl);
+        LOG.info("Register resource [{}] successfully.", resourceUri.getUri());
+    }
+
+    public Map<ResourceUri, URL> getResources() {
+        return Collections.unmodifiableMap(resourceInfos);
+    }
+
+    public Set<URL> getJarResourceURLs() {
+        return resourceInfos.entrySet().stream()
+                .filter(entry -> ResourceType.JAR.equals(entry.getKey().getResourceType()))
+                .map(Map.Entry::getValue)
+                .collect(Collectors.toSet());
+    }
+
+    private void checkResource(ResourceType resourceType, Path path) {
+        try {
+            FileSystem fs = path.getFileSystem();
+            // check resource exists firstly
+            if (!fs.exists(path)) {
+                throw new IllegalArgumentException(String.format("Resource [%s] not found.", path));
+            }
+
+            // register directory is not allowed for jar resource
+            if (ResourceType.JAR.equals(resourceType) && fs.getFileStatus(path).isDir()) {
+                throw new IllegalArgumentException(
+                        String.format(
+                                "Directory [%s] is not allowed for registering jar resource.",
+                                path));
+            }
+
+        } catch (IOException e) {
+            throw new FlinkRuntimeException(
+                    String.format("Failed to check resource [%s].", path), e);
+        }
+    }
+
+    @VisibleForTesting
+    protected URL downloadResource(Path remotePath) {
+        final String localTmpDir = config.get(TableConfigOptions.DOWNLOADED_RESOURCES_TMP_DIR);
+        // add an uuid prefix for local file name
+        Path localPath =
+                new Path(
+                        String.format(
+                                "%s%s%s-%s",
+                                localTmpDir,
+                                Path.SEPARATOR,
+                                UUID.randomUUID(),
+                                remotePath.getName()));

Review Comment:
   Usually, the file name first, random id after. 



##########
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/resource/UserResourceManagerTest.java:
##########
@@ -0,0 +1,195 @@
+/*
+ *  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.resource;
+
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.configuration.CoreOptions;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.FlinkUserCodeClassLoaders;
+import org.apache.flink.util.UserClassLoaderJarTestUtils;
+
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.rules.TemporaryFolder;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.apache.flink.core.testutils.FlinkMatchers.containsMessage;
+import static org.apache.flink.util.FlinkUserCodeClassLoader.NOOP_EXCEPTION_HANDLER;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
+import static org.assertj.core.api.HamcrestCondition.matching;
+import static org.junit.Assert.assertEquals;
+
+/** Tests for {@link UserResourceManager}. */
+public class UserResourceManagerTest {
+
+    @ClassRule public static TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+    @Rule public ExpectedException expectedException = ExpectedException.none();
+
+    public static final String LOWER_UDF_CLASS = "LowerUDF";
+    public static final String UPPER_UDF_CLASS = "UpperUDF";
+    public static final String LOWER_UDF_CODE =
+            "public class "
+                    + LOWER_UDF_CLASS
+                    + " extends org.apache.flink.table.functions.ScalarFunction {\n"
+                    + "  public String eval(String str) {\n"
+                    + "    return str.toLowerCase();\n"
+                    + "  }\n"
+                    + "}\n";
+    public static final String UPPER_UDF_CODE =
+            "public class "
+                    + UPPER_UDF_CLASS
+                    + " extends org.apache.flink.table.functions.ScalarFunction {\n"
+                    + "  public String eval(String str) {\n"
+                    + "    return str.toUpperCase();\n"
+                    + "  }\n"
+                    + "}\n";
+
+    private static File udfJar;
+
+    @BeforeClass
+    public static void prepare() throws Exception {
+        Map<String, String> classNameAndCode = new HashMap<>();
+        classNameAndCode.put(LOWER_UDF_CLASS, LOWER_UDF_CODE);
+        classNameAndCode.put(UPPER_UDF_CLASS, UPPER_UDF_CODE);
+        udfJar =
+                UserClassLoaderJarTestUtils.createJarFile(
+                        temporaryFolder.newFolder("test-jar"),
+                        "test-classloader-udf.jar",
+                        classNameAndCode);
+    }
+
+    @Test
+    public void testRegisterResource() throws Exception {
+        UserResourceManager userResourceManager = createResourceManager(new URL[0]);
+        URLClassLoader userClassLoader = userResourceManager.getUserClassLoader();
+
+        // test class loading before register resource
+        try {
+            Class.forName(LOWER_UDF_CLASS, false, userClassLoader);
+            fail("Should fail.");
+        } catch (ClassNotFoundException e) {
+        }
+
+        // register the same jar repeatedly
+        userResourceManager.registerResource(new ResourceUri(ResourceType.JAR, udfJar.getPath()));
+        userResourceManager.registerResource(new ResourceUri(ResourceType.JAR, udfJar.getPath()));
+
+        // assert resource infos
+        Map<ResourceUri, URL> expected =
+                Collections.singletonMap(
+                        new ResourceUri(ResourceType.JAR, udfJar.getPath()),
+                        userResourceManager.getURLFromPath(new Path(udfJar.getPath())));
+
+        assertEquals(expected, userResourceManager.getResources());
+
+        // test load class
+        final Class<?> clazz1 = Class.forName(LOWER_UDF_CLASS, false, userClassLoader);
+        final Class<?> clazz2 = Class.forName(LOWER_UDF_CLASS, false, userClassLoader);
+
+        assertEquals(clazz1, clazz2);
+    }
+
+    @Test
+    public void testRegisterInvalidResource() throws Exception {
+        UserResourceManager userResourceManager = createResourceManager(new URL[0]);
+
+        // test register non-exist file
+        String uri = temporaryFolder.getRoot().getPath() + Path.SEPARATOR + "test-file";
+        try {
+            userResourceManager.registerResource(new ResourceUri(ResourceType.FILE, uri));
+            fail("Should fail.");
+        } catch (IllegalArgumentException e) {
+            assertThat(e)
+                    .satisfies(
+                            matching(
+                                    containsMessage(
+                                            String.format("Resource [%s] not found.", uri))));
+        }
+
+        // test register directory for jar resource
+        uri = temporaryFolder.newFolder("test-jar-dir").getPath();
+        try {
+            userResourceManager.registerResource(new ResourceUri(ResourceType.JAR, uri));
+            fail("Should fail.");
+        } catch (IllegalArgumentException e) {
+            assertThat(e)
+                    .satisfies(
+                            matching(
+                                    containsMessage(
+                                            String.format(
+                                                    "Directory [%s] is not allowed for registering jar resource.",
+                                                    uri))));
+        }
+    }
+
+    @Test
+    public void testDownloadResource() throws Exception {
+        Path srcPath = new Path(udfJar.getPath());
+        UserResourceManager userResourceManager = createResourceManager(new URL[0]);
+
+        // test download resource to local path
+        URL localUrl = userResourceManager.downloadResource(srcPath);

Review Comment:
   In the future (when the FLIP is finished), we should add an e2e test for remote resources (e.g. s3, oss). 



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