Hudi版本:0.8.0

Source参数

参数名 必填 默认值 类型 说明
path string hudi表路径
partition.default.name _DEFAULT_PARTITION_ string 如果动态分区列的值为空或null时的默认分区名
read.tasks 4 int 读任务的并行度
read.avro-schema.path Avro schema文件路径,用例反序列化
read.avro-schema Avro schema字符串,用例反序列化
hoodie.datasource.query.type snapshot string 读取类型,取值范围[snapshot, read_optimized, incremental]
hoodie.datasource.merge.type payload_combine string 当表类型为Merge On Read,并且读取类型为snapshot时选填,取值范围:[skip_merge, payload_combine],skip_merge:读取基础文件加上日志文件,payload_combine:读取基础文件的所有记录,对于每条记录去日志文件中查找是否存在,如果存在合并key相同的距离,然后读取日志文件
hoodie.datasource.hive_style_partition false bool 是否使用和Hive一样的分区形式
read.utc-timezone true bool 是否使用UTC时区,否则使用本地时区
read.streaming.enabled false bool 是否以流的形式读取
read.streaming.check-interval 60 int 以流方式读取时的检测间隔
read.streaming.start-commit string 从那个提交时间点开始读取,提交时间格式:‘yyyyMMddHHmmss’,默认从最近一次提交开始读

Sink参数

参数名 必填 默认值 类型 说明
path string hudi表路径
hoodie.table.name 文档没有 string 注册到Hive元数据的表名
table.type COPY_ON_WRITE string 表的类型,取值范围:[COPY_ON_WRITE,MERGE_ON_READ ],不区分大小写
write.operation upsert string 写入操作,暂时看只有upsert,应该还有insert
write.precombine.field ts string 预合并字段,当2条记录key相同时,通过Object.compareTo方法进行比较,保留结果比较大的那个
write.payload.class org.apache.hudi .common.model .Overwrite WithLatest AvroPayload string Payload class used. Override this, if you like to roll your own merge logic, when upserting/inserting. This will render any value set for the option in-effective
write.insert.drop.duplicates 否/文档没有 false bool 是否删除重复记录
write.retry.times 否/文档没有 3 int 重试次数
write.retry.interval.ms 否/文档没有 2000 long 重试间隔
write.ignore.failed true bool 是否忽略异常
hoodie.datasource .write.recordkey.field uuid string Record key field. Value to be used as the recordKey component of HoodieKey. "Actual value will be obtained by invoking .toString() on the field value. Nested fields can be specified using the dot notation eg: a.b.c
hoodie.datasource.write .partitionpath.field 否/文档没有 partition-path string Partition path field. Value to be used at the partitionPath component of HoodieKey. Actual value obtained by invoking .toString()
hoodie.datasource.write .keygenerator.class org.apache .hudi.keygen .SimpleAvro KeyGenerator 生成key的类,从输入记录中提取key
write.tasks 4 int 写任务并行度
write.batch.size.MB 128 double 写缓冲大小

表类型是MERGE_ON_READ时可用Compact参数

参数名 必填 默认值 类型 说明
compaction.async.enabled default true for MOR write bool
compaction.trigger.strategy num_commits string
compaction.delta_commits 5 int
compaction.delta_seconds 3600 int