Updated on 2024-10-24 GMT+08:00

How Do I Develop a Third-Party Flume Plug-in

This section describes how to perform secondary development for third-party plug-ins.

This section applies to MRS 3.x or later.

  1. Compress the self-developed code into a JAR package.
  2. Install the Flume server or client, for example, in the /opt/flumeclient directory.
  3. Create a directory for the plug-in.

    1. Go to Flume client installation directory/fusionInsight-flume-*/plugins.d and run the following command to create a directory. The directory name can be changed based on the site requirements.

      cd /opt/flumeclient/fusioninsight-flume-1.9.0/plugins.d

      mkdir thirdPlugin

      cd thirdPlugin

      mkdir lib libext native

      The command output is displayed as follows:

    2. Place the third-party JAR package in Flume client installation directory/fusionInsight-flume-*/plugins.d/thirdPlugin/lib. If the JAR package depends on other JAR packages, place the dependent JAR packages in Flume client installation directory/fusionInsight-flume-*/plugins.d/thirdPlugin/libext. Stores local library files in Flume client installation directory/fusionInsight-flume-*/plugins.d/thirdPlugin/native.

  4. Configure the Flume client installation directory/fusionInsight-flume-*/conf/properties.properties file.

    For details about how to set parameters in the properties.properties file, see the parameter list in the properties.properties file in the corresponding typical scenario Configuring a Non-Encrypted Flume Data Collection Task and Configuring an Encrypted Flume Data Collection Task.