edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dale LaBossiere (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (EDGENT-308) Is it possible to use poll() with FileStreams together
Date Thu, 10 Nov 2016 18:59:58 GMT

    [ https://issues.apache.org/jira/browse/EDGENT-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15645360#comment-15645360
] 

Dale LaBossiere edited comment on EDGENT-308 at 11/10/16 6:59 PM:
------------------------------------------------------------------

As clarified in EDGENT-306, textFileReader() is currently limited to handling files with static
content.

I'm not clear on your exact processing needs but I suspect one of the capabilities provided
by connectors.CommandStreams could satisfy your needs.

As an alternative to using Topology.poll() and writing your own "List<String> Supplier.get()"
perhaps you could use connectors.CommandStreams.periodicSource() with a *nix "cat" command?

If you want periodic "tail -f"-like periodic processing capability perhaps you can use connectors.CommandStreams.generate()
with a "tail -f" command?

Does that help?  In the future please use dev@edgent.apache.org for asking questions.
Thanks for your interest in Edgent!


was (Author: dlaboss):
As clarified in EDGENT-306, textFileReader() is currently limited to handling files with static
content.

I'm not clear on your exact processing needs but I suspect one of the capabilities provided
by connectors.CommandStreams could satisfy your needs.

As an alternative to using Topology.poll() and writing your own "List<String> Supplier.get()"
perhaps you could use connectors.CommandStreams.periodicSource() with a *nix "cat" command?

If you want periodic "tail -f"-like periodic processing capability perhaps you can use connectors.CommandStreams.generate()
with a "tail -f" command?

Does that help?  In the future please use dev@apache.edgent.org for asking questions.
Thanks for your interest in Edgent!

> Is it possible to use poll() with FileStreams together
> ------------------------------------------------------
>
>                 Key: EDGENT-308
>                 URL: https://issues.apache.org/jira/browse/EDGENT-308
>             Project: Edgent
>          Issue Type: New Feature
>          Components: Connectors
>            Reporter: Rui Shen
>
> My requirement is to load data from a file and polling with a specific frequency (say
every 1 second). 
> I found Topology.poll() can do this, but it requires a Supplier parameter and the get
method is called periodically. With this way, I have to read the file content myself and create
a Iterable instance, then a Supplier. 
> I want to use FileStreams.textFileReader() to handle the file reading. The problem is
how to use it with Topology.poll() together? I could not find a way to do this. 
> Is there any way to do this? Or connectors does not support "polling" at all? 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message