Fix dependency analyze warnings#8230
Conversation
e6505ec to
bde2c83
Compare
Update the maven dependency plugin to the latest version and fix all warnings for unused declared and used undeclared dependencies in the compile scope. Added new travis job to add the check to CI. Also fixed some source code files to use the correct packages for their imports and updated druid-forbidden-apis to prevent regressions.
bde2c83 to
54c63d8
Compare
|
@Dylan1312 This PR undoes some of the changes in #8339 by re-adding |
| README.BINARY | ||
| README | ||
| LICENSE.BINARY | ||
| LICENSES.BINARY |
There was a problem hiding this comment.
I think LICENSES.BINARY could be removed, we only have LICENSE.BINARY
| <dependency> | ||
| <groupId>com.google.code.findbugs</groupId> | ||
| <artifactId>jsr305</artifactId> | ||
| <version>2.0.1</version> |
There was a problem hiding this comment.
Does this need version 2.0.1 specifically here?
There was a problem hiding this comment.
Removed version here since it's inherited from the root pom
|
@ccaominh Could you please post a diff of the binary archive (run |
| Apache Commons Lang | ||
| Copyright 2001-2019 The Apache Software Foundation | ||
|
|
||
| This product includes software developed at |
There was a problem hiding this comment.
You can remove the "This product includes.." block: http://www.apache.org/dev/licensing-howto.html#bundle-asf-product
|
Diff of distribution before and after this PR ( |
|
@ccaominh I looked at the first couple of extensions and at
Suspicious because the avro extension should include avro.
Suspicious because slf4j-api should be provided by core & not needed in extensions.
Suspicious because guava should be provided by core & not needed in extensions.
Suspicious because jsr305 should be provided by core & not needed in extensions.
Should all be provided by core.
log4j shouldn't be included; Druid uses log4j2 for logging. If we have dependencies that are written against log4j then we should swap in
Should be provided by core.
Mildly suspicious to me, since I don't know what these do or if they're necessary.
Should be provided by core.
This was removed -- were we not using it?
Why the downgrade?
Were we not using this?
Were we not using this? |
|
Updated diff of the druid distribution before/after the changes in this PR:
There are no references to There are no references to I believe After the changes in this PR, the druid distribution |
|
Updated diff after resolving merge conflicts (diff is same as #8230 (comment), except druid version is now 0.17.0): |
|
I tried running this patch with the hadoop tutorial, getting the following error on service startup: |
|
I've manually tested the latest commit with the following tutorials:
Updated diff of distribution: |
| - io.netty: netty-codec-http | ||
| - io.netty: netty-common | ||
| - io.netty: netty-handler | ||
| - io.netty: netty-transport |
There was a problem hiding this comment.
There is already an entry for this version of Netty, https://github.com/apache/incubator-druid/blob/557f2cc0395c6f9b1082ee8a7742b70664dba45a/licenses.yaml#L761. Additionally, Netty has a NOTICE, I think we need to add the text of it from this version similar to how 4.1.29 is.
There was a problem hiding this comment.
Actually, are there still 4.1.29 jars in distribution package?
There was a problem hiding this comment.
There's a mix of netty4 versions.
Before my changes:
netty-all-4.1.30.Final.jar
netty-buffer-4.1.29.Final.jar
netty-codec-4.1.29.Final.jar
netty-codec-dns-4.1.29.Final.jar
netty-codec-http-4.1.29.Final.jar
netty-codec-socks-4.1.29.Final.jar
netty-common-4.1.29.Final.jar
netty-handler-4.1.29.Final.jar
netty-handler-proxy-4.1.29.Final.jar
netty-resolver-4.1.29.Final.jar
netty-resolver-dns-4.1.29.Final.jar
netty-transport-4.1.29.Final.jar
netty-transport-native-epoll-4.1.29.Final-linux-x86_64.jar
netty-transport-native-unix-common-4.1.29.Final.jar
After my changes:
netty-buffer-4.1.30.Final.jar
netty-codec-4.1.30.Final.jar
netty-codec-dns-4.1.29.Final.jar
netty-codec-http-4.1.30.Final.jar
netty-codec-socks-4.1.29.Final.jar
netty-common-4.1.30.Final.jar
netty-handler-4.1.30.Final.jar
netty-handler-proxy-4.1.29.Final.jar
netty-resolver-4.1.29.Final.jar
netty-resolver-dns-4.1.29.Final.jar
netty-transport-4.1.30.Final.jar
netty-transport-native-epoll-4.1.29.Final-linux-x86_64.jar
netty-transport-native-unix-common-4.1.29.Final.jar
I'll fix it so the same version gets used.
There was a problem hiding this comment.
Got it, thanks. Also it looks like notice between 2 versions is identical, so maybe is ok to not have it twice.
There was a problem hiding this comment.
Still should consolidate the two 4.1.30.Final entries i think though
|
I think the latest jar changes look ok to me. #8405 must have pulled in a lot of extra dependencies to the orc extension, it looked like this as of 0.15.1 so the large amount it is losing there should be ok. |
|
Updated diff of distribution: |
|
I tested that orc hadoop indexing is still functional after these changes, 👍 |
|
This seems like it would clean up distribution jars so I'm going to backport to 0.16-incubating, which also involves pulling in #8405 since it went in first. |
* Fix dependency analyze warnings Update the maven dependency plugin to the latest version and fix all warnings for unused declared and used undeclared dependencies in the compile scope. Added new travis job to add the check to CI. Also fixed some source code files to use the correct packages for their imports and updated druid-forbidden-apis to prevent regressions. * Address review comments * Adjust scope for org.glassfish.jaxb:jaxb-runtime * Fix dependencies for hdfs-storage * Consolidate netty4 versions
* Fix dependency analyze warnings Update the maven dependency plugin to the latest version and fix all warnings for unused declared and used undeclared dependencies in the compile scope. Added new travis job to add the check to CI. Also fixed some source code files to use the correct packages for their imports and updated druid-forbidden-apis to prevent regressions. * Address review comments * Adjust scope for org.glassfish.jaxb:jaxb-runtime * Fix dependencies for hdfs-storage * Consolidate netty4 versions
* Fix dependency analyze warnings Update the maven dependency plugin to the latest version and fix all warnings for unused declared and used undeclared dependencies in the compile scope. Added new travis job to add the check to CI. Also fixed some source code files to use the correct packages for their imports and updated druid-forbidden-apis to prevent regressions. * Address review comments * Adjust scope for org.glassfish.jaxb:jaxb-runtime * Fix dependencies for hdfs-storage * Consolidate netty4 versions
This change adds a dependency which is only present in hadoop 2.8.3. This reverts commit dd3733d.
Description
Update the maven dependency plugin to the latest version and fix all
warnings for unused declared and used undeclared dependencies in the
compile scope. Added new travis job to add the check to CI. Also fixed
some source code files to use the correct packages for their imports and
updated druid-forbidden-apis to prevent regressions.
Note: #8128 previously attempted to make this change, but was reverted as it resulted in several runtime errors. This second attempt changes the
scopeof several dependencies toruntimeinstead of removing them entirely. This change was tested in a local cluster (data was ingested via a local firehose and queried) and no exceptions were observed in the cluster logs.This PR has: