lsyldliu commented on code in PR #20001:
URL: https://github.com/apache/flink/pull/20001#discussion_r916119867
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/ResourceManager.java:
##########
@@ -69,43 +70,67 @@ 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;
- }
-
- // here can check whether the resource path is valid
- Path path = new Path(resourceUri.getUri());
- // check resource firstly
- checkResource(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);
+ public void registerResource(List<ResourceUri> resourceUris) throws
IOException {
Review Comment:
When close the `ResourceManager`, we will delete the directory, so I think
we needn't this logic, it's a little later.
--
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]