This section describes how to use environment variables in the properties.properties configuration file.
The Flume service is running properly and the Flume client has been installed.
cd Flume client installation directory/fusioninsight-flume-Flume component version/conf
export Variable name=Variable value
JAVA_OPTS="-Xms2G -Xmx4G -XX:CMSFullGCsBeforeCompaction=1 -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -DpropertiesImplementation=org.apache.flume.node.EnvVarResolverProperties" export TAILDIR_PATH=/tmp/flumetest/201907/20190703/1/.*log.*
Do not restart the Flume service on FusionInsight Manager after flume-env.sh takes effect on the server. Otherwise, the user-defined environment variables will lost. You only need to restart the corresponding instances on FusionInsight Manager.
client.sources.s1.type = TAILDIR client.sources.s1.filegroups = f1 client.sources.s1.filegroups.f1 = ${TAILDIR_PATH} client.sources.s1.positionFile = /tmp/flumetest/201907/20190703/1/taildir_position.json client.sources.s1.channels = c1