Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-05-10 Thread Matt Farmer
Given that the conversation has lingered for a bit, I've gone ahead and opened up a PR with the initial implementation. Let me know your thoughts! https://github.com/apache/kafka/pull/5002 Also, voting is open - so if you like this idea please send me some binding +1's before May 22nd so we can g

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-04-17 Thread Matt Farmer
Hello all, I've updated a KIP again to add a few sentences about the general problem we were facing in the motivation section. Please let me know if there is any further feedback. On Tue, Apr 3, 2018 at 1:46 PM, Matt Farmer wrote: > Hey Randall, > > Devil's advocate sparring is always a fun game

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-04-03 Thread Matt Farmer
Hey Randall, Devil's advocate sparring is always a fun game so I'm down. =) Rebalance caused by connectivity failure is the case that caused us to notice the issue. But the issue is really more about giving connectors the tools to facilitate rebalances or a Kafka connect shutdown cleanly. Perhaps

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-04-03 Thread Randall Hauch
Matt, Let me play devil's advocate. Do we need this additional complexity? The motivation section talked about needing to deal with task failures due to connectivity problems. Generally speaking, isn't it possible that if one task has connectivity problems with either the broker or the external sy

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-04-03 Thread Matt Farmer
I have made the requested updates to the KIP! :) On Mon, Apr 2, 2018 at 11:02 AM, Matt Farmer wrote: > Ugh > > * I can update > > I need more caffeine... > > On Mon, Apr 2, 2018 at 11:01 AM, Matt Farmer wrote: > >> I'm can update the rejected alternatives section as you describe. >> >> Also, ad

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-04-02 Thread Matt Farmer
Ugh * I can update I need more caffeine... On Mon, Apr 2, 2018 at 11:01 AM, Matt Farmer wrote: > I'm can update the rejected alternatives section as you describe. > > Also, adding a paragraph to the preCommit javadoc also seems like a > Very Very Good Idea™ so I'll make that update to the KIP

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-04-02 Thread Matt Farmer
I'm can update the rejected alternatives section as you describe. Also, adding a paragraph to the preCommit javadoc also seems like a Very Very Good Idea™ so I'll make that update to the KIP as well. On Mon, Apr 2, 2018 at 10:48 AM, Randall Hauch wrote: > Thanks for the KIP proposal, Matt. > >

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-04-02 Thread Randall Hauch
Thanks for the KIP proposal, Matt. You mention in the "Rejected Alternatives" section that you considered changing the signature of the `preCommit` method but rejected it because it would break backward compatibility. Strictly speaking, it is possible to do this without breaking compatibility by i

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-03-28 Thread Ted Yu
I looked at WorkerSinkTask and it seems using a boolean for KIP-275 should suffice for now. Thanks On Wed, Mar 28, 2018 at 7:20 PM, Matt Farmer wrote: > Hey Ted, > > I have not, actually! > > Do you think that we're likely to add multiple states here soon? > > My instinct is to keep it simple u

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-03-28 Thread Matt Farmer
Hey Ted, I have not, actually! Do you think that we're likely to add multiple states here soon? My instinct is to keep it simple until there are multiple states that we would want to consider. I really like the simplicity of just getting a boolean and the implementation of WorkerSinkTask already

Re: [DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-03-28 Thread Ted Yu
The enhancement gives SinkTaskContext state information. Have you thought of exposing the state retrieval as an enum (initially with two values) ? Thanks On Wed, Mar 28, 2018 at 6:55 PM, Matt Farmer wrote: > Hello all, > > I am proposing KIP-275 to improve Connect's SinkTaskContext so that Sin

[DISCUSS] KIP-275 - Indicate "isClosing" in the SinkTaskContext

2018-03-28 Thread Matt Farmer
Hello all, I am proposing KIP-275 to improve Connect's SinkTaskContext so that Sinks can be informed in their preCommit hook if the hook is being invoked as a part of a rebalance or Connect shutdown. The KIP is here: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=75977607 Pleas