fluent-plugin-webhdfs
fluent-plugin-webhdfs copied to clipboard
根据日志中的字段指定hdfs上的路径
您好,请问怎么根据日志中的某个字段指定hdfs上的路径path
Write an issue in english.
Hello, How to use the log field to specify the hdfs path
It's impossible right now, but will be supported in future version with Fluentd v0.14.
you may use rewrite_tag_filter to rewrite the tag, and load hdfs path from tag
thank you, let me try.
How analytical chunk? how string into chunk?
chunk.msgpack_each do |tag, time, record| my_domain = record['domain'] end def format(tag, time, record) [tag, time, record].to_msgpack end
But the data stored in hdfs is garbled
compress_context(chunk) do |data| send_data(hdfs_path, data) end