Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi - How to specify file paths in GetFile processor for files on network drives

avatar

I have NiFi instance 0.4.1 running on my local Windows workstation. I want to copy a file from a different network drive to HDFS.

I have been able to copy files from my C: drive to HDFS using getFile and putHDFS processors, but getFile doesn't accept my network drive path. I am specifying network filepath as

//server/shared/path/to/file

1 ACCEPTED SOLUTION

avatar

Combination of ListFile and FetchFile processor can resolve this problem. ListFile processor accepts any network drive.

2363-listfile.jpg

Combination of ListFile processor with FetchFile processor provides equivalent functionality.

Thank You @Neeraj Sabharwal for pointing in right direction.

View solution in original post

7 REPLIES 7

avatar
Master Mentor
@Shishir Saxena

See this jira https://issues.apache.org/jira/browse/NIFI-631

It can get you some ideas.

avatar

Thank You @Neeraj Sabharwal. I was able to use a combination of ListFile and FetchFile processors to workaround this issue.

avatar

Combination of ListFile and FetchFile processor can resolve this problem. ListFile processor accepts any network drive.

2363-listfile.jpg

Combination of ListFile processor with FetchFile processor provides equivalent functionality.

Thank You @Neeraj Sabharwal for pointing in right direction.

avatar
Master Mentor

@Shishir Saxena

I have accepted this as best answer.

avatar

@Shishir Saxena,
Yes GetFile processor also worked for shared drive.

i have doubt on how to pass the credentials for access network drive?

For example:

my shared drive wants prompt for credentials for access folder inside it.

If my shared folder have permission for everyone then i can able to access it.

But if shared drive prompts for Credentials then ListFile seems doesn't work.

So can you suggest the way to access shared drive with username and password in nifi processors?

avatar
New Contributor

Hello my use case also almost similar like this.

I want to use "\\btc7n001\Ongoing-MR\MRI\Deepak" path as input which i mapped to my machine as network drive and my destination is HDFS.

i am using vmplayer in my laptop and istalled HDP sandbox and added nifi as a service there.

Please tell me what processor i need to use and in which order.

Also if you can tell me to set the path in one screenshot it will be good as i am getting could not find the directory message

avatar

Hi Shishidhar..

i am new at NiFi.. please suggest me steps how you sent local file(in C: drive) into HDFS.i have csv file into local system and this file i kept in getfile processor, but i am getting some issue with puthdfs processor(error: map reduce..) and i have added core-site and hdfs-site xml files into puthdfs processor.