Skip to content

Conversation

@harshach
Copy link
Contributor

No description provided.

@harshach
Copy link
Contributor Author

@ptgoetz @nathanmarz @revans2 Please take a look at the patch. I renamed forceFromStart to ignoreZkOffsets and users can configure where they want to start based on startOffsetTime .

@Parth-Brahmbhatt
Copy link
Contributor

💯

Copy link
Member

Choose a reason for hiding this comment

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

I would also document the actual values of EarliestTime() (-2) and LatestTime() (-1), and that it can also be set to a point in time (a la System.currentTimeMillis()).

My reasoning behind documenting the values (as opposed to the kafka API constants) is that the start offset time is likely to be specified via configuration (i.e. outside java code). Either that, or add spout constants that would get evaluated to EarliestTime()/LatestTime() if for some reason those values were ever changed in the Kafka API -- that seems like a less "leaky" solution.

@harshach
Copy link
Contributor Author

harshach commented Apr 1, 2015

@ptgoetz updated the doc as per your suggestion. Please take a look.

@harshach
Copy link
Contributor Author

harshach commented Apr 7, 2015

@ptgoetz addressed your comments. Can you please take a look at this.

@ptgoetz
Copy link
Member

ptgoetz commented Apr 7, 2015

It wouldn't hurt to expand on what System.currentTimeMillis() means in that context (i.e. if you have a specific time stored in epoch format, you can start from there).

@ptgoetz
Copy link
Member

ptgoetz commented Apr 7, 2015

That being said, I'm +1.

@asfgit asfgit merged commit c5ba437 into apache:master Apr 19, 2015
@Renkai
Copy link
Contributor

Renkai commented Aug 28, 2015

If I set ignoreZkOffsets to true,will a spout recover from failure read from zk offsets or use startOffsetTime?
How do spout detect it is first started or recover from failure?

@harshach
Copy link
Contributor Author

@Renkai ignoreZkOffsets is rename of forcefromStart. So if you set ignoreZkOffsets it wil ignore already set offsets in zookeeper and start from the startOffsetTime.
"How do spout detect it is first started or recover from failure?"
can you explain bit more on that.
Here ignoreZkOffsets works when you deployed a topology and later killed it but want to start from startOffset instead of offset stored in zookeeper.

@Renkai
Copy link
Contributor

Renkai commented Aug 28, 2015

when ignoreZkOffsets set true and startOffsetTime = kafka.api.OffsetRequest.EarliestTime().
workers running -> topology shutdown by user and restart -> workers will read from earliest time again
workers running -> one of workers shutdown by accident and supervisor restart the worker -> what offset will the restarted worker read from?
@harshach

@harshach
Copy link
Contributor Author

@Renkai In this case yes it won't read from zk offsets. Which is incorrect behavior. Can you file a jira on this.

@Renkai
Copy link
Contributor

Renkai commented Aug 28, 2015

@harshach
Copy link
Contributor Author

Thanks @Renkai

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.

5 participants