wuchong commented on a change in pull request #13275:
URL: https://github.com/apache/flink/pull/13275#discussion_r485350217



##########
File path: 
flink-connectors/flink-connector-hbase/src/main/java/org/apache/flink/connector/hbase/source/AbstractTableInputFormat.java
##########
@@ -186,24 +193,22 @@ public void close() throws IOException {
                        if (resultScanner != null) {
                                resultScanner.close();
                        }
-               } finally {
-                       resultScanner = null;
-               }
-       }
-
-       @Override
-       public void closeInputFormat() throws IOException {
-               try {
                        if (table != null) {
                                table.close();
                        }
+                       if (connection != null) {
+                               connection.close();
+                       }
                } finally {
+                       resultScanner = null;
                        table = null;
+                       connection = null;
                }
        }
 
        @Override
        public TableInputSplit[] createInputSplits(final int minNumSplits) 
throws IOException {
+               initTable();

Review comment:
       I think it is called on the 
[JobMaster](https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionJobVertex.java#L258),
 so we should use a local connection and close the connection in the method. 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to