adoroszlai commented on code in PR #10419:
URL: https://github.com/apache/ozone/pull/10419#discussion_r3594558642
##########
hadoop-ozone/common/pom.xml:
##########
@@ -227,6 +235,20 @@
</annotationProcessors>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <ignoredUnusedDeclaredDependencies>
+ <!--
+ OMConfigKeys references
ManagedCompactRangeOptions.BottommostLevelCompaction, an enum
+ inherited from org.rocksdb.CompactRangeOptions. Bytecode
resolves it to the rocksdb
+ class, so the analyzer does not see the hdds-managed-rocksdb
reference.
+ -->
+
<ignoredUnusedDeclaredDependency>org.apache.ozone:hdds-managed-rocksdb:jar</ignoredUnusedDeclaredDependency>
Review Comment:
Thanks @ptlrs for updating the patch.
> Also, the maven verify command is incorrectly flagging an unused
dependency. It only sees the transitive dependency's usage as per the bytecode
and ignores the parent dependency's direct usage.
A better way to fix it is:
- allow usage of `CompactRangeOptions.BottommostLevelCompaction`, since it's
just an `enum`, safe to use directly:
https://github.com/apache/ozone/blob/1a9439452d9aae2ffd9ed4d20e8ac1f3a9f98864/pom.xml#L1967-L1969
- import and use `CompactRangeOptions.BottommostLevelCompaction` (in
`OMConfigKeys` and elsewhere) instead of
`ManagedCompactRangeOptions.BottommostLevelCompaction`
- remove unused dependency `hdds-managed-rocksdb` from
`hadoop-ozone/common/pom.xml`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]