Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to install Presto RPM with Java 11 #2057

Merged
merged 1 commit into from Nov 21, 2019

Conversation

kokosing
Copy link
Member

Allow to install Presto RPM with Java 11

@electrum
Copy link
Member

With #2064 we could easily test this using a different Docker image that contains Java 11

@@ -22,7 +22,11 @@ check_if_correct_java_version() {
# candidate for JAVA_HOME).
JAVA_VERSION=$(java_version "$1")
JAVA_UPDATE=$(echo $JAVA_VERSION | cut -d'_' -f2)
if [[ ("$JAVA_VERSION" > "1.8") && ($JAVA_UPDATE -ge 161) ]]; then
JAVA_MAJOR=$(echo $JAVA_VERSION | cut -d'.' -f1)
if [[ ("$JAVA_MAJOR" -ge "11") ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about other versions? Can we make the mechanism generic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite generic for example 12 > 11. However then env variable JAVA11_HOME has unfortunate name.

if [[ ("$JAVA_MAJOR" -ge "11") ]]; then
echo "JAVA11_HOME=$1" > /tmp/presto_env.sh
return 0
elif [[ ("$JAVA_VERSION" > "1.8") && ($JAVA_UPDATE -ge 161) ]]; then
echo "JAVA8_HOME=$1" > /tmp/presto_env.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we make this generic instead?

@electrum
Copy link
Member

#2064 is merged, so please try adding a test for this in io.prestosql.server.rpm.ServerIT

@kokosing kokosing force-pushed the origin/master/188_rpm branch 2 times, most recently from d72397a to af0931e Compare November 20, 2019 12:26
@kokosing
Copy link
Member Author

Locally:

[INFO] Running io.prestosql.server.rpm.ServerIT
[main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
[main] INFO org.testcontainers.dockerclient.UnixSocketClientProviderStrategy - Accessing docker with local Unix socket
[main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
[main] INFO org.testcontainers.DockerClientFactory - Docker host IP address is localhost
[main] INFO org.testcontainers.DockerClientFactory - Connected to docker:
  Server Version: 19.03.1
  API Version: 1.40
  Operating System: Docker Desktop
  Total Memory: 6209 MB
[main] INFO org.testcontainers.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for quay.io
[main] INFO org.testcontainers.DockerClientFactory - Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
        ℹ︎ Checking the system...
        ✔ Docker version should be at least 1.6.0
        ✔ Docker environment should have more than 2GB free disk space
[main] INFO 🐳 [prestodev/centos7-oj11:latest] - Creating container for image: prestodev/centos7-oj11:latest
[main] INFO org.testcontainers.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for index.docker.io
[main] INFO org.testcontainers.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for index.docker.io
[main] INFO 🐳 [prestodev/centos7-oj11:latest] - Starting container with ID: 50b196405184860a9f0a2fbde0cf4815a3adfa3c3c67948c7f3148967d5deee2
[main] INFO 🐳 [prestodev/centos7-oj11:latest] - Container prestodev/centos7-oj11:latest is starting: 50b196405184860a9f0a2fbde0cf4815a3adfa3c3c67948c7f3148967d5deee2
[main] INFO 🐳 [prestodev/centos7-oj11:latest] - Container prestodev/centos7-oj11:latest started in PT31.856S
[main] INFO 🐳 [prestodev/centos7-oj8:latest] - Creating container for image: prestodev/centos7-oj8:latest
[main] INFO org.testcontainers.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for index.docker.io
[main] INFO 🐳 [prestodev/centos7-oj8:latest] - Starting container with ID: 6055124ed03ed31bbe081c4162104922100902fb2a048701fbc3cd1c86e36547
[main] INFO 🐳 [prestodev/centos7-oj8:latest] - Container prestodev/centos7-oj8:latest is starting: 6055124ed03ed31bbe081c4162104922100902fb2a048701fbc3cd1c86e36547
[main] INFO 🐳 [prestodev/centos7-oj8:latest] - Container prestodev/centos7-oj8:latest started in PT30.612S
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 74.033 s - in io.prestosql.server.rpm.ServerIT

@kokosing
Copy link
Member Author

Depends on trinodb/docker-images#41

@kokosing
Copy link
Member Author

@electrum @sopel39 Comments addressed. Please have another look.

@@ -40,6 +44,7 @@ if ! check_if_correct_java_version "$JAVA8_HOME" && ! check_if_correct_java_vers
/usr/java/jdk1.8* \
/usr/java/jre1.8* \
/usr/jdk64/jdk1.8* \
/usr/lib/jvm/java-11-* \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we put this first in the list so that it's found first?

@kokosing kokosing closed this Nov 21, 2019
@kokosing kokosing deleted the origin/master/188_rpm branch November 21, 2019 09:53
@kokosing kokosing restored the origin/master/188_rpm branch November 21, 2019 09:54
@kokosing kokosing reopened this Nov 21, 2019
@kokosing kokosing merged commit 52e347b into trinodb:master Nov 21, 2019
@kokosing kokosing deleted the origin/master/188_rpm branch November 21, 2019 09:56
@kokosing kokosing added this to the 326 milestone Nov 21, 2019
@kokosing kokosing mentioned this pull request Nov 21, 2019
7 tasks
@findepi findepi mentioned this pull request Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants