cameronlee314 commented on pull request #1518:
URL: https://github.com/apache/samza/pull/1518#issuecomment-901346649


   > I remember something about the `MetricsSnapshotReporter` being 
instantiated within the `SamzaContainer` as well. Any plans to inject that as 
well from the higher layers e.g., `ContainerLaunchUtil` so that other 
components within can reuse the reporters?
   > 
   > I think the change itself was not huge from the perspective of YARN 
although it had few considerations on the standalone front due to difference in 
lifecycle between `SamzaContainer` & `StreamProcessor`
   
   IMO, the way that Samza handles metrics in general is not very clean right 
now, and the refactoring needed to really clean it up is a bigger scope. There 
isn't very good dependency injection, so there isn't a single spot where 
metrics all get hooked up, so different components do their own reporter 
registration. Also, the reporters need to get started in some deep layer (e.g. 
`ContainerProcessManager` or `SamzaContainer.run`) because the registries need 
to be registered before starting the reporters (`MetricsReporter` doesn't 
define the contract about the ordering of registers/start, and at least I see 
one `MetricsReporter` implementation that assumes everything is registered 
first).
   Therefore, I was just trying to do a more minimal change for now to get what 
I needed. Injecting the full set of reporters into `SamzaContainer` would clean 
up the code, but wouldn't add much more capability because `SamzaContainer` 
already registers all of the reporters with the registry that is now passed in.
   Do you think this change itself is reasonable to put it on its own or do you 
think we should include some more clean up with it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to