<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Can we use variable hostname for flume sink configuration inside flume config file? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-we-use-variable-hostname-for-flume-sink-configuration/m-p/94840#M8120</link>
    <description>&lt;P&gt;Given a hfds sink configuration :&lt;/P&gt;&lt;PRE&gt;ale.sinks.sink1.hdfs.path = hdfs://ham-dal-0001.corp.wayport.net:8020/prod/hadoop/smallsite/flume_ingest_ale2_hak_3/station/%Y/%m/%d/%H&lt;/PRE&gt;&lt;P&gt;The question is that can we use {variable hostname}  in flume.conf file. For example:&lt;/P&gt;&lt;PRE&gt;ale.sinks.sink1.hdfs.path = hdfs://ham-dal-0001.corp.wayport.net:8020/prod/hadoop/smallsite/{variable hostname}/station/%Y/%m/%d/%H 						
&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Oct 2015 05:03:49 GMT</pubDate>
    <dc:creator>vjiang</dc:creator>
    <dc:date>2015-10-05T05:03:49Z</dc:date>
    <item>
      <title>Can we use variable hostname for flume sink configuration inside flume config file?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-we-use-variable-hostname-for-flume-sink-configuration/m-p/94840#M8120</link>
      <description>&lt;P&gt;Given a hfds sink configuration :&lt;/P&gt;&lt;PRE&gt;ale.sinks.sink1.hdfs.path = hdfs://ham-dal-0001.corp.wayport.net:8020/prod/hadoop/smallsite/flume_ingest_ale2_hak_3/station/%Y/%m/%d/%H&lt;/PRE&gt;&lt;P&gt;The question is that can we use {variable hostname}  in flume.conf file. For example:&lt;/P&gt;&lt;PRE&gt;ale.sinks.sink1.hdfs.path = hdfs://ham-dal-0001.corp.wayport.net:8020/prod/hadoop/smallsite/{variable hostname}/station/%Y/%m/%d/%H 						
&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 05:03:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-we-use-variable-hostname-for-flume-sink-configuration/m-p/94840#M8120</guid>
      <dc:creator>vjiang</dc:creator>
      <dc:date>2015-10-05T05:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use variable hostname for flume sink configuration inside flume config file?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-we-use-variable-hostname-for-flume-sink-configuration/m-p/94841#M8121</link>
      <description>&lt;P&gt;Flume provides a &lt;A href="https://flume.apache.org/FlumeUserGuide.html#host-interceptor"&gt;Host interceptor&lt;/A&gt; that will inserts a header with key host or a configured key whose value is the hostname or IP address of the host, based on configuration. If you want to set a specific key value in the header you can use the &lt;A href="https://flume.apache.org/FlumeUserGuide.html#static-interceptor"&gt;Static Interceptor&lt;/A&gt;. You should be able to use %{host} in a latter sink. If the host name that you want to add is the hostname where the agent is running and its an HDFS sink you can use %{host} directly without the need of interceptor, see &lt;A href="https://flume.apache.org/FlumeUserGuide.html#hdfs-sink"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 05:22:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-we-use-variable-hostname-for-flume-sink-configuration/m-p/94841#M8121</guid>
      <dc:creator>deepesh1</dc:creator>
      <dc:date>2015-10-05T05:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use variable hostname for flume sink configuration inside flume config file?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-we-use-variable-hostname-for-flume-sink-configuration/m-p/94842#M8122</link>
      <description>&lt;P&gt;@deepesh@hortonworks.com&lt;/P&gt;&lt;P&gt;This is a good information. Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2015 05:28:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-we-use-variable-hostname-for-flume-sink-configuration/m-p/94842#M8122</guid>
      <dc:creator>vjiang</dc:creator>
      <dc:date>2015-10-06T05:28:23Z</dc:date>
    </item>
  </channel>
</rss>

