Skip to content

Conversation

slfan1989
Copy link
Contributor

@slfan1989 slfan1989 commented Oct 1, 2024

Description of PR

JIRA: HADOOP-19298. [JDK17] Add a JDK17 profile.

Using this profile, we can compile a JDK 17 version of Hadoop locally (without native).

I will also try to compile on other build platforms.

How was this patch tested?

Mac with x86_64

  • compilation command
mvn clean package -Pdist -Dtar -DskipTests -Dmaven.javadoc.skip=false -Pjdk17 -Djavac.version=17
  • maven
Maven home: /Users/slfan1989/Soft/maven-2/apache-maven-3.6.3
Java version: 17.0.11, vendor: Amazon.com Inc., runtime: /Users/slfan1989/Soft/jdk17/amazon-corretto-17.jdk/Contents/Home
OS name: "mac os x", version: "14.4.1", arch: "x86_64", family: "mac"
  • JDK
openjdk version "17.0.11" 2024-04-16 LTS
OpenJDK Runtime Environment Corretto-17.0.11.9.1 (build 17.0.11+9-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.11.9.1 (build 17.0.11+9-LTS, mixed mode, sharing)
  • result
[INFO] Reactor Summary for Apache Hadoop Main 3.5.0-SNAPSHOT:
[INFO] 
[INFO] Apache Hadoop Main ................................. SUCCESS [  2.547 s]
[INFO] Apache Hadoop Build Tools .......................... SUCCESS [  2.772 s]
[INFO] Apache Hadoop Project POM .......................... SUCCESS [  1.999 s]
[INFO] Apache Hadoop Annotations .......................... SUCCESS [  5.580 s]
[INFO] Apache Hadoop Assemblies ........................... SUCCESS [  0.414 s]
[INFO] Apache Hadoop Project Dist POM ..................... SUCCESS [  2.273 s]
[INFO] Apache Hadoop Maven Plugins ........................ SUCCESS [ 12.175 s]
[INFO] Apache Hadoop MiniKDC .............................. SUCCESS [  5.661 s]
[INFO] Apache Hadoop Auth ................................. SUCCESS [ 20.062 s]
[INFO] Apache Hadoop Auth Examples ........................ SUCCESS [  5.331 s]
[INFO] Apache Hadoop Common ............................... SUCCESS [01:41 min]
[INFO] Apache Hadoop NFS .................................. SUCCESS [ 16.019 s]
[INFO] Apache Hadoop KMS .................................. SUCCESS [ 13.551 s]
[INFO] Apache Hadoop Registry ............................. SUCCESS [ 17.836 s]
[INFO] Apache Hadoop Common Project ....................... SUCCESS [  0.075 s]
[INFO] Apache Hadoop HDFS Client .......................... SUCCESS [ 54.497 s]
[INFO] Apache Hadoop HDFS ................................. SUCCESS [01:31 min]
[INFO] Apache Hadoop HDFS Native Client ................... SUCCESS [  6.912 s]
[INFO] Apache Hadoop HttpFS ............................... SUCCESS [ 20.820 s]
[INFO] Apache Hadoop HDFS-NFS ............................. SUCCESS [ 13.509 s]
[INFO] Apache Hadoop YARN ................................. SUCCESS [  0.114 s]
[INFO] Apache Hadoop YARN API ............................. SUCCESS [ 38.558 s]
[INFO] Apache Hadoop YARN Common .......................... SUCCESS [ 46.887 s]
[INFO] Apache Hadoop YARN Server .......................... SUCCESS [  0.182 s]
[INFO] Apache Hadoop YARN Server Common ................... SUCCESS [ 36.298 s]
[INFO] Apache Hadoop YARN ApplicationHistoryService ....... SUCCESS [ 20.437 s]
[INFO] Apache Hadoop YARN Timeline Service ................ SUCCESS [ 17.359 s]
[INFO] Apache Hadoop YARN Web Proxy ....................... SUCCESS [ 13.657 s]
[INFO] Apache Hadoop YARN ResourceManager ................. SUCCESS [ 58.000 s]
[INFO] Apache Hadoop YARN NodeManager ..................... SUCCESS [ 39.643 s]
[INFO] Apache Hadoop YARN Server Tests .................... SUCCESS [  9.071 s]
[INFO] Apache Hadoop YARN Client .......................... SUCCESS [ 21.694 s]
[INFO] Apache Hadoop MapReduce Client ..................... SUCCESS [  6.166 s]
[INFO] Apache Hadoop MapReduce Core ....................... SUCCESS [15:39 min]
[INFO] Apache Hadoop MapReduce Common ..................... SUCCESS [ 22.994 s]
[INFO] Apache Hadoop MapReduce Shuffle .................... SUCCESS [15:41 min]
[INFO] Apache Hadoop MapReduce App ........................ SUCCESS [ 25.727 s]
[INFO] Apache Hadoop MapReduce HistoryServer .............. SUCCESS [ 20.304 s]
[INFO] Apache Hadoop MapReduce JobClient .................. SUCCESS [ 17.658 s]
[INFO] Apache Hadoop Distributed Copy ..................... SUCCESS [ 19.715 s]
[INFO] Apache Hadoop Mini-Cluster ......................... SUCCESS [  8.129 s]
[INFO] Apache Hadoop Federation Balance ................... SUCCESS [ 15.989 s]
[INFO] Apache Hadoop HDFS-RBF ............................. SUCCESS [ 36.553 s]
[INFO] Apache Hadoop HDFS Project ......................... SUCCESS [  0.055 s]
[INFO] Apache Hadoop YARN SharedCacheManager .............. SUCCESS [ 13.570 s]
[INFO] Apache Hadoop YARN Timeline Plugin Storage ......... SUCCESS [ 12.698 s]
[INFO] Apache Hadoop YARN TimelineService HBase Backend ... SUCCESS [  0.092 s]
[INFO] Apache Hadoop YARN TimelineService HBase Common .... SUCCESS [ 15.533 s]
[INFO] Apache Hadoop YARN TimelineService HBase Client .... SUCCESS [ 16.827 s]
[INFO] Apache Hadoop YARN TimelineService HBase Servers ... SUCCESS [  0.080 s]
[INFO] Apache Hadoop YARN TimelineService HBase Server 2.5  SUCCESS [ 13.136 s]
[INFO] Apache Hadoop YARN TimelineService HBase tests ..... SUCCESS [  9.486 s]
[INFO] Apache Hadoop YARN Router .......................... SUCCESS [ 20.738 s]
[INFO] Apache Hadoop YARN TimelineService DocumentStore ... SUCCESS [ 13.557 s]
[INFO] Apache Hadoop YARN GlobalPolicyGenerator ........... SUCCESS [ 13.855 s]
[INFO] Apache Hadoop YARN Applications .................... SUCCESS [  0.073 s]
[INFO] Apache Hadoop YARN DistributedShell ................ SUCCESS [ 13.631 s]
[INFO] Apache Hadoop YARN Unmanaged Am Launcher ........... SUCCESS [ 10.037 s]
[INFO] Apache Hadoop YARN Services ........................ SUCCESS [  0.086 s]
[INFO] Apache Hadoop YARN Services Core ................... SUCCESS [ 12.220 s]
[INFO] Apache Hadoop YARN Services API .................... SUCCESS [  9.046 s]
[INFO] Apache Hadoop YARN Application Catalog ............. SUCCESS [  0.094 s]
[INFO] Apache Hadoop YARN Application Catalog Webapp ...... SUCCESS [ 24.353 s]
[INFO] Apache Hadoop YARN Application Catalog Docker Image  SUCCESS [  1.956 s]
[INFO] Apache Hadoop YARN Application MaWo ................ SUCCESS [  0.082 s]
[INFO] Apache Hadoop YARN Application MaWo Core ........... SUCCESS [ 10.718 s]
[INFO] Apache Hadoop YARN Site ............................ SUCCESS [  0.081 s]
[INFO] Apache Hadoop YARN Registry ........................ SUCCESS [  3.511 s]
[INFO] Apache Hadoop YARN UI .............................. SUCCESS [  0.261 s]
[INFO] Apache Hadoop YARN CSI ............................. SUCCESS [ 21.312 s]
[INFO] Apache Hadoop YARN Project ......................... SUCCESS [ 58.132 s]
[INFO] Apache Hadoop MapReduce HistoryServer Plugins ...... SUCCESS [ 10.475 s]
[INFO] Apache Hadoop MapReduce NativeTask ................. SUCCESS [ 16.364 s]
[INFO] Apache Hadoop MapReduce Uploader ................... SUCCESS [15:35 min]
[INFO] Apache Hadoop MapReduce Examples ................... SUCCESS [ 19.085 s]
[INFO] Apache Hadoop MapReduce ............................ SUCCESS [ 15.198 s]
[INFO] Apache Hadoop MapReduce Streaming .................. SUCCESS [ 19.054 s]
[INFO] Apache Hadoop Client Aggregator .................... SUCCESS [  9.152 s]
[INFO] Apache Hadoop Dynamometer Workload Simulator ....... SUCCESS [ 15.187 s]
[INFO] Apache Hadoop Dynamometer Cluster Simulator ........ SUCCESS [ 15.169 s]
[INFO] Apache Hadoop Dynamometer Block Listing Generator .. SUCCESS [ 12.700 s]
[INFO] Apache Hadoop Dynamometer Dist ..................... SUCCESS [  8.601 s]
[INFO] Apache Hadoop Dynamometer .......................... SUCCESS [  0.042 s]
[INFO] Apache Hadoop Archives ............................. SUCCESS [ 13.380 s]
[INFO] Apache Hadoop Archive Logs ......................... SUCCESS [15:37 min]
[INFO] Apache Hadoop Rumen ................................ SUCCESS [ 19.020 s]
[INFO] Apache Hadoop Gridmix .............................. SUCCESS [ 16.277 s]
[INFO] Apache Hadoop Data Join ............................ SUCCESS [ 13.373 s]
[INFO] Apache Hadoop Extras ............................... SUCCESS [ 12.136 s]
[INFO] Apache Hadoop Pipes ................................ SUCCESS [  0.073 s]
[INFO] Apache Hadoop Amazon Web Services support .......... SUCCESS [ 49.105 s]
[INFO] Apache Hadoop Kafka Library support ................ SUCCESS [  9.151 s]
[INFO] Apache Hadoop Azure support ........................ SUCCESS [12:33 min]
[INFO] Apache Hadoop Aliyun OSS support ................... SUCCESS [ 19.644 s]
[INFO] Apache Hadoop Scheduler Load Simulator ............. SUCCESS [ 26.910 s]
[INFO] Apache Hadoop Resource Estimator Service ........... SUCCESS [ 16.990 s]
[INFO] Apache Hadoop Azure Data Lake support .............. SUCCESS [ 13.400 s]
[INFO] Apache Hadoop Image Generation Tool ................ SUCCESS [ 16.292 s]
[INFO] Apache Hadoop Tools Dist ........................... SUCCESS [ 28.527 s]
[INFO] Apache Hadoop OpenStack support .................... SUCCESS [  0.144 s]
[INFO] Apache Hadoop Common Benchmark ..................... SUCCESS [ 24.220 s]
[INFO] Apache Hadoop Compatibility Benchmark .............. SUCCESS [ 13.083 s]
[INFO] Apache Hadoop Tools ................................ SUCCESS [  0.060 s]
[INFO] Apache Hadoop Client API ........................... SUCCESS [02:20 min]
[INFO] Apache Hadoop Client Runtime ....................... SUCCESS [02:41 min]
[INFO] Apache Hadoop Client Packaging Invariants .......... SUCCESS [  2.554 s]
[INFO] Apache Hadoop Client Test Minicluster .............. SUCCESS [04:36 min]
[INFO] Apache Hadoop Client Packaging Invariants for Test . SUCCESS [  2.891 s]
[INFO] Apache Hadoop Client Packaging Integration Tests ... SUCCESS [  3.095 s]
[INFO] Apache Hadoop Distribution ......................... SUCCESS [01:46 min]
[INFO] Apache Hadoop Client Modules ....................... SUCCESS [  0.164 s]
[INFO] Apache Hadoop Tencent COS Support .................. SUCCESS [ 15.200 s]
[INFO] Apache Hadoop OBS support .......................... SUCCESS [ 15.097 s]
[INFO] Apache Hadoop Cloud Storage ........................ SUCCESS [ 17.205 s]
[INFO] Apache Hadoop Cloud Storage Project ................ SUCCESS [  0.157 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:54 h
[INFO] Finished at: 2024-10-01T14:03:44+08:00
[INFO] ------------------------------------------------------------------------

For code changes:

Add a JDK 17 profile.

@slfan1989 slfan1989 marked this pull request as ready for review October 1, 2024 06:22
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 22s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 34m 27s trunk passed
+1 💚 compile 0m 16s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 0m 16s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 mvnsite 0m 20s trunk passed
+1 💚 javadoc 0m 18s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 16s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 shadedclient 56m 14s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 11s the patch passed
+1 💚 compile 0m 10s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 0m 10s the patch passed
+1 💚 compile 0m 11s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 0m 11s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 11s the patch passed
+1 💚 javadoc 0m 10s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 11s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
-1 ❌ shadedclient 33m 54s patch has errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 11s hadoop-project in the patch passed.
+1 💚 asflicense 0m 21s The patch does not generate ASF License warnings.
92m 46s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/1/artifact/out/Dockerfile
GITHUB PR #7085
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux 37e2c47e69a0 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / f9efe98
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/1/testReport/
Max. process+thread count 551 (vs. ulimit of 5500)
modules C: hadoop-project U: hadoop-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/1/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989
Copy link
Contributor Author

@adoroszlai I see that Ozone already supports JDK 17. Do you have any other suggestions for adding the profile?

@slfan1989
Copy link
Contributor Author

@steveloughran Could you help review this PR? Thank you very much! Do you have any feedback or suggestions regarding the addition of the profile?

Copy link
Contributor

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not going to test it; lets just merge in and see if there are other changes needed later

@slfan1989
Copy link
Contributor Author

I'm not going to test it; lets just merge in and see if there are other changes needed later

@steveloughran Thank you for your message! I agree with your point, and we will proceed to merge this PR first.

<properties>
<maven.compiler.release>17</maven.compiler.release>
<argLine>
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does the list come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your question! This list comes from the additional compilation items required by our internal Hadoop version to support JDK 17. Currently, the list might contain some redundancy as the community is continuously working on JDK 17 improvements, and our internal version has not merged all the latest PRs from the community.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this interact with existing setting of argLine?

hadoop/hadoop-project/pom.xml

Lines 2459 to 2463 in 3f637ef

<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<reuseForks>false</reuseForks>
<forkedProcessTimeoutInSeconds>${surefire.fork.timeout}</forkedProcessTimeoutInSeconds>
<argLine>${maven-surefire-plugin.argLine}</argLine>

<extraJavaTestArgs>
-XX:+IgnoreUnrecognizedVMOptions
--add-opens=java.base/java.util.zip=ALL-UNNAMED
--add-opens=java.base/sun.security.util=ALL-UNNAMED
--add-opens=java.base/sun.security.x509=ALL-UNNAMED
</extraJavaTestArgs>
<!-- Plugin versions and config -->
<maven-surefire-plugin.argLine>-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError ${extraJavaTestArgs}</maven-surefire-plugin.argLine>

Does it simply override the value coming from maven-surefire-plugin.argLine? If so, can we tweak that property instead, to avoid confusion? With -XX:+IgnoreUnrecognizedVMOptions we can do that regardless of Java version (i.e. outside of this profile).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slfan1989 @adoroszlai I made a more accurate JPMS option list at #7114 by running all UTs with JDK 17, and added them to global maven-surefire-plugin.argLine with the option -XX:+IgnoreUnrecognizedVMOptions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pan3793 Thank you for your contribution! I plan to directly incorporate ${maven-surefire-plugin.argLine} into the <argLine> after it is merged in #7114.

Copy link
Contributor Author

@slfan1989 slfan1989 Oct 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

   <profile>
      <id>java9</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <properties>
        <maven.compiler.release>${javac.version}</maven.compiler.release>
      </properties>
    </profile>

The Javadoc configuration can be removed, as it currently doesn’t cause any extra errors since Pan has submitted a PR to fix the Javadoc content.

cc: @pan3793 @adoroszlai

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion is just

+   <profile>
+      <id>java9</id>
+      <activation>
+        <jdk>[9,)</jdk>
+      </activation>
+      <properties>
+        <maven.compiler.release>${javac.version}</maven.compiler.release>
+      </properties>
+    </profile>

and it's encouraged to

use version numbers without the "1." prefix (supported since javac 5)

apache/maven-apache-parent@ded34a8#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8R101

-   <javac.version>1.8</javac.version>
+   <javac.version>8</javac.version>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I readed the document provided by Pan, and I find it reasonable.

-   <javac.version>1.8</javac.version>
+   <javac.version>8</javac.version>

cc: @steveloughran

@pan3793
Copy link
Member

pan3793 commented Oct 2, 2024

I tested the following building command without this patch, also works well.

mvn clean package -Pdist -Dtar -DskipTests -Dmaven.javadoc.skip=false -Djavac.version=17

OS, JDK, Maven information

$ mvn -version
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /Users/chengpan/.sdkman/candidates/maven/current
Java version: 17.0.8, vendor: Azul Systems, Inc., runtime: /Users/chengpan/.sdkman/candidates/java/17.0.8-zulu/zulu-17.jdk/Contents/Home
Default locale: en_CN, platform encoding: UTF-8
OS name: "mac os x", version: "14.7", arch: "aarch64", family: "mac"

@slfan1989
Copy link
Contributor Author

slfan1989 commented Oct 2, 2024

I tested the following building command without this patch, also works well.

mvn clean package -Pdist -Dtar -DskipTests -Dmaven.javadoc.skip=false -Djavac.version=17

OS, JDK, Maven information

$ mvn -version
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /Users/chengpan/.sdkman/candidates/maven/current
Java version: 17.0.8, vendor: Azul Systems, Inc., runtime: /Users/chengpan/.sdkman/candidates/java/17.0.8-zulu/zulu-17.jdk/Contents/Home
Default locale: en_CN, platform encoding: UTF-8
OS name: "mac os x", version: "14.7", arch: "aarch64", family: "mac"

I need to confirm this issue and then provide a response. Based on the process of upgrading the JDK version in other components, we will likely need some additional build options.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @slfan1989 for the patch.

<properties>
<maven.compiler.release>17</maven.compiler.release>
<argLine>
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this interact with existing setting of argLine?

hadoop/hadoop-project/pom.xml

Lines 2459 to 2463 in 3f637ef

<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<reuseForks>false</reuseForks>
<forkedProcessTimeoutInSeconds>${surefire.fork.timeout}</forkedProcessTimeoutInSeconds>
<argLine>${maven-surefire-plugin.argLine}</argLine>

<extraJavaTestArgs>
-XX:+IgnoreUnrecognizedVMOptions
--add-opens=java.base/java.util.zip=ALL-UNNAMED
--add-opens=java.base/sun.security.util=ALL-UNNAMED
--add-opens=java.base/sun.security.x509=ALL-UNNAMED
</extraJavaTestArgs>
<!-- Plugin versions and config -->
<maven-surefire-plugin.argLine>-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError ${extraJavaTestArgs}</maven-surefire-plugin.argLine>

Does it simply override the value coming from maven-surefire-plugin.argLine? If so, can we tweak that property instead, to avoid confusion? With -XX:+IgnoreUnrecognizedVMOptions we can do that regardless of Java version (i.e. outside of this profile).

Comment on lines 2741 to 2743
<id>jdk17</id>
<activation>
<jdk>[17,)</jdk>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth activating for Java 9+, where maven.compiler.release is supported.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 6m 57s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 31m 54s trunk passed
+1 💚 compile 0m 16s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 0m 16s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 mvnsite 0m 19s trunk passed
+1 💚 javadoc 0m 21s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 17s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 shadedclient 53m 0s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 9s the patch passed
+1 💚 compile 0m 10s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 0m 10s the patch passed
+1 💚 compile 0m 11s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 0m 11s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 12s the patch passed
+1 💚 javadoc 0m 11s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 10s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 shadedclient 20m 43s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 13s hadoop-project in the patch passed.
+1 💚 asflicense 0m 25s The patch does not generate ASF License warnings.
82m 49s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/2/artifact/out/Dockerfile
GITHUB PR #7085
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux 3021b23119a8 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 98f43d6
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/2/testReport/
Max. process+thread count 686 (vs. ulimit of 5500)
modules C: hadoop-project U: hadoop-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/2/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 50m 27s trunk passed
+1 💚 compile 0m 14s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 0m 16s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 mvnsite 0m 17s trunk passed
+1 💚 javadoc 0m 21s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 17s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 shadedclient 71m 39s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 10s the patch passed
+1 💚 compile 0m 9s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 0m 9s the patch passed
+1 💚 compile 0m 9s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 0m 9s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 12s the patch passed
+1 💚 javadoc 0m 11s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 11s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 shadedclient 20m 53s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 12s hadoop-project in the patch passed.
+1 💚 asflicense 0m 26s The patch does not generate ASF License warnings.
95m 12s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/3/artifact/out/Dockerfile
GITHUB PR #7085
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux c6cf8647e72a 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 2d2e736
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/3/testReport/
Max. process+thread count 643 (vs. ulimit of 5500)
modules C: hadoop-project U: hadoop-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/3/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED
--add-exports java.base/sun.security.x509=ALL-UNNAMED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slfan1989 Why are some formats “--add-exports=XX” while others are "--add-exports XX"? Perhaps you could standardize the format. Other than, it works well.

Additionally, i'm very interested in Hadoop supporting JDK 17, and I'm willing to take on related work.

Copy link
Contributor Author

@slfan1989 slfan1989 Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@myandpr Thank for the review! I will continue to improve this PR. If there are any PRs that can contribute to JDK 17, I can also help review them. We need to complete support for JDK 17 as soon as possible.

@LiuGuH
Copy link
Contributor

LiuGuH commented Oct 8, 2024

Hadoop on jdk17 can support namenode with more java heap size . And namenode will support more inodes. That is great!

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 6m 46s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 32m 24s trunk passed
+1 💚 compile 0m 16s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 0m 16s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 mvnsite 0m 18s trunk passed
+1 💚 javadoc 0m 19s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 15s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 shadedclient 53m 56s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 10s the patch passed
+1 💚 compile 0m 8s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 0m 8s the patch passed
+1 💚 compile 0m 10s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 0m 10s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 12s the patch passed
+1 💚 javadoc 0m 9s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 11s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 shadedclient 20m 47s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 12s hadoop-project in the patch passed.
+1 💚 asflicense 0m 26s The patch does not generate ASF License warnings.
83m 49s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/4/artifact/out/Dockerfile
GITHUB PR #7085
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux ccb5e2ee70b8 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / f6d0921
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/4/testReport/
Max. process+thread count 637 (vs. ulimit of 5500)
modules C: hadoop-project U: hadoop-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/4/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989
Copy link
Contributor Author

@adoroszlai @pan3793 In #7114, Pan helped organize the additional parameters needed for JDK 17 and added them to the compilation command, allowing us to simplify our profile. The related JavaDoc issues were fixed in #6976, so we no longer need to add the extra options for JavaDoc.

Could you please help review this change again? Thank you very much!

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 20s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 32m 48s trunk passed
+1 💚 compile 0m 16s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 0m 17s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 mvnsite 0m 20s trunk passed
+1 💚 javadoc 0m 21s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 17s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 shadedclient 53m 58s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 11s the patch passed
+1 💚 compile 0m 10s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 0m 10s the patch passed
+1 💚 compile 0m 9s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 0m 9s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 11s the patch passed
+1 💚 javadoc 0m 12s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 11s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 shadedclient 23m 17s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 11s hadoop-project in the patch passed.
+1 💚 asflicense 0m 25s The patch does not generate ASF License warnings.
79m 53s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/5/artifact/out/Dockerfile
GITHUB PR #7085
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux 68b355850338 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 7ffc194
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/5/testReport/
Max. process+thread count 554 (vs. ulimit of 5500)
modules C: hadoop-project U: hadoop-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7085/5/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989 slfan1989 merged commit f931ede into apache:trunk Oct 18, 2024
1 of 3 checks passed
@slfan1989
Copy link
Contributor Author

@steveloughran @zeekling @pan3793 @adoroszlai @myandpr @LiuGuH Thanks for the review!

@ayushtkn
Copy link
Member

by any chance is this breaking the JDK-11 builds?
https://ci-hadoop.apache.org/job/hadoop-qbt-trunk-java11-linux-x86_64/756/

@adoroszlai
Copy link
Contributor

adoroszlai commented Oct 25, 2024

@ayushtkn thanks for checking

Fatal error compiling: error: release version 1.8 not supported

https://ci-hadoop.apache.org/job/hadoop-qbt-trunk-java11-linux-x86_64/756/artifact/out/patch-compile-root.txt

javac.version should be updated:

diff --git hadoop-project/pom.xml hadoop-project/pom.xml
index 4e0b7475cc5..d35e3d399a0 100644
--- hadoop-project/pom.xml
+++ hadoop-project/pom.xml
@@ -157,7 +157,7 @@
     <os-maven-plugin.version>1.7.0</os-maven-plugin.version>
 
     <!-- define the Java language version used by the compiler -->
-    <javac.version>1.8</javac.version>
+    <javac.version>8</javac.version>
 
     <!-- The java version enforced by the maven enforcer -->
     <!-- more complex patterns can be used here, such as

Created HADOOP-19318.

slfan1989 added a commit that referenced this pull request Oct 28, 2024
slfan1989 added a commit that referenced this pull request Oct 28, 2024
@slfan1989
Copy link
Contributor Author

@ayushtkn @adoroszlai Thank you for discussing this issue. I have reverted this PR and will wait for the replacement of sun.misc before proceeding with the upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants