Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NiFi - Issue while moving files and folders from one HDFS to another HDFS location

Highlighted

NiFi - Issue while moving files and folders from one HDFS to another HDFS location

New Contributor

I am trying to copy files and directories from one HDFS to another HDFS location using NIFI. It is working fine and copying directories and files in case of directory has some files but it is not copying empty directories.

My work flow is: ListHDFS > FetchHDFS > PutHDFS

Example:
/tmp/folder1/file1.txt
/tmp/folder2
/tmp/folder3/file2.txt
/tmp/folder4

folder2 and folder4 are not copied because of empty directories. Do i need to change any processor configurations? Could somebody please point me in the right direction? Thank you

2 REPLIES 2

Re: NiFi - Issue while moving files and folders from one HDFS to another HDFS location

FetchHDFS is to fetch a file, and PutHDFS is to write a file... so if there is a directory with no files then there is nothing to fetch or put.

Re: NiFi - Issue while moving files and folders from one HDFS to another HDFS location

New Contributor

Thanks for your response @Bryan Bende

Do we have any workaround for this or any other workflow with different processors? Basically i want to move all these folders and files including empty folders to some other directory.

Don't have an account?
Coming from Hortonworks? Activate your account here