Secondary Development Guide for Flume Third-Party Plug-ins

Scenario

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

This section applies to MRS 3.x or later.

Prerequisites

  • You have obtained the third-party JAR package.

  • You have installed Flume server or client.

Procedure

  1. Compress the self-developed code into a JAR package.

  2. Create a directory for the plug-in.

    1. Access the $FLUME_HOME/plugins.d path and run the following command to create a directory:

      mkdir thirdPlugin

      cd thirdPlugin

      mkdir lib libext native

      The command output is displayed as follows:

      image1

    2. Place the third-party JAR package in the $FLUME_HOME/plugins.d/thirdPlugin/lib directory. If the JAR package depends on other JAR packages, place the depended JAR packages to the $FLUME_HOME/ plugins.d/ thirdPlugin/libext directory, and place the local library files in $FLUME_HOME/ plugins.d/ thirdPlugin/native.

  3. Configure the properties.properties file in $FLUME_HOME/conf/.

    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.

    Note

    • $FLUME_HOME indicates the Flume installation path. Set this parameter based on the site requirements (server or client) when configuring third-party plug-ins.

    • thirdPlugin is the name of the third-party plugin.