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 数据源
   
  
  
   
    更新 CDC(Change-Data-Capture)
   
  
  
   注意 CDC 仍是实验性功能,仅支持 COW 表,CDC 查询尚不支持 MOR 表。
  
  
   
    新增元数据管理服务 Metaserver
   
  
  
   hoodie.metaserver.enabled=true
   
   hoodie.metaserver.uris=thrift://
   
    :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(实验性的)
  
  
   是否启用控制乐观并发控制 OCC(Optimistic Concurrency Control),默认为 false,即关闭 OCC,这时不能有多写入者。