flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yanghua <...@git.apache.org>
Subject [GitHub] flink pull request #6365: [FLINK-9849] [hbase] Hbase upgrade to 2.0.1
Date Wed, 18 Jul 2018 16:18:09 GMT
Github user yanghua commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6365#discussion_r203440989
  
    --- Diff: flink-connectors/flink-hbase/src/test/java/org/apache/flink/addons/hbase/example/HBaseWriteStreamExample.java
---
    @@ -87,22 +90,22 @@ public void configure(Configuration parameters) {
     
     		@Override
     		public void open(int taskNumber, int numTasks) throws IOException {
    -			table = new HTable(conf, "flinkExample");
    +			Connection connection = ConnectionFactory.createConnection(conf);
    --- End diff --
    
    Based on [HBase Connection JavaDoc](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Connection.html#close--)
it seems the caller should invoke `close` method to release resource? so I suggest we should
close connection in udf's `close` method.


---

Mime
View raw message