Re: Resetting the Offset of a Kafka Sink Connector

2016-06-05 Thread Jack Lund
Ah, cool. Thanks! On Sat, Jun 4, 2016 at 7:42 PM Ewen Cheslack-Postava wrote: > Connectors don't perform any data copying and don't rewind offsets -- > that's the job of Tasks. In your SinkTask implementation you have access to > the SinkTaskContext via its context field. > > -Ewen > > On Tue, M

Re: Resetting the Offset of a Kafka Sink Connector

2016-06-04 Thread Ewen Cheslack-Postava
Connectors don't perform any data copying and don't rewind offsets -- that's the job of Tasks. In your SinkTask implementation you have access to the SinkTaskContext via its context field. -Ewen On Tue, May 31, 2016 at 9:47 AM, Jack Lund wrote: > Yes, the one that the SinkConnector uses is the

Re: Resetting the Offset of a Kafka Sink Connector

2016-05-31 Thread Jack Lund
Yes, the one that the SinkConnector uses is the WorkerSinkTaskContext, but, unfortunately, it creates it and uses it internally, but doesn't expose any accessors for it, nor does the constructor allow me to pass one in for it to use. -Jack On Tue, May 31, 2016 at 11:34 AM Dean Arnold wrote: > H

Re: Resetting the Offset of a Kafka Sink Connector

2016-05-31 Thread Dean Arnold
Have you tried either of the SinkTaskContext.offset() methods ? https://kafka.apache.org/0100/javadoc/org/apache/kafka/connect/sink/SinkTaskContext.html On Tue, May 31, 2016 at 8:43 AM, Jack Lund wrote: > I'm trying to use the Connector API to write data to a backing store (HDFS > for now, but

Resetting the Offset of a Kafka Sink Connector

2016-05-31 Thread Jack Lund
I'm trying to use the Connector API to write data to a backing store (HDFS for now, but probably something like S3 later) for potential replay back into Kafka later. However, I can't seem to find how to reset the offsets for the SinkConnector. I've found the rewind() function on the WorkerSinkTask