Skip to main content
Version: 1.x

Hdfs

Output plugin : Hdfs​

Description​

Write Rows to HDFS.

Options​

nametyperequireddefault value
optionsobjectno-
partition_byarrayno-
pathstringyes-
path_time_formatstringnoyyyyMMddHHmmss
save_modestringnoerror
formatstringnojson
options [object]​

Custom parameters.

partition_by [array]​

Partition the data based on the fields.

path [string]​

File path on HDFS. Start with hdfs://.

path_time_format [string]​

If path contains time variables, such as xxxx-${now}, path_time_format can be used to specify the format of HDFS path, default is yyyy.MM.dd. The commonly used time formats are listed below:

SymbolDescription
yYear
MMonth
dDay of month
HHour in day (0-23)
mMinute in hour
sSecond in minute

The detailed time format syntax:Java SimpleDateFormat.

save_mode [string]​

Save mode, supports overwrite, append, ignore and error. The detail of save_mode see save-modes.

format [string]​

Output format, supports csv, json, parquet and text.

Example​

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