This section describes how to use Flume client to collect static logs from a local PC and save them to the /flume/test directory on HDFS.
By default, the cluster network environment is secure and the SSL authentication is not enabled during the data transmission process. For details about how to use the encryption mode, see Configuring the Encrypted Transmission. The configuration applies to scenarios where only the Flume is configured, for example, Spooldir Source+Memory Channel+HDFS Sink.
Use SpoolDir Source, Memory Channel, and HDFS Sink.
Parameter |
Description |
Example Value |
---|---|---|
Name |
The value must be unique and cannot be left blank. |
test |
spoolDir |
Specifies the directory where the file to be collected resides. This parameter cannot be left blank. The directory needs to exist and have the write, read, and execute permissions on the flume running user. |
/srv/BigData/hadoop/data1/zb |
trackerDir |
Specifies the path for storing the metadata of files collected by Flume. |
/srv/BigData/hadoop/data1/tracker |
batch-size |
Specifies the number of events that Flume sends in a batch. |
61200 |
hdfs.path |
Specifies the HDFS data write directory. This parameter cannot be left blank. |
hdfs://hacluster/flume/test |
hdfs.inUsePrefix |
Specifies the prefix of the file that is being written to HDFS. |
TMP_ |
hdfs.batchSize |
Specifies the maximum number of events that can be written to HDFS once. |
61200 |
hdfs.kerberosPrincipal |
Specifies the Kerberos authentication user, which is mandatory in security versions. This configuration is required only in security clusters. |
flume_hdfs |
hdfs.kerberosKeytab |
Specifies the keytab file path for Kerberos authentication, which is mandatory in security versions. This configuration is required only in security clusters. |
/opt/test/conf/user.keytab NOTE:
Obtain the user.keytab file from the Kerberos certificate file of the user flume_hdfs. In addition, ensure that the user who installs and runs the Flume client has the read and write permissions on the user.keytab file. |
hdfs.useLocalTimeStamp |
Specifies whether to use the local time. Possible values are true and false. |
true |
Upload the file exported in 2.d to the Flume client installation directory/fusioninsight-flume-Flume component version number/conf directory of the cluster