MAPREDUCE服务 MRS-如何配置Flume定制脚本:已安装Flume客户端

时间:2024-10-22 09:17:14

已安装Flume客户端

  1. 在客户端flume-check.properties文件中配置client.per-check.shell,指向plugin.sh的绝对路径。

    例如Flume客户端安装路径为“/opt/FlumeClient”,则flume-check.properties文件所在目录为/opt/FlumeClient/fusioninsight-flume-1.9.0/conf,

    配置如下:

    client.per-check.shell=/opt/FlumeClient/fusioninsight-flume-1.9.0/plugins.s/plugin.sh

    plugins = com.huawei.flume.services.FlumePreTransmitService

    flume.check.default.interval = 15

  2. 配置plugin.conf,定义具体调用的脚本、相关参数。

    例如Flume客户端安装路径为“/opt/FlumeClient”,则plugin.conf配置文件所在目录为/opt/FlumeClient/fusioninsight-flume-1.9.0/conf,

    配置如下:

    RUN_PLUGIN="PLUGIN_LIST_1"

    LOG _TO_HDFS_PATH="/yxs"

    LOG_TO_HDFS_ENCODE_PATH="${LOG_TO_HDFS_PATH}/Flume_Encoded/"

    PLUGIN_LINK_DIR="/tmp/yxs1"

    PLUGIN_MV_TARGET_DIR="/tmp/yxs2"

    PLUGIN_SUFFIX="COMPLETED"

    PLUGIN_LIST_1="mv_complete.sh --linkdir ${PLUGIN_LINK_DIR} --mvtargetdir ${PLUGIN_MV_TARGET_DIR} --suffix ${PLUGIN_SUFFIX}"

  3. 在客户端安装路径bin目录执行以下命令,重启Flume客户端,例如“/opt/FlumeClient/fusioninsight-flume-1.9.0/bin”。

    ./flume-manage.sh restart

support.huaweicloud.com/cmpntguide-mrs/mrs_01_1597.html