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

Better harmonized dimensions for query metrics. #3245

Merged
merged 1 commit into from
Jul 14, 2016

Conversation

gianm
Copy link
Contributor

@gianm gianm commented Jul 14, 2016

All query metrics now start with toolChest.makeMetricBuilder, and all of
those now start with DruidMetrics.makePartialQueryTimeMetric. Also, "id"
moved to common code, since all query metrics added it anyway.

In particular this will add query-type specific dimensions like "threshold"
and "numDimensions" to servlet-originated metrics like query/time.

All query metrics now start with toolChest.makeMetricBuilder, and all of
*those* now start with DruidMetrics.makePartialQueryTimeMetric. Also, "id"
moved to common code, since all query metrics added it anyway.

In particular this will add query-type specific dimensions like "threshold"
and "numDimensions" to servlet-originated metrics like query/time.
@gianm gianm added this to the 0.9.2 milestone Jul 14, 2016
@fjy
Copy link
Contributor

fjy commented Jul 14, 2016

👍

@@ -236,6 +243,7 @@ public Object accumulate(Object accumulated, Object in)

try {
final Query theQuery = query;
final QueryToolChest theToolChest = toolChest;
Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm reading this correct, the only reason you need to have a 2nd variable name here is because the two code paths of A) query successfully deserializing and B) query throws exception while deserializing... are all muddled together in the exception handling.

Would it be worth it in this PR to try and clean that up a bit?

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 is here because the query and toolChest are passed to anonymous classes at some point, and so the references need to be final. But the original references aren't final due to how the exception handling is done.

I didn't really want to mess with any of that in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, I figured it would probably be outside the scope of this PR, but should be refactored before too many work-arounds are added.

@gianm
Copy link
Contributor Author

gianm commented Jul 14, 2016

Failed due to #2253 - https://travis-ci.org/druid-io/druid/jobs/144765914 - bouncing.

@gianm gianm closed this Jul 14, 2016
@gianm gianm reopened this Jul 14, 2016
@drcrallen
Copy link
Contributor

👍 after travis

@fjy fjy merged commit 6cd1f53 into apache:master Jul 14, 2016
@gianm gianm deleted the query-time-dims branch September 23, 2022 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants