-
Notifications
You must be signed in to change notification settings - Fork 404
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
Implement Comparable interface on StreamCut objects #7032
Comments
There is already a pravega/controller/src/main/java/io/pravega/controller/store/stream/PersistentStreamBase.java Line 274 in f9ed2e1
Would it make sense to place this logic in the "shared" package, in the case that both client and server need to use it? |
@RaulGracia -- There's another comparison routine in the client in
The Also, the Controller's routine combines "equal" and "after." In order to implement Comparable#compareTo(), we need to distinguish between "equal" and "after." It would be great to bring all these comparison routines closer together. Do you see a way to do that? I can help in this effort. We need a |
Is your feature request related to a problem? Please describe.
When implementing a Pravega ingestion plugin for Apache Druid, Druid internals want to track ingestion offsets, which in Pravega are called StreamCuts, and these offsets need to implement the Comparable interface.
Describe the solution you'd like
public interface StreamCut extends Serializable, Comparable<StreamCut>
Describe alternatives you've considered
We've considered using
EventPointer
s or readerPosition
s as the offset we let Druid track, but for various reasons having Druid track StreamCuts is preferrable. (Reasons relating to restarting new reader groups at previous offsets, composing Positions from several readers into a new StreamCut, acquiring subsequent segments after a scaling event or epoch, etc.)Additional context
We need to wrap whatever we use as Pravega offset in a Druid
OrderedSequenceNumber
: https://github.com/apache/druid/blob/master/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/common/OrderedSequenceNumber.java#L34The text was updated successfully, but these errors were encountered: