edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rui Shen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EDGENT-308) Is it possible to use poll() with FileStreams together
Date Wed, 09 Nov 2016 03:52:59 GMT

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

Rui Shen commented on EDGENT-308:

I am from IoT Edge Analytics team and we are building an SDK on top of Edgent. We are hoping
to have an general solution from different connectors of using "pull" method like File and
JDBC (Mqtt and Kafka are different because they are using the pub-sub method to get data).
So CommandStreams can not satisfy our needs. 

As a workaround, now we add "sleep" in map method after getting the TStream instance from
connectors. Although this approach works, it can not dynalyiclly adjust the sleeping interval
as poll() method provides. But anyway, it works at least for the static configuration. 

Thanks for your reply. And I will raise questions using  dev@apache.edgent.org instead of
opening defects, :). 

> 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

View raw message