Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp information should be copied to projected SinkRecord #29

Conversation

niksajakovljevic
Copy link

Projected SinkRecord was missing timestamp information from the original SinkRecord

@ghost
Copy link

ghost commented Jun 14, 2017

@confluentinc It looks like @niksajakovljevic just signed our Contributor License Agreement. 👍

Always at your service,

clabot

@ConfluentJenkins
Copy link
Collaborator

Can one of the admins verify this patch?

record.kafkaOffset()
record.kafkaOffset(),
record.timestamp(),
record.timestampType()
Copy link
Member

@rhauch rhauch Jun 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this is a good change. My only question is whether it would be better to instead call the following?

record.newRecord(record.topic(), record.kafkaPartition(), 
                 currentKeySchema, projected.getKey(), 
                 currentValueSchema, projected.getValue(), 
                 record.timestamp())

This is the same, except the record's offset and typestamp type are retained automatically and thus don't have to be passed in.

@kkonstantine
Copy link
Member

Thanks @niksajakovljevic for the fix! It makes sense. I'll go ahead and merge it as is since we are close to the end of the release cycle and both versions are similar. @rhauch your comment is valid. Let's consolidate in one of the next iterations.

@kkonstantine kkonstantine changed the base branch from master to 3.3.x June 15, 2017 06:00
@kkonstantine kkonstantine changed the base branch from 3.3.x to master June 15, 2017 06:00
@kkonstantine kkonstantine merged commit 145bbe7 into confluentinc:master Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants