You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/06/09 16:25:08 UTC

[GitHub] [hbase] ndimiduk commented on a change in pull request #1871: HBASE-24005 Document maven invocation with JDK11

ndimiduk commented on a change in pull request #1871:
URL: https://github.com/apache/hbase/pull/1871#discussion_r436975661



##########
File path: src/main/asciidoc/_chapters/developer.adoc
##########
@@ -420,6 +419,27 @@ Tests may not all pass so you may need to pass `-DskipTests` unless you are incl
 
 To pick a particular Hadoop 3.y release, you'd set hadoop-three.version property e.g. `-Dhadoop-three.version=3.0.0`.
 
+[[maven.build.jdk11_hadoop3]]
+==== Building with JDK11 and Hadoop3
+
+The following guidance applies to HBase versions [2.3, 3), where both JDK8 and JDK11 are supported,
+and both Hadoop2 and Hadoop3 are supported.
+
+HBase manages JDK-specific build settings using maven profiles. The profile appropriate to the JDK
+in use is automatically selected. JDK8 supports both Hadoop2 and Hadoop3. For JDK11, only Hadoop3
+is supported, which means you must specify `-Dhadoop.profile=3.0` when building with JDK11.

Review comment:
       I called out that this is applicable to 2.3, up through but excluding 3.0. You think having this documented here will be confusing? Should I point out how 3.0 is different?

##########
File path: src/main/asciidoc/_chapters/developer.adoc
##########
@@ -420,6 +419,27 @@ Tests may not all pass so you may need to pass `-DskipTests` unless you are incl
 
 To pick a particular Hadoop 3.y release, you'd set hadoop-three.version property e.g. `-Dhadoop-three.version=3.0.0`.
 
+[[maven.build.jdk11_hadoop3]]
+==== Building with JDK11 and Hadoop3
+
+The following guidance applies to HBase versions [2.3, 3), where both JDK8 and JDK11 are supported,
+and both Hadoop2 and Hadoop3 are supported.
+
+HBase manages JDK-specific build settings using maven profiles. The profile appropriate to the JDK
+in use is automatically selected. JDK8 supports both Hadoop2 and Hadoop3. For JDK11, only Hadoop3
+is supported, which means you must specify `-Dhadoop.profile=3.0` when building with JDK11.

Review comment:
       My intention (and I believe it's common practice for all release managers) is to make a blanket-copy of the docs from master back to branch-2 and branch-2.3. I've staged the commit locally and skimming through, I haven't found much content that's applicable to master but not branch-2/.3. 

##########
File path: src/main/asciidoc/_chapters/developer.adoc
##########
@@ -420,6 +419,27 @@ Tests may not all pass so you may need to pass `-DskipTests` unless you are incl
 
 To pick a particular Hadoop 3.y release, you'd set hadoop-three.version property e.g. `-Dhadoop-three.version=3.0.0`.
 
+[[maven.build.jdk11_hadoop3]]
+==== Building with JDK11 and Hadoop3
+
+The following guidance applies to HBase versions [2.3, 3), where both JDK8 and JDK11 are supported,
+and both Hadoop2 and Hadoop3 are supported.
+
+HBase manages JDK-specific build settings using maven profiles. The profile appropriate to the JDK
+in use is automatically selected. JDK8 supports both Hadoop2 and Hadoop3. For JDK11, only Hadoop3
+is supported, which means you must specify `-Dhadoop.profile=3.0` when building with JDK11.

Review comment:
       I think the earlier section, [Building against various hadoop versions](http://hbase.apache.org/book.html#maven.build.hadoop) needs updated in light of the point you've raised here. Nice find.

##########
File path: src/main/asciidoc/_chapters/developer.adoc
##########
@@ -420,6 +419,27 @@ Tests may not all pass so you may need to pass `-DskipTests` unless you are incl
 
 To pick a particular Hadoop 3.y release, you'd set hadoop-three.version property e.g. `-Dhadoop-three.version=3.0.0`.
 
+[[maven.build.jdk11_hadoop3]]
+==== Building with JDK11 and Hadoop3
+
+The following guidance applies to HBase versions [2.3, 3), where both JDK8 and JDK11 are supported,
+and both Hadoop2 and Hadoop3 are supported.
+
+HBase manages JDK-specific build settings using maven profiles. The profile appropriate to the JDK
+in use is automatically selected. JDK8 supports both Hadoop2 and Hadoop3. For JDK11, only Hadoop3
+is supported, which means you must specify `-Dhadoop.profile=3.0` when building with JDK11.

Review comment:
       I've updated that text as well, let me know if it satisfies.

##########
File path: src/main/asciidoc/_chapters/developer.adoc
##########
@@ -420,6 +419,27 @@ Tests may not all pass so you may need to pass `-DskipTests` unless you are incl
 
 To pick a particular Hadoop 3.y release, you'd set hadoop-three.version property e.g. `-Dhadoop-three.version=3.0.0`.
 
+[[maven.build.jdk11_hadoop3]]
+==== Building with JDK11 and Hadoop3
+
+The following guidance applies to HBase versions [2.3, 3), where both JDK8 and JDK11 are supported,
+and both Hadoop2 and Hadoop3 are supported.
+
+HBase manages JDK-specific build settings using maven profiles. The profile appropriate to the JDK
+in use is automatically selected. JDK8 supports both Hadoop2 and Hadoop3. For JDK11, only Hadoop3
+is supported, which means you must specify `-Dhadoop.profile=3.0` when building with JDK11.

Review comment:
       Bah. Now I need to update this text to refer back to what I just wrote.

##########
File path: src/main/asciidoc/_chapters/developer.adoc
##########
@@ -397,28 +396,109 @@ mvn clean install -DskipTests
 See the <<hbase.unittests.cmds,hbase.unittests.cmds>> section in <<hbase.unittests,hbase.unittests>>
 
 [[maven.build.hadoop]]
-==== Building against various hadoop versions.
+==== Building against various Hadoop versions
+
+HBase supports building against Apache Hadoop versions: 2.y and 3.y (early release artifacts).
+Exactly which version of Hadoop is used by default varies by release branch. See the section
+<<hadoop,Hadoop>> for the complete breakdown of supported Hadoop version by HBase release.
+
+The mechanism for selecting a Hadoop version at build time is identical across all releases. Which
+version of Hadoop is default varies. We manage Hadoop major version selection by way of Maven
+profiles. Due to the peculiarities of Maven profile mutual exclusion, the profile that builds
+against a particular Hadoop version is activated by setting a property, *not* the usual profile
+activation. Hadoop version profile activation is summarized by the following table.
+
+.Hadoop Profile Activation by HBase Release
+[cols="3*^.^", options="header"]
+|===
+| | Hadoop2 Activation | Hadoop3 Activation
+| HBase 1.3+ | _active by default_ | `-Dhadoop.profile=3.0`
+| HBase 3.0+ | _not supported_ | _active by default_
+|===
+
+[WARNING]
+====
+Please note that where a profile is active by default, `hadoop.profile` must NOT be provided.
+====
+
+Once the Hadoop major version profile is activated, the exact Hadoop version can be
+specified by overriding the appropriate property value. For Hadoop2 versions, the property name
+is `hadoop-two.version`. With Hadoop3 versions, the property name is `hadoop-three.version`.
 
-HBase supports building against Apache Hadoop versions: 2.y and 3.y (early release artifacts). By default we build against Hadoop 2.x.
+.Example 1, Building HBase 1.7 against Hadoop 2.10.0
 
-To build against a specific release from the Hadoop 2.y line, set e.g. `-Dhadoop-two.version=2.6.3`.
+For example, to build HBase 1.7 against Hadoop 2.10.0, the profile is set for Hadoop2 by default,
+so only `hadoop-two.version` must be specified:
 
 [source,bourne]
 ----
-mvn -Dhadoop-two.version=2.6.3 ...
+git checkout branch-1
+mvn -Dhadoop-two.version=2.10.0 ...
 ----
 
-To change the major release line of Hadoop we build against, add a hadoop.profile property when you invoke +mvn+:
+.Example 2, Building HBase 2.3 against Hadoop 3.3.0-SNAPSHOT

Review comment:
       Is it that much of a problem? I could simply drop the `SNAPSHOT` bits and update the language to sound like that version was already released. It'll eventually be accurate...
   
   I could also edit the example context slightly, saying "this is how a developer of Hadoop might verify the compatibility of a recent Hadoop  build against a recent hbase build."




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org