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

DRILL-6282: Update Drill's Metrics dependencies #1189

Closed
wants to merge 1 commit into from

Conversation

vdiravka
Copy link
Member

@vdiravka vdiravka commented Mar 24, 2018

Hive upgrade brings unnecessary io.dropwizard.metrics dependencies for Drill. They are used only for Hive test purposes. Moreover they are in conflict with Drill's com.codahale.metrics dependencies.

@vdiravka
Copy link
Member Author

@vrozov Could you please review this, since you were the reviewer for DRILL-5978 (Hive upgrade)

Copy link
Member

@vrozov vrozov left a comment

Choose a reason for hiding this comment

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

What is a reason not to upgrade and unify on the latest io.dropwizard.metrics version?

@vdiravka
Copy link
Member Author

@vrozov Drill doesn't use io.dropwizard.metrics at all and it is in conflict with Drill's com.codahale.metrics (misspoke was in PR's description). Even Hive uses it only for own unit test, so there is no need to keep it in Drill for now.

@vrozov
Copy link
Member

vrozov commented Mar 27, 2018

Why not make Drill to use io.dropwizard.metrics instead of com.codahale.metrics? As far as I can see it is the same library (this is why it causes the conflict).

@vdiravka
Copy link
Member Author

@vrozov I understand what you mean: com.codahale isn't updated for a long time
https://mvnrepository.com/artifact/com.codahale.metrics/metrics-core,
but io.dropwizard.metrics is updated recently https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-core.

So we can switch into the last one. I will update my PR and let you know. Thank you.

@vrozov
Copy link
Member

vrozov commented Mar 27, 2018

@vdiravka right, check the first link, the new groupId for com.codahale.metrics is io.dropwizard.metrics, so all new versions will be deployed using the new groupId.

@vdiravka
Copy link
Member Author

@vrozov I have replaced com.codahale.metrics with last io.dropwizard.metrics.
Please review.

pom.xml Outdated
@@ -1164,7 +1164,27 @@
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>4.0.2</version>
<version>4.1.0-rc0</version>
Copy link
Member

Choose a reason for hiding this comment

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

define version as a property and avoid using rc version unless it provides a significant benefit.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, there is really no need to use rc version.
So the last stable 4.0.2. Let's choose this one.

pom.xml Outdated
@@ -1333,6 +1353,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
Copy link
Member

Choose a reason for hiding this comment

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

Where is the dependency used? Can it be replaced with the io.dropwizard.metrics?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought that Drill uses it. But I have checked and found that there is no direct using of this kind of metrics. Therefore 4 dependencies blocks can be removed.

And now com.yammer.metrics is a transitive dependency for Drill and is a intra-project dependency for hbase-server, and kafka_2.11. Since the dependency doesn't conflict with io.dropwizard it would be good just to control the version of it in dependency-management block to avoid issues in future.

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure why is it necessary to have com.yammer.metrics in dependencyManagement?

Copy link
Member Author

Choose a reason for hiding this comment

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

I meant that it can be useful if some new dependencies will have older transitive org.yummer.metrics in future.
But I do not mind, this isn't so important. Let's leave it without dependencyManagement control.

Copy link
Member Author

@vdiravka vdiravka left a comment

Choose a reason for hiding this comment

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

@vrozov Please review.
Once changes are good I will update JIra ticket description.

pom.xml Outdated
@@ -1164,7 +1164,27 @@
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>4.0.2</version>
<version>4.1.0-rc0</version>
Copy link
Member Author

Choose a reason for hiding this comment

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

ok, there is really no need to use rc version.
So the last stable 4.0.2. Let's choose this one.

pom.xml Outdated
@@ -1333,6 +1353,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
Copy link
Member Author

Choose a reason for hiding this comment

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

I thought that Drill uses it. But I have checked and found that there is no direct using of this kind of metrics. Therefore 4 dependencies blocks can be removed.

And now com.yammer.metrics is a transitive dependency for Drill and is a intra-project dependency for hbase-server, and kafka_2.11. Since the dependency doesn't conflict with io.dropwizard it would be good just to control the version of it in dependency-management block to avoid issues in future.

logical/pom.xml Outdated
@@ -85,14 +85,12 @@
</dependency>

<dependency>
<groupId>com.codahale.metrics</groupId>
<groupId>io.dropwizard.metrics</groupId>
Copy link
Member

Choose a reason for hiding this comment

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

Is it used in logical?

Copy link
Member Author

@vdiravka vdiravka Apr 25, 2018

Choose a reason for hiding this comment

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

No, it is not. Thanks for catching this.
Also I have noticed that java-exec uses io.dropwizard.metrics as transitive from drill-common.
For consistency I have removed io.dropwizard.metrics from drill-memory-base (it can leverage metrics from drill-common too).

Copy link
Member

Choose a reason for hiding this comment

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

It is not a best practice to rely on a transitive dependency for a compile scope dependency. I'd recommend specifying the dependency on io.dropwizard.metrics explicitly in case java-exec or drill-memory-base uses it.

@vrozov
Copy link
Member

vrozov commented Apr 25, 2018

Please update JIRA, PR and commit titles and squash commits.

@vdiravka vdiravka force-pushed the DRILL-6282 branch 2 times, most recently from 26e6a7f to 1fddec7 Compare April 25, 2018 20:28
- Replacing com.codahale.metrics with last io.dropwizard.metrics Metrics for Drill
- com.yammer.metrics is removed, since isn't used directly by Drill
@vdiravka vdiravka changed the title DRILL-6282: Excluding io.dropwizard.metrics dependencies DRILL-6282: Update Drill's Metrics dependencies Apr 25, 2018
Copy link
Member Author

@vdiravka vdiravka left a comment

Choose a reason for hiding this comment

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

@vrozov I have updated the PR.

pom.xml Outdated
@@ -1333,6 +1353,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
Copy link
Member Author

Choose a reason for hiding this comment

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

I meant that it can be useful if some new dependencies will have older transitive org.yummer.metrics in future.
But I do not mind, this isn't so important. Let's leave it without dependencyManagement control.

logical/pom.xml Outdated
@@ -85,14 +85,12 @@
</dependency>

<dependency>
<groupId>com.codahale.metrics</groupId>
<groupId>io.dropwizard.metrics</groupId>
Copy link
Member Author

@vdiravka vdiravka Apr 25, 2018

Choose a reason for hiding this comment

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

No, it is not. Thanks for catching this.
Also I have noticed that java-exec uses io.dropwizard.metrics as transitive from drill-common.
For consistency I have removed io.dropwizard.metrics from drill-memory-base (it can leverage metrics from drill-common too).

@vrozov
Copy link
Member

vrozov commented Apr 26, 2018

LGTM

vdiravka added a commit to vdiravka/drill that referenced this pull request Apr 27, 2018
- Replacing com.codahale.metrics with last io.dropwizard.metrics Metrics for Drill
- com.yammer.metrics is removed, since isn't used directly by Drill

closes apache#1189
vdiravka added a commit to vdiravka/drill that referenced this pull request Apr 27, 2018
- Replacing com.codahale.metrics with last io.dropwizard.metrics Metrics for Drill
- com.yammer.metrics is removed, since isn't used directly by Drill

closes apache#1189
@asfgit asfgit closed this in 56b943b Apr 29, 2018
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.

2 participants