hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From junping...@apache.org
Subject hadoop git commit: HADOOP-14842. Hadoop 2.8.2 release build process get stuck due to java issue. Contributed by Junping Du.
Date Fri, 08 Sep 2017 20:11:16 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 69d7b1ae5 -> c2d96dd50


HADOOP-14842. Hadoop 2.8.2 release build process get stuck due to java issue. Contributed
by Junping Du.

(cherry picked from commit d0a0f24abc42957c885d5076f8c8e7945e074ba8)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c2d96dd5
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c2d96dd5
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c2d96dd5

Branch: refs/heads/branch-2.8
Commit: c2d96dd50e70d971aa834385f5d72bc3022bb809
Parents: 69d7b1a
Author: Junping Du <junping_du@apache.org>
Authored: Fri Sep 8 13:07:52 2017 -0700
Committer: Junping Du <junping_du@apache.org>
Committed: Fri Sep 8 13:14:08 2017 -0700

----------------------------------------------------------------------
 dev-support/bin/create-release | 19 ++++++++++++++++---
 dev-support/docker/Dockerfile  |  7 +++----
 2 files changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c2d96dd5/dev-support/bin/create-release
----------------------------------------------------------------------
diff --git a/dev-support/bin/create-release b/dev-support/bin/create-release
index 64bd02a..8b138e5 100755
--- a/dev-support/bin/create-release
+++ b/dev-support/bin/create-release
@@ -172,6 +172,15 @@ function domd5()
   run "${MD5SUM}" "${1}" > "${1}.md5"
 }
 
+## @description  set JAVA_HOME properly
+## @audience     public
+## @stability    unstable
+function locate_jvm()
+{
+  JAVA_HOME="$(ls -d /usr/lib/jvm/*${JVM_VERSION}* | grep "${JVM_HINT}" | head -1 )"
+  export JAVA_HOME
+}
+
 function header()
 {
   echo
@@ -185,6 +194,7 @@ function header()
   echo "Version to create      : ${HADOOP_VERSION}"
   echo "Release Candidate Label: ${RC_LABEL##-}"
   echo "Source Version         : ${DEFAULT_HADOOP_VERSION}"
+  echo "Using JDK              : ${JAVA_HOME}"
   printf "\n\n"
 }
 
@@ -283,6 +293,7 @@ function usage
   echo "--asfrelease            Make an ASF release"
   echo "--docker                Use Hadoop's Dockerfile for guaranteed environment"
   echo "--dockercache           Use a Docker-private maven cache"
+  echo "--jvmhint=[filter]      Simple filter to pick a JVM to use"
   echo "--logdir=[path]         Path to store logs"
   echo "--mvncache=[path]       Path to the maven cache to use"
   echo "--native                Also build the native components"
@@ -318,6 +329,9 @@ function option_parse
       --indocker)
         INDOCKER=true
       ;;
+      --jvmhint=*)
+        JVM_HINT=${i#*=}
+      ;;
       --logdir=*)
         LOGDIR=${i#*=}
       ;;
@@ -475,9 +489,6 @@ function dockermode
     echo "RUN mkdir -p /maven"
     echo "RUN chown -R ${user_name} /maven"
 
-    # we always force build with the Oracle JDK
-    # but with the correct version
-    echo "ENV JAVA_HOME /usr/lib/jvm/java-${JVM_VERSION}-oracle"
     echo "USER ${user_name}"
     printf "\n\n"
   ) | docker build -t "${imgname}" -
@@ -631,6 +642,8 @@ option_parse "${PARAMS[@]}"
 
 dockermode
 
+locate_jvm
+
 header
 
 if [[ -n ${RC_LABEL} ]]; then

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c2d96dd5/dev-support/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile
index c5bcba9..a27add8 100644
--- a/dev-support/docker/Dockerfile
+++ b/dev-support/docker/Dockerfile
@@ -70,7 +70,7 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends
-y \
 RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar .
 
 #######
-# Oracle Java
+# Java OpenJDK
 #######
 
 RUN echo "dot_style = mega" > "/root/.wgetrc"
@@ -80,9 +80,8 @@ RUN apt-get -q install --no-install-recommends -y software-properties-common
 RUN add-apt-repository -y ppa:webupd8team/java
 RUN apt-get -q update
 
-# Auto-accept the Oracle JDK license
-RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
-RUN apt-get -q install --no-install-recommends -y oracle-java8-installer
+# Install OpenJDK 7
+RUN apt-get -q install --no-install-recommends -y openjdk-7-jdk
 
 ######
 # Install findbugs


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message