Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion bin/hbase
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,17 @@ add_maven_deps_to_classpath() {
CLASSPATH=${CLASSPATH}:$(cat "${f}")
}

add_test_jars_from_compiled_source() {
# if in dev env, add test jars so that ITs/Chaos etc. can be run from compiled source directory
if $in_dev_env; then
for f in */target/*.jar; do
if [ -f "${f}" ]; then
CLASSPATH="${CLASSPATH}:${f}"
fi
done
fi
}

add_jdk17_jvm_flags() {
# Keep in sync with hbase-surefire.jdk17.flags in the root pom.xml
HBASE_OPTS="$HBASE_OPTS -Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true"
Expand Down Expand Up @@ -766,13 +777,17 @@ elif [ "$COMMAND" = "copyreppeers" ] ; then
CLASS='org.apache.hadoop.hbase.replication.CopyReplicationPeers'
else
CLASS=$COMMAND
if [[ "$CLASS" =~ .*IntegrationTest.* ]] ; then

if [[ "$CLASS" =~ .*IntegrationTest.* ]] || [[ "$CLASS" =~ .*Chaos.* ]]; then
for f in ${HBASE_HOME}/lib/test/*.jar; do
if [ -f "${f}" ]; then
CLASSPATH="${CLASSPATH}:${f}"
fi
done

add_test_jars_from_compiled_source
fi

fi

add_jdk17_jvm_flags
Expand Down
23 changes: 1 addition & 22 deletions hbase-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,8 @@
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-shaded-mapreduce</artifactId>
</dependency>
<!-- Intra-project dependencies -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-it</artifactId>
<type>test-jar</type>
</dependency>
<!-- Hamcrest is required by hbase-it (via junit), but as long as we're grabbing the hbase-it test-jar,
maven dependency resolution won't pick it up for us. -->
maven dependency resolution won't pick it up for us. -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
Expand All @@ -73,22 +67,11 @@
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-mapreduce</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-mapreduce</artifactId>
<type>test-jar</type>
</dependency>
<!-- To dump tools in hbase-procedure into cached_classpath.txt. -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-procedure</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-procedure</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-hadoop-compat</artifactId>
Expand All @@ -115,10 +98,6 @@
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-external-blockcache</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-testing-util</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-metrics-api</artifactId>
Expand Down
55 changes: 0 additions & 55 deletions hbase-assembly/src/main/assembly/client-components.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,60 +87,5 @@
<include>*.dylib</include>
</includes>
</fileSet>
<!-- This is only necessary until maven fixes the intra-project dependency bug
in maven 3.0. Until then, we have to include the test jars for sub-projects. When
fixed, the below dependencySet stuff is sufficient for pulling in the test jars as
well, as long as they are added as dependencies in this project. Right now, we only
have 1 submodule to accumulate, but we can copy/paste as necessary until maven is
fixed. -->
<!-- Used by PE and ltt -->
<fileSet>
<directory>${project.basedir}/../hbase-server/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${server.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-mapreduce/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${mapreduce.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-common/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${common.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-asyncfs/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${asyncfs.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-zookeeper/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${zookeeper.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-procedure/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${procedure.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
</fileSets>
</component>
3 changes: 3 additions & 0 deletions hbase-assembly/src/main/assembly/client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
<outputDirectory>lib</outputDirectory>
<dependencySets>
<dependencySet>
<useTransitiveFiltering>false</useTransitiveFiltering>
<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/ -->
Expand Down
70 changes: 0 additions & 70 deletions hbase-assembly/src/main/assembly/components.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,75 +109,5 @@
<include>**/*.h</include>
</includes>
</fileSet>
<!-- This is only necessary until maven fixes the intra-project dependency bug
in maven 3.0. Until then, we have to include the test jars for sub-projects. When
fixed, the below dependencySet stuff is sufficient for pulling in the test jars as
well, as long as they are added as dependencies in this project. Right now, we only
have 1 submodule to accumulate, but we can copy/paste as necessary until maven is
fixed. -->
<fileSet>
<directory>${project.basedir}/../hbase-server/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${server.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-it/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${it.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-annotations/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${annotations.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-common/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${common.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-mapreduce/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${mapreduce.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-asyncfs/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${asyncfs.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-zookeeper/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${zookeeper.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../hbase-procedure/target/</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>${procedure.test.jar}</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
</fileSets>
</component>
7 changes: 3 additions & 4 deletions hbase-assembly/src/main/assembly/hadoop-three-compat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<!-- Keep this list sorted by name -->
<include>org.apache.hbase:hbase-annotations</include>
<include>org.apache.hbase:hbase-asyncfs</include>
<include>org.apache.hbase:hbase-backup</include>
<include>org.apache.hbase:hbase-balancer</include>
Expand All @@ -43,7 +42,6 @@
<include>org.apache.hbase:hbase-external-blockcache</include>
<include>org.apache.hbase:hbase-hadoop-compat</include>
<include>org.apache.hbase:hbase-http</include>
<include>org.apache.hbase:hbase-it</include>
<include>org.apache.hbase:hbase-logging</include>
<include>org.apache.hbase:hbase-mapreduce</include>
<include>org.apache.hbase:hbase-diagnostics</include>
Expand All @@ -55,7 +53,6 @@
<include>org.apache.hbase:hbase-rest</include>
<include>org.apache.hbase:hbase-server</include>
<include>org.apache.hbase:hbase-shell</include>
<include>org.apache.hbase:hbase-testing-util</include>
<include>org.apache.hbase:hbase-thrift</include>
<include>org.apache.hbase:hbase-zookeeper</include>
</includes>
Expand All @@ -65,7 +62,10 @@
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<useTransitiveFiltering>false</useTransitiveFiltering>
<excludes>
<exclude>org.apache.hadoop:*:test-jar</exclude>
<exclude>org.apache.hbase:*:test-jar</exclude>
<!-- Exclude pom file -->
<exclude>com.sun.xml.ws:jaxws-ri:pom</exclude>
<!-- Exclude libraries that we put in their own dirs under lib/ -->
Expand Down Expand Up @@ -206,7 +206,6 @@
<include>io.opentelemetry.javaagent:*</include>
</includes>
</dependencySet>

<!-- Adds junit libs to lib/test -->
<dependencySet>
<outputDirectory>lib/test</outputDirectory>
Expand Down
1 change: 1 addition & 0 deletions hbase-endpoint/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minicluster</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
Expand Down
1 change: 1 addition & 0 deletions hbase-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minicluster</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.xml.bind.</groupId>
Expand Down
2 changes: 2 additions & 0 deletions hbase-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minicluster</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.xml.bind</groupId>
Expand All @@ -389,6 +390,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minikdc</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
Expand Down
2 changes: 2 additions & 0 deletions hbase-shell/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minicluster</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
Expand All @@ -209,6 +210,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minikdc</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
Expand Down
1 change: 1 addition & 0 deletions hbase-thrift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minicluster</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
Expand Down
11 changes: 0 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -937,17 +937,6 @@
<jacoco.version>0.8.8</jacoco.version>
<jacocoArgLine/>
<sonar-maven-plugin.version>3.9.1.2184</sonar-maven-plugin.version>
<!-- Intraproject jar naming properties -->
<!-- TODO this is pretty ugly, but works for the moment.
Modules are pretty heavy-weight things, so doing this work isn't too bad. -->
<server.test.jar>hbase-server-${project.version}-tests.jar</server.test.jar>
<common.test.jar>hbase-common-${project.version}-tests.jar</common.test.jar>
<procedure.test.jar>hbase-procedure-${project.version}-tests.jar</procedure.test.jar>
<it.test.jar>hbase-it-${project.version}-tests.jar</it.test.jar>
<annotations.test.jar>hbase-annotations-${project.version}-tests.jar</annotations.test.jar>
<mapreduce.test.jar>hbase-mapreduce-${project.version}-tests.jar</mapreduce.test.jar>
<zookeeper.test.jar>hbase-zookeeper-${project.version}-tests.jar</zookeeper.test.jar>
<asyncfs.test.jar>hbase-asyncfs-${project.version}-tests.jar</asyncfs.test.jar>
<shell-executable>bash</shell-executable>
<surefire.provider>surefire-junit47</surefire.provider>
<!-- default: run small & medium, medium with 2 threads -->
Expand Down