网站建设支付安全,辽宁建设工程信息网新入口,如何搜索网站的内容,微信支付公司网站使用注意 从 0.10.0 版本开始#xff0c;primaryKey 为必须的#xff0c;不再支持没有主键的表。 primaryKey、primaryKey 和 type 均大小写敏感。 对于 MOR 类型的表#xff0c;preCombineField 为必须的。 当设置 primaryKey、primaryKey 或 type 等 hudi 配置时#…使用注意 从 0.10.0 版本开始primaryKey 为必须的不再支持没有主键的表。 primaryKey、primaryKey 和 type 均大小写敏感。 对于 MOR 类型的表preCombineField 为必须的。 当设置 primaryKey、primaryKey 或 type 等 hudi 配置时tblproperties 优先于 options 。 使用 Spark SQL 创建 hudi 表时默认设置hoodie.datasource.write.hive_style_partitioningtrue 。
Hudi 0.13.0 新功能
2023/2/22 日发布https://hudi.apache.org/releases/release-0.13.0/。
PartialUpdateAvroPayload
支持更新部分字段的 Payload继承 OverwriteNonDefaultsWithLatestAvroPayload。 OverwriteNonDefaultsWithLatestAvroPayload 继承 OverwriteWithLatestAvroPayload重写了 combineAndGetUpdateValue新数据会按字段跟 schema 中的 default value 进行比较如果 default value 非 null 且与新数据中的值不同时则在新数据中更新该字段。由于通常 schema 定义的 default value 都是 null在此场景下可以实现更新非 null 字段的功能即如果一条数据有五个字段使用此 Payload 更新三个字段时不会影响另外两个字段原来的值。
https://github.com/apache/hudi/blob/master/hudi-common/src/main/java/org/apache/hudi/common/model/PartialUpdateAvroPayload.java https://github.com/apache/hudi/blob/master/hudi-common/src/main/java/org/apache/hudi/common/model/OverwriteNonDefaultsWithLatestAvroPayload.java
一致性哈希索引Consistent Hashing Index
set hoodie.index.bucket.engine‘CONSISTENT_HASHING’
多客户端写入的早期冲突检测OCC
set hoodie.write.concurrency.early.conflict.detection.enable‘true’ 支持 支持 Flink 1.16 支持 Pulsar 数据源 更新 CDCChange-Data-Capture
注意 CDC 仍是实验性功能仅支持 COW 表CDC 查询尚不支持 MOR 表。
新增元数据管理服务 Metaserver
hoodie.metaserver.enabledtrue hoodie.metaserver.uristhrift://:9090
注意目前为实验性功能。
常用表属性
hoodie.payload.ordering.field
在合并和写入存储之前对相同主键进行排序的字段名默认为 ts。
hoodie.datasource.write.hive_style_partitioning
是否使用 hive 风格的表分区。使用 Spark SQL 创建的 hudi 表默认为 true使用 Flink SQL 创建的 hudi 表默认为 false 。
hoodie.sql.insert.mode
设置数据插入模式有三种取值默认为 upsert
upsert
更新插入模式是否更新依赖 tblproperties 的 preCombineField 指定的值一般为 BIGINT 类型的时间戳值亦即 hoodie.datasource.write.precombine.field 的值。
strict
严格模式为纯 insert 模式但如果相同 tblproperties 的 primaryKey 已经存在亦即 hoodie.datasource.write.recordkey.field 指定的已存在则不执行插入否则插入。
non-strict
非严格模式也为纯 insert 模式不会关系 primaryKey 是否已经存在允许重复。
hoodie.datasource.write.operation
设置写操作有三种取值默认为 upsert
upsert
更新插入。
insert
普通插入。
bulkinsert
批量插入。如果设置为 bulkinsert还得同时将 hoodie.sql.bulk.insert.enable 值设置为 true注意 hoodie.sql.bulk.insert.enable 值默认为 false 。
hoodie.index.type
设置索引类型。对 spark 引擎默认为 SIMPLE对 flink 引擎默认为 INMEMORY。可选取值有BLOOM | GLOBAL_BLOOM |SIMPLE | GLOBAL_SIMPLE | INMEMORY | HBASE | BUCKET。
hoodie.bucket.index.num.buckets
设置每个分区的桶数注意表创建后不能修改仅当 hoodie.index.type 值为 BUCKET 时有效。
hoodie.index.bucket.engine
设置桶索引引擎类型默认为 SIMPLE可选的包括SIMPLE | CONSISTENT_HASHING。SIMPLE 为固定个数的桶CONSISTENT_HASHING 支持动态调整桶数。
hoodie.simple.index.parallelism
仅适用 hoodie.index.type 为 SIMPLE。用于指定索引查询并行度默认为 100同 Spark Shuffle 相关。
hoodie.write.concurrency.early.conflict.detection.enable
版本0.13.0实验性的
是否启用控制乐观并发控制 OCCOptimistic Concurrency Control默认为 false即关闭 OCC这时不能有多写入者。