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