You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "pengnengsong (Jira)" <ji...@apache.org> on 2020/05/25 12:36:00 UTC

[jira] [Updated] (FLINK-17924) HBase connector:we can write data to HBase table, but con`t read data from HBase

     [ https://issues.apache.org/jira/browse/FLINK-17924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

pengnengsong updated FLINK-17924:
---------------------------------
          Component/s: Connectors / HBase
    Affects Version/s: 1.10.0
          Description: 
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

EnviromentSettings streamSettings = EnviromentSetting.newInstance().useBlinkPlanner().inStreamingMode().build();

StreamTableEnviroment tEnv = StreamTableEnviroment.create(env, streamSettings);

CREATE TABLE source(
 rowkey INT,
 f1 ROW<col1 INT>,
 f2 ROW<col1 VARCHAR, col2 INT>
 )WITH(
 'connector.type' = 'hbase',
 'connector.version' = '1.4.3',
 'connector.table-name' = 'test_source:flink',
 'connector.zookeeper.quorum' = 'xxxx:2181',
 'connector.zookeeper.znode.parent' = '/test/hbase'
 )

SELECT * FROM source

 

In  HBaseRowInputformat.Java when execute the configure method, this.conf is always null. The default hbase configuration information is created, and the configuration parameters in with are not in effect.

private void connectToTable(){
 if(this.conf ==null)

{ this.conf = HBaseConfiguration.create(); }

...
 }

  was:
CREATE TABLE source(
	rowkey INT,
	f1 ROW<col1 INT>,
	f2 ROW<col1 VARCHAR, col2 INT>
)WITH(
  'connector.type' = 'hbase',
  'connector.version' = '1.4.3',
  'connector.table-name' = 'test_source:flink',
  'connector.zookeeper.quorum' = 'xxxx:2181',
  'connector.zookeeper.znode.parent' = '/test/hbase'
)

Look at the source code of the Hbase connector, execute the configure method of HBaseRowInputformat. Java, this.conf is always null. The default hbase configuration information is created, and the configuration parameters in with are not in effect.

private void connectToTable(){
      if(this.conf ==null){
        this.conf = HBaseConfiguration.create();
   }
     ...
}



> HBase connector:we can write data to HBase table, but con`t read data from HBase
> --------------------------------------------------------------------------------
>
>                 Key: FLINK-17924
>                 URL: https://issues.apache.org/jira/browse/FLINK-17924
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / HBase
>    Affects Versions: 1.10.0
>            Reporter: pengnengsong
>            Priority: Major
>
> StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
> EnviromentSettings streamSettings = EnviromentSetting.newInstance().useBlinkPlanner().inStreamingMode().build();
> StreamTableEnviroment tEnv = StreamTableEnviroment.create(env, streamSettings);
> CREATE TABLE source(
>  rowkey INT,
>  f1 ROW<col1 INT>,
>  f2 ROW<col1 VARCHAR, col2 INT>
>  )WITH(
>  'connector.type' = 'hbase',
>  'connector.version' = '1.4.3',
>  'connector.table-name' = 'test_source:flink',
>  'connector.zookeeper.quorum' = 'xxxx:2181',
>  'connector.zookeeper.znode.parent' = '/test/hbase'
>  )
> SELECT * FROM source
>  
> In  HBaseRowInputformat.Java when execute the configure method, this.conf is always null. The default hbase configuration information is created, and the configuration parameters in with are not in effect.
> private void connectToTable(){
>  if(this.conf ==null)
> { this.conf = HBaseConfiguration.create(); }
> ...
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)