pandaapo commented on code in PR #4650:
URL: https://github.com/apache/eventmesh/pull/4650#discussion_r1427535850


##########
eventmesh-connectors/eventmesh-connector-file/src/main/java/org/apache/eventmesh/connector/file/source/config/FileSourceConfig.java:
##########
@@ -19,12 +19,42 @@
 
 import org.apache.eventmesh.openconnect.api.config.SourceConfig;
 
+import java.io.File;
+import java.util.Calendar;
+import java.util.Locale;
+
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import lombok.extern.slf4j.Slf4j;
 
 @Data
+@Slf4j
 @EqualsAndHashCode(callSuper = true)
 public class FileSourceConfig extends SourceConfig {
 
     public SourceConnectorConfig connectorConfig;
+    private String fileName;
+    private String filePath;

Review Comment:
   Can fileName and filePath be directly obtained from the configuration file 
source-config.yml? Then, it will not restrict users from using specific file 
name and file path.
   
   In addition, many configuration items in the configuration file 
source-config.yml are not used by you. Could you directly remove the 
configuration items that you do not need?



##########
eventmesh-connectors/eventmesh-connector-file/src/main/java/org/apache/eventmesh/connector/file/source/connector/FileSourceConnector.java:
##########
@@ -36,6 +47,11 @@ public class FileSourceConnector implements Source {
 
     private OffsetStorageReader offsetStorageReader;
 
+    private String filePath;
+    private String fileName;
+    private InputStream inputStream;

Review Comment:
   After having `BufferedReader` variable, it seems unnecessary to declare 
`InputStream` variable now.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to