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:39:17 UTC

[phoenix] branch 5.1 updated: 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 5.1
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.1 by this push:
     new 6b50cb0583 Switch to Using the -hadoop3 HBase Artifacts Where Available
6b50cb0583 is described below

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

    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 e7a1f7d231..ada09a9825 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.2.5/hbase-2.2.5-src.tar.gz`
 `$ tar xfvz hbase-2.2.5-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 115e6b782c..0aff98b6fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,7 +90,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>