<?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: nifi sync 2 different directories in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-sync-2-different-directories/m-p/178014#M58378</link>
    <description>&lt;P&gt;AFAIK, there is no current capability for this, as GetFile/ListFile detect existing files, and GetFile/FetchFile sometimes handle deletes (if they are the ones deleting them).  Perhaps a custom (hopefully shared with the Apache NiFi community?) processor called WatchFile would be prudent. It could implement the &lt;A target="_blank" href="https://docs.oracle.com/javase/tutorial/essential/io/notification.html"&gt;WatchService API&lt;/A&gt; and generate (perhaps empty) flow files whose attributes reflect the file and its change in state.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2017 07:52:08 GMT</pubDate>
    <dc:creator>mburgess</dc:creator>
    <dc:date>2017-03-29T07:52:08Z</dc:date>
    <item>
      <title>nifi sync 2 different directories</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-sync-2-different-directories/m-p/178013#M58377</link>
      <description>&lt;P&gt;Hello There,&lt;/P&gt;&lt;P&gt;I have a simple workflow that looks like:&lt;/P&gt;&lt;P&gt;ListFile -&amp;gt; FetchFile -&amp;gt; PutHDFS&lt;/P&gt;&lt;P&gt;This workflow is used to update a directory on HDFS based on a windows share directory.&lt;/P&gt;&lt;P&gt;ListFile seems to get the job done when a new file is added or an existing file is updated, but it doesn't seem to handle the case where a file is removed from the source directory. Is there an existing processor that does this? Or is this something that I have to implement a custom processor for? I.e. I'm trying to delete files on HDFS based on what gets deleted in a windows share directory. Is there something that already does this or do I need to write a custom processor?&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 05:25:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-sync-2-different-directories/m-p/178013#M58377</guid>
      <dc:creator>yifeng_li</dc:creator>
      <dc:date>2017-03-29T05:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: nifi sync 2 different directories</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-sync-2-different-directories/m-p/178014#M58378</link>
      <description>&lt;P&gt;AFAIK, there is no current capability for this, as GetFile/ListFile detect existing files, and GetFile/FetchFile sometimes handle deletes (if they are the ones deleting them).  Perhaps a custom (hopefully shared with the Apache NiFi community?) processor called WatchFile would be prudent. It could implement the &lt;A target="_blank" href="https://docs.oracle.com/javase/tutorial/essential/io/notification.html"&gt;WatchService API&lt;/A&gt; and generate (perhaps empty) flow files whose attributes reflect the file and its change in state.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 07:52:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-sync-2-different-directories/m-p/178014#M58378</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2017-03-29T07:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: nifi sync 2 different directories</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-sync-2-different-directories/m-p/178015#M58379</link>
      <description>&lt;P&gt;Thanks for the advice Matt. Let me preface this by saying I'm completely new to Nifi. After looking at the source code for ListFile processor, I've got some questions about implementing WatchFile:&lt;/P&gt;&lt;P&gt;Would it be ideal if I were to do something similar to ListFile? I.E. I would extend AbstractListProcessor&amp;lt;FileInfo&amp;gt; instead of AbstractProcessor itself. I would implement my own version of performListing with the WatchServiceAPI along with the other functions from AbstractListProcessor that I would need to override, and let the AbstractListProcessor generate the Flow Files?&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 07:28:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-sync-2-different-directories/m-p/178015#M58379</guid>
      <dc:creator>yifeng_li</dc:creator>
      <dc:date>2017-03-30T07:28:40Z</dc:date>
    </item>
  </channel>
</rss>

