Repository navigation
HDDS-17775. Remove commons-io, kerby-util and unrelocated macOS natives from the Ozone filesystem jar - #12008
Merged
Merged
Conversation
…es from the Ozone filesystem jar Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@adoroszlai @jojochuang could you please take a look? |
yandrey321
marked this pull request as draft
November 10, 2026 17:06
Contributor
Author
|
green CI build: https://github.com/yandrey321/ozone/actions/runs/42860242078 |
adoroszlai
marked this pull request as ready for review
November 10, 2026 18:42
adoroszlai
approved these changes
Nov 10, 2026
Contributor
|
Thanks @yandrey321 for the patch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Problem: Since 2.2.0,
ozone-filesystem-hadoop3picked up two libraries that each serve a single call, plus two native libraries that cannot load:commons-io(512 KB compressed, 428 classes).hdds-clientdeclares it for oneIOUtils.closeQuietly(sock)inDomainSocketFactory.kerby-util(31 KB).ozone-commondeclares it forHex.encodeinAWSV4AuthValidator.liborg_apache_ratis_thirdparty_netty_transport_native_kqueue_aarch_64.jniliband..._resolver_dns_native_macos_aarch_64.jnilib. ratis-thirdparty 1.1.1 added these, butozonefs-shadedrenames and excludes only the x86_64 variants. They ship under their Ratis names, which the relocated classes don't look for, so on Apple-silicon macOS the shaded Ratis netty can't load its kqueue transport or its native DNS resolver.Implementation idea:
DomainSocketFactoryuses Ozone'sorg.apache.hadoop.hdds.utils.IOUtils.closeQuietly. Removecommons-iofromhadoop-hdds/client/pom.xml.AWSV4AuthValidatoruses Hadoop'sStringUtils.byteToHexString; the class already imports HadoopStringUtils. Removekerby-utilfromhadoop-ozone/common/pom.xml.TestHmacSha256moves to the same method.ozonefs-shaded/pom.xml, addcopy-rename-maven-pluginentries and shade excludes for the two aarch_64 natives, alongside the existing x86_64 entries.Key decisions:
StringUtils.byteToHexStringrather than Guava'sBaseEncoding, so the change adds no import and no dependency. Its output is identical to kerby'sHex.encode(lowercase, no separators), checked for all 256 byte values and for empty input. Ozone'shdds.StringUtils.bytes2Hexwas rejected, because it produces uppercase hex with spaces and would break S3 signature validation.java.util.HexFormatis not available, becauseozone-commontargets Java 8.hadoop-common, which the shaded jar already excludes.Side effects:
ozone-filesystem-hadoop3is 543 KB smaller (compressed) and has about 450 fewer entries.s3gatewaykeeps its ownkerby-utildependency, and the distLICENSE.txtdoes not change: both libraries still ship with the servers.Co-authored-by: Claude Opus 5.5 noreply@anthropic.com
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17775
How was this patch tested?
Unit + integration tests. CI: https://github.com/yandrey321/ozone/actions/runs/42860242078
org/apache/ozone/shaded/org/apache/commons/ioor.../kerbyentries remain.liborg_apache_ratis_thirdparty_*natives remain.mvn dependency:tree -pl :ozone-filesystem-shaded -Dincludes=commons-io,org.apache.kerbyis empty.isAvailable()on the shaded Ratis nettyKQueueandMacOSDnsServerAddressStreamProvider:KQueue.isAvailable()UnsatisfiedLinkError)MacOSDnsServerAddressStreamProvider.isAvailable()UnsatisfiedLinkError)