cameronlee314 opened a new pull request #1558:
URL: https://github.com/apache/samza/pull/1558


   Issues: Code related to metrics snapshot reporting is in Scala, which is 
inconsistent with most of other Samza code. Scala is less well-known across 
Samza, it takes slightly longer to build, and Scala versioning is sometimes 
hard to deal with.
   
   Changes:
   1. Convert some classes (`org.apache.samza.metrics.reporter.Metrics*`) 
related to metrics snapshot reporting to Java.
   2. Added `RegistryWithSource` Java class to help with implementing 
`MetricsReporter`s in Java (in Scala, a tuple was used instead).
   3. Added some tests for the classes that were converted to Java
   
   Testing: Added tests and verified they passed on the Scala versions of the 
classes, and then verified they passed on Java versions of the classes
   
   API changes:
   1. (backwards compatible) Added `RegistryWithSource` Java class to help with 
implementing `MetricsReporter`s in Java
   2. (applies to usage of `org.apache.samza.metrics.reporter.Metrics*` classes 
from `samza-core`) Converted classes no longer provide direct access to 
constructor parameters (e.g. `Metrics.immutableMetrics()` is no longer 
accessible). "Container" objects like `Metrics`, `MetricsSnapshot`, and 
`MetricsHeader` still have getters for their fields.
   3. (applies to usage of `org.apache.samza.metrics.reporter.Metrics*` classes 
from `samza-core`) "Container" objects like `Metrics`, `MetricsSnapshot`, and 
`MetricsHeader` no longer treat their fields as `@BeanProperty`, so they no 
longer have setters. It's better that container objects are immutable anyways, 
and there weren't any usages of the setters within Samza code.


-- 
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