Ah, cool. Thanks! On Sat, Jun 4, 2016 at 7:42 PM Ewen Cheslack-Postava <e...@confluent.io> 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, May 31, 2016 at 9:47 AM, Jack Lund < > jack.l...@braintreepayments.com> > wrote: > > > 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 <renodino...@gmail.com> > > wrote: > > > > > 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 < > > > jack.l...@braintreepayments.com> > > > wrote: > > > > > > > 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: > > > > > > > > > > > > > > https://github.com/apache/kafka/blob/c9485b78a6e43747daf1314ae9532839fb7bc810/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSinkTask.java#L396 > > > > > > > > However, WorkerSinkTask doesn't seem to provide any access to the > > > > WorkerSinkTaskContext, even though the latter has accessors to reset > > the > > > > offsets with. Without those, I'm not sure what the purpose of the > > rewind > > > > method is, since it doesn't seem to be possible to set the offsets at > > > all. > > > > > > > > Is this by design? > > > > > > > > Thanks. > > > > > > > > -Jack Lund > > > > Braintree Payment Systems > > > > > > > > > > > > > -- > Thanks, > Ewen >