Skip to content

Conversation

@lhotari
Copy link
Member

@lhotari lhotari commented Apr 1, 2022

Fixes #14951

Motivation

Modifications

  • Add a workaround in bin/pulsar startup script that overrides the java.version system property with a version with 2 dots in it. This is applied to "sql-worker" and "sql" commands.

@lhotari lhotari added area/sql Pulsar SQL related features doc-not-needed Your PR changes do not impact docs labels Apr 1, 2022
@lhotari lhotari self-assigned this Apr 1, 2022
Copy link
Contributor

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

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

LGTM
verified the script locally with zulu distro of 1.8,11,17

nicolo.boschi % ({ java -version 2>&1| head -1 | awk -F" '{ print $2 }' | awk -F. '{ print $1 "." $2 "." $3 }' | grep -v -F ..; } 2>/dev/null)
11.0.13

nicolo.boschi % sdk use java 8.0.322-zulu
nicolo.boschi % ({ java -version 2>&1| head -1 | awk -F" '{ print $2 }' | awk -F. '{ print $1 "." $2 "." $3 }' | grep -v -F ..; } 2>/dev/null)
1.8.0_322

nicolo.boschi % sdk use java 17.0.1-zulu
nicolo.boschi % ({ java -version 2>&1| head -1 | awk -F" '{ print $2 }' | awk -F. '{ print $1 "." $2 "." $3 }' | grep -v -F ..; } 2>/dev/null)
17.0.1

- Presto 332 cannot parse a version string with more than 2 dots, such as 11.0.14.1
  - Add a workaround that overrides the java.version system property with a version
    with 2 dots in it.
@lhotari lhotari force-pushed the lh-pulsar-sql-jdk-11-workaround branch from 23a55a5 to ef98161 Compare April 2, 2022 09:09
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm.
This is a great hack

I hope that it will work for future java versions

@lhotari
Copy link
Member Author

lhotari commented Apr 2, 2022

The solution doesnt work yet, I'll debug it later

@lhotari lhotari marked this pull request as draft April 2, 2022 11:14
@lhotari
Copy link
Member Author

lhotari commented Apr 19, 2022

This solution won't work. It would require a Java agent to override the "java.version" System property. I think it's better to upgrade Presto and just support Java 11, PR is #14953 .

@lhotari lhotari closed this Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sql Pulsar SQL related features doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pulsar SQL won't start with Java 11.0.14.1

4 participants