You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2022/12/06 05:47:51 UTC

[phoenix] 02/02: PHOENIX-6837 Switch to Using the -hadoop3 HBase Artifacts Where Available

This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git

commit c8a2668fa52fa0cd2b4995d55fd8d367dd142fa3
Author: Istvan Toth <st...@apache.org>
AuthorDate: Mon Dec 5 14:50:09 2022 +0100

    PHOENIX-6837 Switch to Using the -hadoop3 HBase Artifacts Where Available
    
    bump HBase 2.5 version to 2.5.2-hadoop3
---
 BUILDING.md          | 9 +++++++--
 dev/rebuild_hbase.sh | 5 +++++
 pom.xml              | 2 +-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/BUILDING.md b/BUILDING.md
index 6fd5edf5bb..d32692fe5b 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -32,8 +32,13 @@ HBase 2 and Hadoop 3
 Phoenix 5.x requires Hadoop 3. While HBase 2.x is compatible with Hadoop 3, the public Maven HBase
 artifacts are built with Hadoop 2, and are not.
 
-For this reason, when building Phoenix, you need to rebuild
-HBase with Hadoop 3, and install it to the local maven repo of the build host.
+With the 2.5.2 release HBase has started releasing Maven artifacts built with Hadoop3.
+Where available, use the Maven artifacts with the `-hadoop3` postfix in the version,
+i.e. `2.5.2-hadoop3`, and ignore the rest of this section.
+For HBase 2.5, Phoenix already uses the -hadoop3 version by default.
+
+For HBase versions where hadoop3 artifacts are not available, you need to rebuild HBase with
+Hadoop 3, and install it to the local maven repo of the build host.
 
 `$ wget https://downloads.apache.org/hbase/2.4.15/hbase-2.4.15-src.tar.gz`
 `$ tar xfvz hbase-2.4.15-src.tar.gz`
diff --git a/dev/rebuild_hbase.sh b/dev/rebuild_hbase.sh
index f630ab4140..6e02208241 100755
--- a/dev/rebuild_hbase.sh
+++ b/dev/rebuild_hbase.sh
@@ -38,6 +38,11 @@ else
   HBASE_VERSION="$1"
 fi
 
+if [[ "$HBASE_VERSION" == *"-hadoop3" ]]; then
+  echo "Hbase version is already compiled for Hadoop3. Skipping rebuild"
+  exit 0;
+fi
+
 # The name of the Apache Hbase source file
 HBASE_SOURCE_NAME="hbase-$HBASE_VERSION-src.tar.gz"
 # The relative path on the ASF mirrors for the Hbase source file
diff --git a/pom.xml b/pom.xml
index b6c939bbca..7889e4f01b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,7 +86,7 @@
     <hbase-2.3.runtime.version>2.3.7</hbase-2.3.runtime.version>
     <hbase-2.4.0.runtime.version>2.4.0</hbase-2.4.0.runtime.version>
     <hbase-2.4.runtime.version>2.4.15</hbase-2.4.runtime.version>
-    <hbase-2.5.runtime.version>2.5.0</hbase-2.5.runtime.version>
+    <hbase-2.5.runtime.version>2.5.2-hadoop3</hbase-2.5.runtime.version>
 
     <!-- General Properties -->
     <antlr-input.dir>src/main/antlr3</antlr-input.dir>