Issue with GetFile Processor

classic Classic list List threaded Threaded
6 messages Options
cpk
Reply | Threaded
Open this post in threaded view
|

Issue with GetFile Processor

cpk
H,

I have designed one flow which contains GetFile processor to get file from local directory and send it to another processor. Everything is working fine but GetFile processor calliing recurcively until I stop process(click on red icon button).

Is there anyway to stop the process once read the file first time?

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Issue with GetFile Processor

Mark Payne
Hello,


The default behavior of GetFile is to pull the file in once and then delete it.


If you choose to have the Processor not delete the file, it will continually pull in the data. The Processor is stateless, so it cannot know whether or not he file has been picked up if it doesn’t delete it. The ability to “Keep Source File” is really intended for testing purposes.


If your goal is to pick up from say /data/in and you don’t want to delete the data, my recommendation is instead to store the data in another directory (say /data/archive) and then just copy the file that you want to pick up from /data/archive to /data/in. The GetFile will then pull in the file from /data/in and delete it.


Thanks

-Mark








From: cpk
Sent: ‎Tuesday‎, ‎February‎ ‎10‎, ‎2015 ‎10‎:‎39‎ ‎AM
To: [hidden email]





H,

I have designed one flow which contains GetFile processor to get file from
local directory and send it to another processor. Everything is working fine
but GetFile processor calliing recurcively until I stop process(click on red
icon button).

Is there anyway to stop the process once read the file first time?

Thanks,



--
View this message in context: http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/Issue-with-GetFile-Processor-tp657.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at Nabble.com.
cpk
Reply | Threaded
Open this post in threaded view
|

Re: Issue with GetFile Processor

cpk
ok, thanks for ur reply, I will try these options.

Can we debug(remote debug) the code using eclipse while executing processor?
Reply | Threaded
Open this post in threaded view
|

Re: Issue with GetFile Processor

Mark Payne
In reply to this post by cpk
Absolutely. In the conf/ directory, if you look at the bootstrap.conf file, there’s a line for remote debugging. It is commented out by default. Just uncomment it and restart.






From: cpk
Sent: ‎Tuesday‎, ‎February‎ ‎10‎, ‎2015 ‎11‎:‎33‎ ‎AM
To: [hidden email]





ok, thanks for ur reply, I will try these options.

Can we debug(remote debug) the code using eclipse while executing processor?



--
View this message in context: http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/Issue-with-GetFile-Processor-tp657p659.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at Nabble.com.
cpk
Reply | Threaded
Open this post in threaded view
|

Re: Issue with GetFile Processor

cpk
This post has NOT been accepted by the mailing list yet.
I want to invoke rest get api and parse the response. I used invokeHTTP processor but always flowfiles are empty.

List<FlowFile> flowfiles = session.get(Config.MAX_RESULTS_PER_THREAD);

flowfiles list size is empty.

Is there any configuration missing??
cpk
Reply | Threaded
Open this post in threaded view
|

Re: Issue with GetFile Processor

cpk
This post has NOT been accepted by the mailing list yet.


On Mon, Feb 16, 2015 at 6:07 PM, cpk [via Apache NiFi (incubating) Developer List] <[hidden email]> wrote:
I want to invoke rest get api and parse the response. I used invokeHTTP processor but always flowfiles are empty.

List<FlowFile> flowfiles = session.get(Config.MAX_RESULTS_PER_THREAD);

flowfiles list size is empty.

Is there any configuration missing??


If you reply to this email, your message will be added to the discussion below:
http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/Issue-with-GetFile-Processor-tp657p699.html
To unsubscribe from Issue with GetFile Processor, click here.
NAML