vaijosh commented on code in PR #7680:
URL: https://github.com/apache/hbase/pull/7680#discussion_r2730406824
##########
dev-support/create-release/hbase-rm/Dockerfile:
##########
@@ -42,7 +42,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y update \
patch='2.7.6-*' \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
- && update-alternatives --set java
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java \
+ && update-alternatives --set java /usr/lib/jvm/java-8-openjdk-`uname -m |
sed -e s/aarch64/arm64/ | sed -e s/x86_64/amd64/`/jre/bin/java \
Review Comment:
Can we simplify the architecture mapping and add a safety check for the Java
path? Splitting this into two steps makes it more readable and prevents the
script from failing silently if the directory is missing.
e.g. something like below.
arch=$(uname -m | sed -e 's/aarch64/arm64/' -e 's/x86_64/amd64/')
java_bin="/usr/lib/jvm/java-8-openjdk-${arch}/jre/bin/java"
Also, we should add a check (or at least a comment) to verify that the path
/usr/lib/jvm/java-8-openjdk-${arch}/... exists, as we're currently assuming
it’s always present.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]