Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.12.0
-
None
-
None
-
Flink 1.12.0 on Yarn
HBase1.4
Description
Data flow direction is described below:
Source:Mysql
Sink:HBase
Parallelism:1
------------------Code Example One Using Left Join ------------------
– Mysql Source ,Total Records:4829
create table user(
user_id string,
user_name string,
primary key(user_id) not enforced
)with(
'connector' = 'mysql-cdc',
'hostname' = 'localhost',
'port' = '3308',
'username' = 'user_name',
'password' = '******',
'database-name' = 'database_name',
'table-name' = 'table_name',
'debezium.event.processing.failure.handling.mode' = 'warn',
'debezium.snapshot.locking.mode' = 'none'
);
create table user_profile(
user_id string,
age int,
primary key(user_id) not enforced
)with(
'connector' = 'mysql-cdc',
'hostname' = 'localhost',
'port' = '3308',
'username' = 'user_name',
'password' = '******',
'database-name' = 'database_name',
'table-name' = 'table_name',
'debezium.event.processing.failure.handling.mode' = 'warn',
'debezium.snapshot.locking.mode' = 'none'
);
– HBase sink ;Total Record:4826
create table real_dwd_user_info_to_hbase(
rowkey string,
f ROW(user_name string,age int)
)with(
'connector' = 'hbase-1.4',
'table-name' = 'table_name',
'zookeeper.quorum' = 'zk',
'zookeeper.znode.parent' = '/hbase'
);
insert into real_dwd_user_info_to_hbase
select
u.user_id,
row(u.user_name,up.age) as
from user u
left join user_profile up
on u.user_id = up.user_id
where u.user_id<1000000
;
---------Code Example Two Using Left Join And Specify some key--------
insert into real_dwd_user_info_to_hbase
select
u.user_id,
row(u.user_name,up.age) as
from user u
left join user_profile up
on u.user_id = up.user_id
where u.user_id=0
-------------------------------------------------------------------------------
I printed the same code logic results, I can find that the specified key has three results of " + i -d + i", but in HBase is still not find the key