liunaijie commented on code in PR #5427:
URL: https://github.com/apache/seatunnel/pull/5427#discussion_r1325635020


##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java:
##########
@@ -153,15 +151,10 @@ public List<String> getFileNamesByPath(HadoopConf 
hadoopConf, String path) throw
                 }
             }
         }
-
-        if (fileNames.isEmpty()) {
-            throw new FileConnectorException(
-                    FileConnectorErrorCode.FILE_LIST_EMPTY,
-                    "The target file list is empty,"
-                            + "SeaTunnel will not be able to sync empty table, 
"
-                            + "please check the configuration parameters such 
as: [file_filter_pattern]");
+        if (this.fileNames.isEmpty()) {
+            log.error("The current directory is empty " + path);
+            this.fileNames.add(path);

Review Comment:
   looks the up-to-date code not add the path, just logger the error info. 
@ponyliuh 
   And we can't throw exception when size is empty. because if the table is 
empty, we still want it run well, just sync nothing not get an exception.
   
![image](https://github.com/apache/seatunnel/assets/28497357/705b1801-5d9a-437d-8984-f2a5affdb726)
   



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