Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-3361

Environment variables are not substituted/resolved if agent is configured via ZooKeeper

    XMLWordPrintableJSON

Details

    Description

      Environment variables are not substituted/resolved during agent (re-)configuration if agent is configured via ZooKeeper.

      Steps to replicate the issue
      1) Create a znode having agent conf in the ZooKeeper path /flume/a1 . Relevant part of the conf is shown below

      cia.sources = accessLog
      cia.channels = channel
      cia.sinks = kafka
      cia.sources.accessLog.type = com.xyz.agent.LogSource
      cia.sources.accessLog.cid = ${CUSTOMER_ID}

       

      2) Add environment variable in conf/flume-env.sh as shown below

      export CUSTOMER_ID="AB123"

       

      3) Start the agent
      ./flume-ng agent -n a1 -c ../conf -z localhost:2182 -p /flume -DpropertiesImplementation=org.apache.flume.node.EnvVarResolverProperties

       

      Attachments

        1. FLUME-3361
          2 kB
          Avinash Kumar

        Issue Links

          Activity

            People

              Unassigned Unassigned
              avinashk07 Avinash Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 10h
                  10h
                  Remaining:
                  Time Spent - 1h 10m Remaining Estimate - 8h 50m
                  8h 50m
                  Logged:
                  Time Spent - 1h 10m Remaining Estimate - 8h 50m
                  1h 10m