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_r203438579
  
    --- Diff: flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/TableInputFormat.java
---
    @@ -81,7 +85,9 @@ private HTable createTable() {
     		org.apache.hadoop.conf.Configuration hConf = HBaseConfiguration.create();
     
     		try {
    -			return new HTable(hConf, getTableName());
    +			Connection connection = ConnectionFactory.createConnection(hConf);
    +			Table table = connection.getTable(TableName.valueOf(getTableName()));
    +			return (HTable) table;
    --- End diff --
    
    I think we should release the connection when happens exception


---

Mime
View raw message