This is an automated email from the ASF dual-hosted git repository. michaelsmith pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 7fb6a9a1d2e5f524498848502da372a8a5965268 Author: Michael Smith <[email protected]> AuthorDate: Thu Jul 20 15:45:14 2023 -0700 IMPALA-11941: (Addendum) Use released jamm 0.4.0 Switches to the 0.4.0 release of jamm, as building a shaded JAR from source was a temporary measure. Change-Id: I5b88b479580f7d0baff502ad9551d2764971babf Reviewed-on: http://gerrit.cloudera.org:8080/20237 Reviewed-by: Laszlo Gaal <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- be/src/common/init.cc | 4 +- bin/run-all-tests.sh | 2 +- fe/pom.xml | 12 ++---- java/.gitignore | 1 - java/CMakeLists.txt | 20 +-------- java/pom.xml | 1 - java/shaded-deps/jamm/.gitignore | 1 - java/shaded-deps/jamm/pom.xml | 64 ----------------------------- java/toolchains.xml.tmpl | 35 ---------------- tests/verifiers/test_banned_log_messages.py | 3 -- 10 files changed, 7 insertions(+), 136 deletions(-) diff --git a/be/src/common/init.cc b/be/src/common/init.cc index 8229f0a08..3409dde52 100644 --- a/be/src/common/init.cc +++ b/be/src/common/init.cc @@ -351,11 +351,11 @@ static Status JavaAddJammAgent() { istringstream classpath {getenv("CLASSPATH")}; string jamm_path, test_path; while (getline(classpath, test_path, ':')) { - jamm_path = FileSystemUtil::FindFileInPath(test_path, "impala-jamm-.*.jar"); + jamm_path = FileSystemUtil::FindFileInPath(test_path, "jamm-.*.jar"); if (!jamm_path.empty()) break; } if (jamm_path.empty()) { - return Status("Could not find impala-jamm-*.jar in Java CLASSPATH"); + return Status("Could not find jamm-*.jar in Java CLASSPATH"); } val_out << "-javaagent:" << jamm_path; diff --git a/bin/run-all-tests.sh b/bin/run-all-tests.sh index 81be57ae0..8f419c777 100755 --- a/bin/run-all-tests.sh +++ b/bin/run-all-tests.sh @@ -245,7 +245,7 @@ do pushd "${IMPALA_FE_DIR}" # Add Jamm as javaagent for CatalogdMetaProviderTest.testWeights - JAMM_JAR=$(compgen -G ${IMPALA_HOME}/fe/target/dependency/impala-jamm-*.jar) + JAMM_JAR=$(compgen -G ${IMPALA_HOME}/fe/target/dependency/jamm-*.jar) export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS-} -javaagent:${JAMM_JAR}" if $JAVA -version 2>&1 | grep -q -E ' version "(9|[1-9][0-9])\.'; then diff --git a/fe/pom.xml b/fe/pom.xml index 3b9fd5fab..b817f3fb9 100644 --- a/fe/pom.xml +++ b/fe/pom.xml @@ -364,15 +364,9 @@ under the License. </dependency> <dependency> - <groupId>org.apache.impala</groupId> - <artifactId>impala-jamm</artifactId> - <version>${project.version}</version> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> + <groupId>com.github.jbellis</groupId> + <artifactId>jamm</artifactId> + <version>0.4.0</version> </dependency> <dependency> diff --git a/java/.gitignore b/java/.gitignore deleted file mode 100644 index 173495683..000000000 --- a/java/.gitignore +++ /dev/null @@ -1 +0,0 @@ -jamm-prefix/ diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index c39cee3b6..d26c4614e 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -19,24 +19,6 @@ add_custom_target(validate_java_pom_versions ALL COMMAND $ENV{IMPALA_HOME}/bin/validate-java-pom-versions.sh ) -SET(JAMM_MAVEN_FLAGS --show-version --batch-mode) -# Discover and download dependencies in parallel, using 10 threads -SET(JAMM_MAVEN_FLAGS ${JAMM_MAVEN_FLAGS} -Daether.dependencyCollector.impl=bf) -SET(JAMM_MAVEN_FLAGS ${JAMM_MAVEN_FLAGS} -Daether.connector.basic.threads=10) -SET(JAMM_MAVEN_FLAGS ${JAMM_MAVEN_FLAGS} -Daether.dependencyCollector.bf.threads=10) - -include(ExternalProject) -ExternalProject_Add(jamm - GIT_REPOSITORY https://github.com/jbellis/jamm - # 0.4.0 RC. A release is expected soon: https://github.com/jbellis/jamm/issues/44 - GIT_TAG 49c3e691c43a39ddaccaf19839ef316807009377 - PATCH_COMMAND sed -i.bak s/0.4.0-SNAPSHOT/0.4.0-IMPALA/ pom.xml - CONFIGURE_COMMAND sed s:JAVA_HOME:$ENV{JAVA_HOME}:g ${CMAKE_CURRENT_SOURCE_DIR}/toolchains.xml.tmpl > toolchains.xml - BUILD_IN_SOURCE true - BUILD_COMMAND mvn install ${JAMM_MAVEN_FLAGS} --toolchains toolchains.xml -Dmaven.test.skip=true -DskipTests - INSTALL_COMMAND "" -) - -add_custom_target(java ALL DEPENDS gen-deps function-registry geospatial-udf-wrappers validate_java_pom_versions jamm +add_custom_target(java ALL DEPENDS gen-deps function-registry geospatial-udf-wrappers validate_java_pom_versions COMMAND $ENV{IMPALA_HOME}/bin/mvn-quiet.sh -B install -DskipTests ) diff --git a/java/pom.xml b/java/pom.xml index 29a8a7c3b..76364f06d 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -370,7 +370,6 @@ under the License. <module>../fe</module> <module>query-event-hook-api</module> <module>shaded-deps/hive-exec</module> - <module>shaded-deps/jamm</module> <module>shaded-deps/s3a-aws-sdk</module> <module>TableFlattener</module> <module>test-hive-udfs</module> diff --git a/java/shaded-deps/jamm/.gitignore b/java/shaded-deps/jamm/.gitignore deleted file mode 100644 index 916e17c09..000000000 --- a/java/shaded-deps/jamm/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dependency-reduced-pom.xml diff --git a/java/shaded-deps/jamm/pom.xml b/java/shaded-deps/jamm/pom.xml deleted file mode 100644 index 345b762a4..000000000 --- a/java/shaded-deps/jamm/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. See accompanying LICENSE file. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- This pom shades an unreleased version of jamm, as others need the JAR available to - use Impala jars. --> - <parent> - <groupId>org.apache.impala</groupId> - <artifactId>impala-parent</artifactId> - <version>4.3.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>impala-jamm</artifactId> - <packaging>jar</packaging> - - <dependencies> - <dependency> - <groupId>com.github.jbellis</groupId> - <artifactId>jamm</artifactId> - <version>0.4.0-IMPALA</version> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <artifactId>maven-shade-plugin</artifactId> - <version>3.4.1</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <transformers> - <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <manifestEntries> - <Premain-Class>org.github.jamm.MemoryMeter</Premain-Class> - </manifestEntries> - </transformer> - </transformers> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/java/toolchains.xml.tmpl b/java/toolchains.xml.tmpl deleted file mode 100644 index c5e0215ef..000000000 --- a/java/toolchains.xml.tmpl +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<toolchains> - <!-- Provide toolchain entries for all versions Jamm expects. We don't actually use - 11 or 17 to build or run tests however, so what they point to doesn't matter. --> - <toolchain> - <type>jdk</type> - <provides> - <version>1.8</version> - <vendor>Oracle Corporation</vendor> - </provides> - <configuration> - <jdkHome>JAVA_HOME</jdkHome> - </configuration> - </toolchain> - <toolchain> - <type>jdk</type> - <provides> - <version>11</version> - <vendor>Oracle Corporation</vendor> - </provides> - <configuration> - <jdkHome>JAVA_HOME</jdkHome> - </configuration> - </toolchain> - <toolchain> - <type>jdk</type> - <provides> - <version>17</version> - <vendor>Oracle Corporation</vendor> - </provides> - <configuration> - <jdkHome>JAVA_HOME</jdkHome> - </configuration> - </toolchain> -</toolchains> diff --git a/tests/verifiers/test_banned_log_messages.py b/tests/verifiers/test_banned_log_messages.py index 627434139..1f4d52162 100644 --- a/tests/verifiers/test_banned_log_messages.py +++ b/tests/verifiers/test_banned_log_messages.py @@ -33,9 +33,6 @@ class TestBannedLogMessages(ImpalaTestSuite): def assert_message_absent(self, message, log_dir=os.environ["IMPALA_LOGS_DIR"]): for root, _, files in os.walk(log_dir): for file in files: - if file == 'mvn.log': - # Skip mvn.log as some builds warn about extra shaded classes - continue log_file_path = os.path.join(root, file) returncode = subprocess.call(['grep', message, log_file_path]) assert returncode == 1, "%s contains '%s'" % (log_file_path, message)
