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


##########
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:
   Updated.



##########
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:
   Updated



##########
eventmesh-connectors/eventmesh-connector-file/src/main/java/org/apache/eventmesh/connector/file/source/connector/FileSourceConnector.java:
##########
@@ -73,12 +95,28 @@ public String name() {
 
     @Override
     public void stop() {
-
+        try {
+            if (bufferedReader != null) {
+                bufferedReader.close();
+            }
+            inputStream.close();
+        } catch (Exception e) {

Review Comment:
   Updated



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