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


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/ResourceManager.java:
##########
@@ -296,4 +319,85 @@ private Path getResourceLocalPath(Path remotePath) {
         }
         return new Path(localResourceDir, fileNameWithUUID);
     }
+
+    private void checkResources(List<ResourceUri> resourceUris, ResourceType 
expectedType)
+            throws IOException {
+        // check the resource type
+        if (resourceUris.stream()
+                .anyMatch(resourceUri -> expectedType != 
resourceUri.getResourceType())) {
+            throw new ValidationException(
+                    String.format(
+                            "Only support to register %s resource, resource 
info:\n %s.",

Review Comment:
   This method is refactored to adapt both the `JAR` and `FILE` types. I agree 
with you that the message should be adapted as well.



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