Uploaded image for project: 'CDH (READ-ONLY)'
  1. CDH (READ-ONLY)
  2. DISTRO-444

flume configuration markdown for hostname is failing to interpolate

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Bug
    • Affects Version/s: CDH4.1.1
    • Fix Version/s: None
    • Component/s: Flume
    • Labels:
      None
    • Environment:
      Amazon EC2
      CentOS release 6.3 (Final)
      Linux use1c-hadoop-flume001 2.6.32-279.5.1.el6.x86_64 #1 SMP Tue Aug 14 23:54:45 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

      Description

      the %

      {host}

      variable is not being interpolated correctly. I end up with a directory named either the IPaddress of agent or "12-11-20"--whatever that means...

      [root@use1c-hadoop-datanode001 ~]# hdfs dfs -ls /user/flume/data/events
      Found 1 items
      drwxr-xr-x - flume flume 0 2012-11-20 16:08 /user/flume/data/events/10.114.102.92

      // from agent-config

      #interceptors
      agent1.sources.tailsource-1.interceptors = b a
      agent1.sources.tailsource-1.interceptors.b.type = host
      agent1.sources.tailsource-1.interceptors.b.hostHeader = hostname
      agent1.sources.tail.interceptors.b.useIP = false
      agent1.sources.tail.interceptors.b.preserveExisting = true
      agent1.sources.tailsource-1.interceptors.a.type = timestamp

      agent1.channels.channel1.type = memory
      agent1.channels.channel1.capacity = 1000
      agent1.channels.channel1.transactionCapactiy = 100

      1. Describe sink1
        agent1.sinks.sink1.channels = channel1
        agent1.sinks.sink1.type = hdfs
        agent1.sinks.sink1.hdfs.path = /user/flume/data/events/% {hostname}

        /%y-%m-%d/%H

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jplimack jake plimack
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: