문제

I have some map-reduce programs compiled by Oracle JDK 7. And I'm trying to use whirr 0.8.1 to setup an EC2 cluster to run them. However, the default JDK installed by whirr 0.8.1 seems to be Open JDK 6, and I encountered the following error while running them:

Unsupported major.minor version 51.0

Therefore I tried to specify the JDK version of whirr by setting:

whirr.java.install-function = install_oracle_jdk7

But this will cause the installation process fail, and it seems to be useless to try to modify the following script:

whirr-0.8.1\core\src\main\resources\functions\install_oracle_jdk7.sh

Does anyone know how to install JDK 7 on EC2 cluster via whirr?


Thanks very much to Ravi. The following information mentioned in your page is the critical piece I missed:

... i have found that one can create a functions directory in the whirr installation directory and putting all modified shell scripts there ...

I try to put the modified install_oracle_jdk7.sh to whirr-0.8.1\functions and this really works. The following are my modifications in install_oracle_jdk7.sh:

(delete)
url=http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz
if [ "x86_64" == "$arch" ]; then
url=http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz
fi
(add)
url=http://download.oracle.com/otn-pub/java/jdk/7u9-b05/jdk-7u9-linux-i586.tar.gz
if [ "x86_64" == "$arch" ]; then
url=http://download.oracle.com/otn-pub/java/jdk/7u9-b05/jdk-7u9-linux-x64.tar.gz
fi
(delete)
curl $url -L --silent --show-error --fail --connect-timeout 60 --max-time 600 --retry 5 -o $tmpdir/`basename $url`
(add)
wget -c --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" $url --output-document=$tmpdir/`basename $url`

도움이 되었습니까?

해결책

With Whirr you can try with install_oab_java function as a java.install-function. I had similar problems and you can find details in the link below:

Create hadoop cluster with apache whirr

Hope this helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top