Hi Sunil,

The current implementation of JDBC input operator does not support a
time-controlled behavior.
As a reference on how to do polling reads there is a  PR opened -
https://github.com/apache/incubator-apex-malhar/pull/282

One of the solutions for the use-case using Apex features would be as
follows,

You can trigger the application as required (from a scheduler) and then
kill the application at a later time when the period to read inputs is
over.The engine ensures that state is maintained on persistent storage
(HDFS) even after the application is killed.

On the next run you can resume the same application from the point you
stopped using the -originalAppId parameter for the launch from dtCli.
See below,
launch jar-file/json-file/properties-file/app-package-file -originalAppId
<application id>

Thanks,
Dev


On Mon, May 23, 2016 at 2:32 PM, Priyanka Gugale <[email protected]>
wrote:

> Hi Sunil,
>
> I don't think we have exactly pause and resume feature in Malhar yet. But
> I can think of some other way to achieve this.
> We are adding bandwidth control feature to Malhar. The pull request
> <https://github.com/apache/incubator-apex-malhar/pull/279> is already
> opened for the same. This doesn't have option to configure timed bandwidth
> consumption (i.e. use x bandwidth during given time hours), but I think
> it's easy to do that in BandwidthManager. Or quick thing is you can try to
> update the property "bandwidth" during the time when u don't want operator
> to work using some external script (this is short term solution).
>
> Can you tell the reason why you want to pause the read during certain time
> hours?
>
> -Priyanka
>
>
> On Mon, May 23, 2016 at 2:21 PM, Sunil Parmar <[email protected]>
> wrote:
>
>> All,
>> We’re writing an app for migration data from legacy JDBC system to Kafka.
>> Legacy system as it is still being used in production, we would want to
>> pause the JDBC poll input operator for configured hours.
>>
>> Does malhar ibrary has any operator that we can use for time controlled
>> operator ?
>> Or is there a way to configure input operators to pause and resume for
>> given time ?
>>
>> -Sunil
>>
>>
>>
>

Reply via email to