建表后并不会产生 ro 和 rt 两个表:
spark-sql> create table hudi_mor_tbl (
> id int,
> name string,
> price double,
> ts bigint
> ) using hudi
> tblproperties (
> type = 'mor',
> primaryKey = 'id',
> preCombineField = 'ts'
> );
Time taken: 0.556 seconds
spark-sql> show tables;
hudi_mor_tbl
Time taken: 0.055 seconds, Fetched 1 row(s)
有数据写入表后,才会产生 ro 和 rt 表:
spark-sql> insert into hudi_mor_tbl select 1, 'a1_1', 20, 1001;
Time taken: 12.141 seconds
spark-sql> show tables;
hudi_mor_tbl
hudi_mor_tbl_ro
hudi_mor_tbl_rt
Time taken: 0.033 seconds, Fetched 3 row(s)
而对于 cow 表不存在 ro 和 rt 表之分:
spark-sql> create table hudi_cow_pt_tbl (
> id bigint,
> name string,
> ts bigint,
> dt string,
> hh string
> ) using hudi
> tblproperties (
> type = 'cow',
> primaryKey = 'id',
> preCombineField = 'ts'
> )
> partitioned by (dt, hh);
Time taken: 0.189 seconds
spark-sql> show tables;
hudi_cow_pt_tbl
hudi_mor_tbl
hudi_mor_tbl_ro
hudi_mor_tbl_rt
Time taken: 0.029 seconds, Fetched 4 row(s)
标签:rt,hudi,mor,tbl,Time,Hudi,ro
From: https://www.cnblogs.com/aquester/p/17406063.html