[ 
https://issues.apache.org/jira/browse/PHOENIX-6313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17265113#comment-17265113
 ] 

ASF GitHub Bot commented on PHOENIX-6313:
-----------------------------------------

virajjasani commented on a change in pull request #1089:
URL: https://github.com/apache/phoenix/pull/1089#discussion_r557601844



##########
File path: dev/rebuild_hbase.sh
##########
@@ -14,10 +14,34 @@
 # Rebuilds HBase with -Dhadoop.profile=3.0 locally, to work around PHOENIX-5993
 # Intended mainly for CI jobs, but can simplify manual rebuilds as well.
 
+
+DEV_SUPPORT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+ARTIFACTS_DIR="$DEV_SUPPORT/artifacts"
+WORK_DIR="$DEV_SUPPORT/work"
+
+if [[ ! -z "$MAVEN_SETTINGS_FILE" ]]; then
+  SETTINGS=( "--settings" "$MAVEN_SETTINGS_FILE" )
+fi
+
+if [[ ! -z "$MAVEN_LOCAL_REPO" ]]; then
+  LOCALREPO="-Dmaven.repo.local=${MAVEN_LOCAL_REPO}"
+fi
+
+if [[ "$1" == "detect" ]]; then
+  set -e
+  cd "$DEV_SUPPORT/.."
+  HBASE_VERSION=$(mvn ${SETTINGS[@]} help:evaluate -Dexpression=hbase.version 
-q -DforceStdout $LOCALREPO)
+  echo "HBASE_VERSION=$HBASE_VERSION"
+  cd "$DEV_SUPPORT"
+  set +e
+else
+  HBASE_VERSION="$1"
+fi
+
 # The name of the Apache Hbase source file
-HBASE_SOURCE_NAME="hbase-$1-src.tar.gz"
+HBASE_SOURCE_NAME="hbase-$HBASE_VERSION-src.tar.gz"
 # The relative path on the ASF mirrors for the Hbase source file
-HBASE_SOURCE_MIRROR_NAME="hbase/$1/$HBASE_SOURCE_NAME"
+HBASE_SOURCE_MIRROR_NAME="hbase/$HBASE_VERSION/$HBASE_SOURCE_NAME"

Review comment:
       `HBASE_VERSION` is not going to be available if rebuild_hbase doesn't 
have first arg `detect` right? Should we not stick to `$1` here?




----------------------------------------------------------------
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:
[email protected]


> Rebuild HBase in Yetus
> ----------------------
>
>                 Key: PHOENIX-6313
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6313
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5.1.0
>            Reporter: Istvan Toth
>            Assignee: Istvan Toth
>            Priority: Critical
>
> We are swichthing the default to HBase 2.4, but the Yetus personality doesn't 
> rebuild HBase, which causes test failures.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to