-
Notifications
You must be signed in to change notification settings - Fork 556
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
Refactor and Move ProcessorContext
#9743
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moves StreamProcessorContext into ..zeebe.streamprocessors package as this is the context object for the platform part. Adds a new RecordProcessorContext interface to capture the information that is needed by record processors. This is to later thin out StreamProcessorContext. For now, however StreamProcessorContext simply implements that interface to keep the changes minimal. Once the engine abstraction is established, each time can continue refactoring their halfs of the interface
This commit moves two interfaces to the API package. The API package is meant to contain the public API of the engine. Both of these interfaces are implemented outside the engine. Other interfaces may also need to be moved there, but the current focus is on ReadonlyStreamProcessorContext, StreamProcessorLifecycleAware was also moved, because it depends on ReadonlyStreamProcessorContext and is implemented in the broker
Previously, this interface was designed by following the rule "This interface has read only methods for everything in StreamProcessorContext". This is now changed to "This interface has everything that is actually needed." The switch was made, because StreamProcessorContext has grown quite large and we want to reduce its size. With this change, we can better see, which information is actually needed by clients of the interface. Also, we were able to remove some stuff from StreamProcessorContext which was not used
npepinpe
approved these changes
Jul 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Love seeing the context classes split
bors merge |
zeebe-bors-camunda bot
added a commit
that referenced
this pull request
Jul 8, 2022
9743: Refactor and Move `ProcessorContext` r=pihme a=pihme ## Description * Rename `(ReadOnly)ProcessorContext` to `StreamProcessorContext` * Move interface to `api` package, move implementation to `streamprocessor` package * Simplifiy code ## Related issues related to #9725 Co-authored-by: pihme <pihme@users.noreply.github.com>
Build failed: |
bors retry |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
(ReadOnly)ProcessorContext
toStreamProcessorContext
api
package, move implementation tostreamprocessor
packageRelated issues
related to #9725
Definition of Done
Code changes:
backport stable/1.3
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation:
Please refer to our review guidelines.