LadyForest commented on code in PR #22818:
URL: https://github.com/apache/flink/pull/22818#discussion_r1236679027


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/ResourceManager.java:
##########
@@ -203,54 +193,75 @@ public void close() throws IOException {
         }
     }
 
-    private void checkJarResources(List<ResourceUri> resourceUris) throws 
IOException {
-        // only support register jar resource
-        if (resourceUris.stream()
-                .anyMatch(resourceUri -> 
!ResourceType.JAR.equals(resourceUri.getResourceType()))) {
-            throw new ValidationException(
-                    String.format(
-                            "Only support to register jar resource, resource 
info:\n %s.",
-                            resourceUris.stream()
-                                    .map(ResourceUri::getUri)
-                                    .collect(Collectors.joining(",\n"))));
-        }
+    /** Check whether the {@link Path} exists. */
+    public boolean exists(Path filePath) throws IOException {
+        return filePath.getFileSystem().exists(filePath);
+    }
 
-        for (ResourceUri resourceUri : resourceUris) {
-            checkJarPath(new Path(resourceUri.getUri()));
+    /**
+     * Synchronize a file resource identified by the given {@link ResourceUri} 
with a local copy

Review Comment:
   > The path passed to resourceGenerator will be a local path received from 
the given {@link ResourceUri}.
   
   I think this description is not so accurate because if the given resource 
URI is `hdfs://foo/bar/plan.json`, then the local path passes to the resource 
generator should be `file://root-dir-forresource-manager/plan-uuid.json`



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