Skip to content
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

STORM-3197: Make StormMetricsRegistry non-static #2805

Merged
merged 1 commit into from
Sep 17, 2018

Conversation

srdo
Copy link
Contributor

@srdo srdo commented Aug 16, 2018

pom.xml Outdated
@@ -280,7 +280,7 @@
<log4j-over-slf4j.version>1.6.6</log4j-over-slf4j.version>
<log4j.version>2.8.2</log4j.version>
<slf4j.version>1.7.21</slf4j.version>
<metrics.version>3.1.0</metrics.version>
<metrics.version>3.2.6</metrics.version>
Copy link
Contributor

Choose a reason for hiding this comment

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

can you comment on the version change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sorry. The previous version didn't have the methods from this PR https://github.com/dropwizard/metrics/pull/1023/files. We need them so we can get getOrAdd behavior (either add the metric if not registered, or return the existing metric) for metric registration that uses factory functions. Without this ability, registering metrics (especially gauges) would be a pain, since we'd have to be very careful only to register them once.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This specific version just happens to be the latest in the 3.x release line. I'd like to upgrade to the latest version of the library, but we'll have to pull out a bit of code relating to the Ganglia reporter first, and I didn't want to mix it in to this PR. dropwizard/metrics#1319

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Raised https://issues.apache.org/jira/browse/STORM-3199 to get rid of metrics-ganglia

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks. Just like to have a trail for version changes and the requirements.

@@ -38,9 +39,9 @@
private final DRPC drpc;
private final String serviceId;

public LocalDRPC() {
public LocalDRPC(StormMetricsRegistry metricsRegistry) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels problematic to me.

At a minimum we need to update ./docs/Local-mode.md to have the new way to create it documented, but I would really prefer to just have at least the option for a default constructor. This is local mode the only reason we would need to have a single metrics registry would be if we intended to gather metrics from it afterwards as a part of a test, which we don't really do right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a no-args constructor that creates a new registry.

Copy link
Contributor

@revans2 revans2 left a comment

Choose a reason for hiding this comment

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

Overall it looks really good I am +1 on the change, but I would like to see a default constructor for LocalDRPC

}
for (Long pid : pids) {
kill(pid);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like indentation is off around here. could be spaces vs tabs or something, not really sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will reformat

@revans2
Copy link
Contributor

revans2 commented Sep 17, 2018

Also the merge conflicts are really minor.

Copy link
Contributor

@kishorvpatil kishorvpatil left a comment

Choose a reason for hiding this comment

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

👍

@kishorvpatil
Copy link
Contributor

@revans2 Looks like we have few conflicts on this PR?

@revans2
Copy link
Contributor

revans2 commented Sep 17, 2018

@kishorvpatil yes but the merge conflicts are minor. I wanted to get this reviewed so @srdo can address any review comments at the same time as fixing the merge conflicts so we can get this in ASAP and have a 2.0.0 RC out ASAP.

@srdo
Copy link
Contributor Author

srdo commented Sep 17, 2018

Test failure looks unrelated, it's getting a permission error when writing to the local maven repo.

Copy link
Contributor

@revans2 revans2 left a comment

Choose a reason for hiding this comment

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

+1

@asfgit asfgit merged commit 8c90f12 into apache:master Sep 17, 2018
asfgit pushed a commit that referenced this pull request Sep 17, 2018
…-3197

STORM-3197: Make StormMetricsRegistry non-static

This closes #2805
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.

5 participants