Source in Flume

Source: Internet
Author: User

Spooling Directory Source:

The following 2 sets of parameters are explained:

Fileheader and Fileheaderkey:
Fileheader is a Boolean value that can be configured to TRUE or false to indicate whether the file name is added to the header of the event in the encapsulated event after the Flume has read the data.
Fileheaderkey indicates that if there is a header in the event (when Fileheader is configured to True), the header stores the file name in the <key,value>, what is the key name. For example, if you define Fileheaderkey as file, the header will have a file=/root/when you read the contents of the filename/root/a.txt. A.txt such a record, if Fileheaderkey is defined as name, this header will be the form of name=/root/a.txt.

Basenameheader and Basenameheaderkey:
The relationship between the two configurations is similar to that of Fileheader and Fileheaderkey, except that basename returns the name of the file (without the directory part). For example above, if you define Basenameheader as the header of the event True,basenameheaderkey is File,flume, there will be file=a.txt information like this.

Source in Flume

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.