- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
NiFi PutFile processor: What directory to use? Nothing getting written to the directory?
- Labels:
-
Apache NiFi
Created ‎04-29-2018 08:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using NiFi 1.4.0 and using it with Chrome Version 65.0.3325.181 on a Win 10 box. I have a PutFile process and I am looking to write date to an output file on my local hard drive, like c:\data. The process works and I have c:\data in the Directory field, but I am not getting data written c:\data. The folder is empty, and not sure what else I can do. Can you help?
Thanks,
Paul
Created ‎04-29-2018 09:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use cmd terminal to go to data directory and mention the full path in directory value.
You need to mention path as below if you want to see those files in your data directory
C:\Users\<username>\Data
-
Go to cd c:\Data directory using command prompt(cmd) to check the already written files from NiFi
Example:-
If i want to write any file from NiFi to Downloads directory i need to mention below path in PutFile directory value
C:\Users\Shu\Downloads
if i use C:\Downloads we are writing the file into C:\Downloads not to C:\Users\Shu\Downloads, use cmd terminal(cd C:\Downloads) to see the files.
Created ‎04-29-2018 09:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no data written to c:\data. Is it a permission issue? There are 10.1 MB in, but 0 bytes out. Could there be something wrong with the PutFile settings? For example:
These are both checked in the Settings tab:
- Automatically Terminate Relationships
- failure Files that could not be written to the output directory for some reason are transferred to this relationship
- success Files that have been successfully written to the output directory are transferred to this relationship
Created on ‎04-29-2018 10:51 PM - edited ‎08-17-2019 06:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check once the permissions because there needs to be 10.1 MB in and also Out.
For debug purpose use funnel and connect success and failure relationships from PutFile processor.
Sample Flow:
Check where the files are routing to success or failure relationships, if the files are routing to failure relation then go to nifi-app.log to find the root cause.
Created ‎04-29-2018 11:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting, the success route has 9 in the queue now and 1.45 MB. Nothing going the failure route. Is there other configuration need for the funnel?
Created on ‎04-30-2018 12:01 AM - edited ‎08-17-2019 06:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Funnel is just for testing out where the flowfiles are routing to i.e is they are going to Success or Failure relationship, there is no other configs needed for funnel.
Now 9 flowfiles are routed to Success relationship(i.e no permission issues encountered), now check the files in the directory(c:\data).
If you are still not able to see the files in the directory share PutFile processor configs and list of files in data directory using ui (or) cmd screenshots.
Created ‎04-29-2018 11:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Where would the nifi-app.log be located? I am a Win 10 desktop (client) using NiFi with Chrome. I don't have access to the server. Where would these be on my desktop?
Created on ‎05-01-2018 01:13 AM - edited ‎08-17-2019 06:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Shu, do you have other ideas on how to get the PutFile processor to write results to a log file? I am still not seeing files written to any path. I don't have access to the web server and NiFi is not installed on my Win 10 box. I am using NiFi via Chrome.
Created ‎05-01-2018 03:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I turned on DEBUG and checked the bulletin board and I get this:
3:27:42 UTC INFO 1967bc4d-0163-1000-1af5-b40c46be92b6
PutFile[id=1967bc4d-0163-1000-1af5-b40c46be92b6] Produced copy of StandardFlowFileRecord[uuid=58d18018-a864-4c12-a98d-498bbf8d19d1,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1525145201278-982, container=default, section=982], offset=336986, length=168493],offset=0,name=3706261132832753,size=168493] at location c:/test/3706261132832753
I made sure the path has full control on c:\test. Still, there are no files being written to c:\test. I even switch around the / to \ in the path.
Created ‎05-02-2018 02:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Shu, Does NiFi support writing the files on C:\ for Win 10 when using Chrome and you are using the PutFile processor? Is there a bug with NiFi? I am running out of options to try to get this working. Thanks for your help.
