Apache Seatunnel-Sink plugin : Hdfs [Spark]

作者: Apache Seatunnel

输出数据到HDFS

Options

name type required default value
[options] options-object
[partition_by] partition_by-array
[path] path-string
[path_time_format] path_time_format-string
[save_mode] save_mode-string
[serializer] serializer-string
[common-options] common-options-string
options [object]

自定义参数

partition_by [array]

根据所选字段对数据进行分区

path [string]

输出文件路径,以 hdfs:// 开头

path_time_format [string]

path参数中的格式为xxxx-${now}时,path_time_format可以指定路径的时间格式,默认值为 yyyy.MM.dd。常用的时间格式列举如下:

Symbol Description
y Year
M Month
d Day of month
H Hour in day (0-23)
m Minute in hour
s Second in minute

详细的时间格式语法见Java SimpleDateFormat

save_mode [string]

存储模式,当前支持overwrite,append,ignore以及error。每个模式具体含义见save-modes

serializer [string]

序列化方法,当前支持csv、json、parquet、orc和text

common options [string]

Sink 插件通用参数,详情参照 [Sink Plugin]

Examples

hdfs {
    path = "hdfs:///var/logs-$"
    serializer = "json"
    path_time_format = "yyyy.MM.dd"
}

按天生成HDFS文件,例如logs-2018.02.12

文章列表

更多推荐

更多
这里什么都没有

近期文章

更多
文章目录

    推荐作者

    更多