Help Center> MapReduce Service> Component Operation Guide (LTS)> Using Flume> Secondary Development Guide for Flume Third-Party Plug-ins
Updated on 2023-08-15 GMT+08:00

Secondary Development Guide for Flume Third-Party Plug-ins

Scenario

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

Prerequisites

  • You have obtained the third-party JAR package.
  • The Flume server or client has been installed, for example, in the /opt/flumeclient directory.

Procedure

  1. Compress the self-developed code into a JAR package.
  2. 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.

  3. 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 Non-Encrypted Transmission and Encrypted Transmission.