Copilot commented on code in PR #9450:
URL: https://github.com/apache/seatunnel/pull/9450#discussion_r2153744353


##########
seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/reader/MultipleTableHiveSourceReader.java:
##########
@@ -124,6 +124,17 @@ public void open() throws Exception {
     @Override
     public void close() throws IOException {
         // do nothing
-        log.info("Closed the MultipleTableHiveSourceReader");
+        log.info("Close the MultipleTableHiveSourceReader and 
ReadStrategy(FileSystem and HiveConf)");

Review Comment:
   [nitpick] Consider adjusting the log message for consistent verb tense and 
clarity; for example, use 'Closing' instead of 'Close' to align with standard 
logging conventions.
   ```suggestion
           log.info("Closing the MultipleTableHiveSourceReader and 
ReadStrategy(FileSystem and HiveConf)");
   ```



##########
seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/reader/MultipleTableHiveSourceReader.java:
##########
@@ -124,6 +124,17 @@ public void open() throws Exception {
     @Override
     public void close() throws IOException {
         // do nothing
-        log.info("Closed the MultipleTableHiveSourceReader");
+        log.info("Close the MultipleTableHiveSourceReader and 
ReadStrategy(FileSystem and HiveConf)");
+        readStrategyMap.forEach(
+            (tablePath, readStrategy) -> {
+                try {
+                    readStrategy.close();

Review Comment:
   Consider aggregating exceptions from closing multiple read strategies rather 
than only logging each error, so that resource closure issues can be 
appropriately reported or handled.



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