apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Fernandes <fran...@datatorrent.com>
Subject Changes for calling committed on operators when stream locality is THREAD_LOCAL
Date Thu, 29 Dec 2016 09:34:43 GMT
Hi all,

Need your inputs on the following:

Issue -  I have  an application with 2 operators. The second operator is
which implements the Operator.CheckpointListener(deprecated) committed
method. When the locality of the stream connecting the two operators is
Locality.THREAD_LOCAL, the committed method is not called.

Inside processHeartbeatResponse
we check for the thread != null. In case of THREAD_LOCAL, we have thread =
null, and so the committed method isn't called.

Approach 1 - Change in apex-core/engine
For thread local
activate  we do not set the thread
in the node's context
Because the thread is not set, we skip this operator in the
and the committed is not called
if (thread == null || !thread.isAlive()) {
We need this if condition for invalid operators in case of other
localities. Should we keep the OperatorDeployInfo persistent for each node
so that it can be used later to identify the locality? This might be an
intrusive change.

Approach 2 - Change in malhar/AbstractFileOutputOperator
Refactor the code from the committed
method to beforeCheckpoint
This will require no change in the core platform, but will work only for
this particular operator. New operators should not run into this problem
because the CheckpointListener is now deprecated and the
CheckpointNotificationListener is to be used.

Please let me know your thoughts on which approach would be the right way
to solve this.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message