<?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 Re: Flume: how to create (HDFS) target dir from ingested filename? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Flume-how-to-create-HDFS-target-dir-from-ingested-filename/m-p/4373#M691</link>
    <description>You could do (a) with the SpoolingDirectory source, as it allows for the event to carry the original filename (via a custom sink wrapper that looks for it) but doing (b) doesn't fit in with the event delivery mechanism of Flume and AFAICT, its not possible to do directly.</description>
    <pubDate>Sun, 29 Dec 2013 04:56:33 GMT</pubDate>
    <dc:creator>Harsh J</dc:creator>
    <dc:date>2013-12-29T04:56:33Z</dc:date>
    <item>
      <title>Flume: how to create (HDFS) target dir from ingested filename?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Flume-how-to-create-HDFS-target-dir-from-ingested-filename/m-p/3939#M690</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm curious if it is possible to solve this problem with Flume:&lt;/P&gt;&lt;P&gt;I have a SpoolingDir source where files with names in the format "prefixA.prefixB.importantPart.csv" will be moved to&lt;/P&gt;&lt;P&gt;The files shall be put into HDFS (with its original filename) into the corresponding directory "hdfs://basepath/importantPart/", so that the absolute path for a file is "hdfs://basepath/importantPart/prefixA.prefixB.importantPart.csv".&lt;/P&gt;&lt;P&gt;a) how can I parse the filename to extract "importantPart" to create the output HDFS path accordingly, or is this possible at all with Flume?&lt;/P&gt;&lt;P&gt;b) how to preserve the original filename so that the HDFS sink writes to the file with the same filename, again, possible at all?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I know, Flume isn't the right tool for such "file copy" approaches it's working on events, but nevertheless it is interesting if it is possible or if someone did this already.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any hint highly appreciated....&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 08:51:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Flume-how-to-create-HDFS-target-dir-from-ingested-filename/m-p/3939#M690</guid>
      <dc:creator>geko</dc:creator>
      <dc:date>2022-09-16T08:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Flume: how to create (HDFS) target dir from ingested filename?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Flume-how-to-create-HDFS-target-dir-from-ingested-filename/m-p/4373#M691</link>
      <description>You could do (a) with the SpoolingDirectory source, as it allows for the event to carry the original filename (via a custom sink wrapper that looks for it) but doing (b) doesn't fit in with the event delivery mechanism of Flume and AFAICT, its not possible to do directly.</description>
      <pubDate>Sun, 29 Dec 2013 04:56:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Flume-how-to-create-HDFS-target-dir-from-ingested-filename/m-p/4373#M691</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2013-12-29T04:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Flume: how to create (HDFS) target dir from ingested filename?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Flume-how-to-create-HDFS-target-dir-from-ingested-filename/m-p/4597#M692</link>
      <description>Hi,&lt;BR /&gt;many thanks for your explanation. I'll check out the custom sink wrapper stuff...</description>
      <pubDate>Mon, 06 Jan 2014 09:30:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Flume-how-to-create-HDFS-target-dir-from-ingested-filename/m-p/4597#M692</guid>
      <dc:creator>geko</dc:creator>
      <dc:date>2014-01-06T09:30:36Z</dc:date>
    </item>
  </channel>
</rss>

