vwidin opened a new pull request #934: SAMZA-1935 : Refactor TaskContextImpl to not include access to objects that are only used internally URL: https://github.com/apache/samza/pull/934 We created a new class called JobContextMetadata which hold the methods `registerObject`, `fetchObject`, `getJobModel` and `getStreamMetadataCache` and is instantiated in the `OperatorImplGraph` and is passed to multiple `OperatorImpl`. The class `EmbeddedTaggedRateLimiter` implements the public API `RateLimiter`, which has a method called init with a `Context` object as inparameter. This means that the Context object is the only source from which the JobModel and the `StreamMetadataCache` can be fetched. Hence, the methods `getJobModel` and `getStreamMetadataCache` are needed outside of `JobContextMetadata`. Therefore only copies of these methods were moved to `JobContextMetadata`. This means that the `StreamMetadataCache` and the `JobModel` are created with the `Context` therefore the `JobContextMetadata` is initiated with the `StreamMetadataCache` and `JobModel` retrieved by calling `getJobModel` and `getStreamMetadataCache` on the `TaskContextImpl`, so there are still casts of the `TaskContext` to the `TaskContextImpl`.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services