-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-29016 Refactor assembly creation to use only DependencySets and… #6519
Changes from 5 commits
9b2059c
92b7780
e19a9a3
110f3dd
c064868
94734e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,55 +31,10 @@ | |
<baseDirectory>hbase-${project.version}-client</baseDirectory> | ||
<componentDescriptors> | ||
<componentDescriptor>src/main/assembly/client-components.xml</componentDescriptor> | ||
<!-- Not that everything below is an exact copy of hadoop-three-compat.xml | ||
Unless differences are introduced on purpose, this should be kept in sync with | ||
hadoop-three-compat.xml --> | ||
</componentDescriptors> | ||
<moduleSets> | ||
<!-- include regular jars so the shell can use them --> | ||
<moduleSet> | ||
<useAllReactorProjects>true</useAllReactorProjects> | ||
<includes> | ||
<include>org.apache.hbase:hbase-shell</include> | ||
</includes> | ||
<binaries> | ||
<unpack>false</unpack> | ||
<outputDirectory>lib</outputDirectory> | ||
<dependencySets> | ||
<dependencySet> | ||
<excludes> | ||
<exclude>org.apache.hadoop:*:test-jar</exclude> | ||
<exclude>org.apache.hbase:*:test-jar</exclude> | ||
<!-- Exclude J2EE libraries that get pulled in when building on JDK11 --> | ||
<exclude>com.sun.xml.ws:jaxws-ri</exclude> | ||
<!-- Exclude libraries that we put in their own dirs under lib/ --> | ||
<exclude>org.jruby:jruby-complete</exclude> | ||
<exclude>com.sun.jersey:*</exclude> | ||
<exclude>com.sun.jersey.contribs:*</exclude> | ||
<exclude>jline:jline</exclude> | ||
<exclude>junit:junit</exclude> | ||
<exclude>com.github.stephenc.findbugs:findbugs-annotations</exclude> | ||
<exclude>commons-logging:commons-logging</exclude> | ||
<exclude>log4j:log4j</exclude> | ||
<exclude>org.apache.hbase:hbase-shaded-client</exclude> | ||
<exclude>org.apache.hbase:hbase-shaded-client-byo-hadoop</exclude> | ||
<exclude>org.apache.hbase:hbase-shaded-mapreduce</exclude> | ||
<exclude>org.apache.htrace:htrace-core4</exclude> | ||
<exclude>org.apache.htrace:htrace-core</exclude> | ||
<exclude>org.apache.yetus:audience-annotations</exclude> | ||
<exclude>org.slf4j:*</exclude> | ||
<exclude>org.apache.logging.log4j:*</exclude> | ||
<exclude>io.opentelemetry.javaagent:*</exclude> | ||
<exclude>org.hamcrest:hamcrest-core</exclude> | ||
<exclude>org.mockito:mockito-core</exclude> | ||
<!-- Exclude transitive dependencies of tomcat-jasper, not needed at runtime --> | ||
<exclude>org.apache.tomcat:tomcat-juli</exclude> | ||
<exclude>org.apache.tomcat:tomcat-api</exclude> | ||
<exclude>org.apache.tomcat:tomcat-util-scan</exclude> | ||
<exclude>org.apache.tomcat:tomcat-util</exclude> | ||
</excludes> | ||
</dependencySet> | ||
</dependencySets> | ||
</binaries> | ||
</moduleSet> | ||
</moduleSets> | ||
<!-- Include the generated LICENSE and NOTICE files --> | ||
<files> | ||
<file> | ||
|
@@ -104,24 +59,47 @@ | |
|
||
<dependencySets> | ||
<dependencySet> | ||
<outputDirectory>lib/shaded-clients</outputDirectory> | ||
<includes> | ||
<include>org.apache.hbase:hbase-shaded-client</include> | ||
<include>org.apache.hbase:hbase-shaded-mapreduce</include> | ||
<include>org.apache.hbase:hbase-shaded-client-byo-hadoop</include> | ||
</includes> | ||
<outputDirectory>lib</outputDirectory> | ||
<useTransitiveDependencies>true</useTransitiveDependencies> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Synced to the other xml |
||
<!-- Exclude artifacts added in the sub-directories to avoid duplication --> | ||
<excludes> | ||
<!-- Exclude the shaded jars that go in the lib/shaded-clients directory --> | ||
<exclude>org.apache.hbase:hbase-shaded-client</exclude> | ||
<exclude>org.apache.hbase:hbase-shaded-mapreduce</exclude> | ||
<exclude>org.apache.hbase:hbase-shaded-client-byo-hadoop</exclude> | ||
<!-- Exclude the Ruby jar that goes in the lib/ruby directory --> | ||
<exclude>org.jruby:jruby-complete</exclude> | ||
<!-- Exclude jars that go into the lib/client-facing-thirdparty directory --> | ||
<exclude>com.github.stephenc.findbugs:findbugs-annotations</exclude> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so the excludes block should be kept in sync with any dependencies we add in a sub folder of lib. may be add a note somewhere to avoid dependencies getting duplicated? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea. |
||
<exclude>commons-logging:commons-logging</exclude> | ||
<exclude>log4j:log4j</exclude> | ||
<exclude>org.apache.htrace:htrace-core4</exclude> | ||
<exclude>org.apache.htrace:htrace-core</exclude> | ||
<exclude>org.apache.yetus:audience-annotations</exclude> | ||
<exclude>org.slf4j:*</exclude> | ||
<exclude>org.apache.logging.log4j:*</exclude> | ||
<!-- TODO shouldn't we also exclude duplicate io.opentelemetry.* jars which are added to client-facing-thirdparty ? --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @stoty any reason for not excluding io.opentelemetry.* here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't 100% sure that the current version doesn't do this on purpose, and I wanted to minimize the changes. We can add the exclusion here, or we can open a follow-up ticket for that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sound good either ways |
||
<!-- Exclude the opentelemetry agent that goes in the lib/trace directory --> | ||
<exclude>io.opentelemetry.javaagent:*</exclude> | ||
<!-- Exclude jline2 which goes into lib/zk-client. jline3 is a different artifact--> | ||
<exclude>jline:jline</exclude> | ||
<!-- These two exclusions are added here to preserve previous behaviour, and are not included in sub-directories --> | ||
<!-- TODO investigate using the provided mechanism for these --> | ||
<exclude>com.sun.jersey:*</exclude> | ||
<exclude>com.sun.jersey.contribs:*</exclude> | ||
<!-- FIXME remove when jaxws-ri is removed from assembly --> | ||
<exclude>com.sun.xml.ws:jaxws-ri:pom</exclude> | ||
</excludes> | ||
</dependencySet> | ||
<!-- Add jruby-complete to hbase_home/lib/ruby. | ||
Update JRUBY_PACKAGED_WITH_HBASE in bin/hbase and hbase.cmd if you would like to update outputDirectory below --> | ||
<!-- Add jruby-complete to hbase_home/lib/ruby. | ||
Update JRUBY_PACKAGED_WITH_HBASE in bin/hbase and hbase.cmd if you would like to update outputDirectory below --> | ||
<dependencySet> | ||
<outputDirectory>lib/ruby</outputDirectory> | ||
<includes> | ||
<include>org.jruby:jruby-complete</include> | ||
</includes> | ||
</dependencySet> | ||
<!-- Include third party dependencies the shaded clients expose in the lib directory | ||
N.B. this will conflict with the omnibus tarball but these should be precisely | ||
the same artifacts so blind overwrite of either should be fine. | ||
--> | ||
<dependencySet> | ||
<outputDirectory>lib/client-facing-thirdparty</outputDirectory> | ||
|
@@ -152,6 +130,7 @@ | |
tarball in a different build. | ||
--> | ||
<includes> | ||
<!-- TODO Review and remove entries that are not present in any supported HBase and Hadoop version --> | ||
<include>com.github.stephenc.findbugs:findbugs-annotations</include> | ||
<include>commons-logging:commons-logging</include> | ||
<include>log4j:log4j</include> | ||
|
@@ -163,12 +142,26 @@ | |
<include>io.opentelemetry:*</include> | ||
</includes> | ||
</dependencySet> | ||
<dependencySet> | ||
<outputDirectory>lib/shaded-clients</outputDirectory> | ||
<includes> | ||
<include>org.apache.hbase:hbase-shaded-client</include> | ||
<include>org.apache.hbase:hbase-shaded-mapreduce</include> | ||
<include>org.apache.hbase:hbase-shaded-client-byo-hadoop</include> | ||
</includes> | ||
</dependencySet> | ||
<dependencySet> | ||
<outputDirectory>lib/zkcli</outputDirectory> | ||
<includes> | ||
<!-- This is jline2 --> | ||
<include>jline:jline</include> | ||
</includes> | ||
</dependencySet> | ||
<dependencySet> | ||
<outputDirectory>lib/trace</outputDirectory> | ||
<includes> | ||
<include>io.opentelemetry.javaagent:*</include> | ||
</includes> | ||
</dependencySet> | ||
</dependencySets> | ||
|
||
</assembly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, let's just remove the optional flag in hbase-external-blockcache's pom file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took another look at this.
I guess that the original intent was to NOT include it in the assembly, it just got lost somehow.
The last version is also from 2017, so this doesn't look a maintaned library.
Based on the comments, getting this right is far from trivial, and this probably has few users, so it might be better to keep it optional, and just leave it out from assembly.
That way most users will get less JARs, and the few (if any) users of it would have to provide it themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we can do the removal in another ticket, so that it's better documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have opened a [DISCUSS] thread for spymemcached removal.