Skip to content

Conversation

@lindong28
Copy link
Contributor

No description provided.


for (Map.Entry<String, Properties> entry : testProps.entrySet()) {
String name = entry.getKey();
if (name.lastIndexOf('-') != -1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we document anywhere about this expected format with "-"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

It is not documented yet. I need to document the format of the json file provided to KafkaMonitor.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same question when I first saw this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjkoshy @becketqin It is documented in the config/kafka-monitor.properties now. See https://github.com/lindong28/kafka-monitor/blob/first-commit/config/kafka-monitor.properties. Does this address your concern?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but it seems slightly hacky. Is it necessary to add those specific numbers? i.e., shouldn't we just let the user specify as many instances as they want and the instantiation will add specific suffixes if necessary (say to avoid metrics collisions)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjkoshy Here are two reasons for having these specific numbers. First, it allows Kafka Monitor to explicitly provide log information for each test. Say user starts to BasicEndToEnd test with different configs to monitor the same kafka clusters. If one BasicEndToEnd test exits unexpectedly, or assertions fail for only this BasicEndToEnd test, then we want to alert users that one specific test has failed. Having user-specified name will be helpful in this case.

Another reason is that this makes it easy to parse the properties file. KafkaMontor.main() reads the properties file into a Map and we need to keep the name distinct to allow multiple instances of the same test class to be created by Kafka Monitor.

Given these two reasons, do you think this format makes sense?

import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class MetricsExportService implements Service {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer calling this say DefaultMetricsReportingService or similar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would DefaultMetricsReportService be more concise and consistent with names of ProduceService and ConsumeService?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about DefaultMetricsReporterService ? i.e., it is sort of standard wrt metrics Reporter interfaces (such as those with yammer and Kafka metrics)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Fixed now.

@lindong28 lindong28 merged commit 27621a8 into linkedin:master Apr 25, 2016
RiaPradeep pushed a commit to RiaPradeep/kafka-monitor that referenced this pull request Dec 10, 2021
* Add HA monitoring using Abstract Coordinator

* Change some naming

* Update log messages

* Add service factory for HA monitoring

* Update src/main/java/com/linkedin/xinfra/monitor/XinfraMonitor.java

Check for HAMonitoring class more robustly.

Co-authored-by: hgeraldino <[email protected]>

* Correct build error

* Cleanup and clarify HA variable

Co-authored-by: Christopher Beard <[email protected]>
Co-authored-by: hgeraldino <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants