-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[patch][pulsar-sql] Add Java version trim agent for presto 332 #15236
[patch][pulsar-sql] Add Java version trim agent for presto 332 #15236
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! A few minor changes
.../java-version-trim-agent/src/main/java/org/apache/pulsar/sql/agent/TrimJavaVersionAgent.java
Outdated
Show resolved
Hide resolved
.../java-version-trim-agent/src/main/java/org/apache/pulsar/sql/agent/TrimJavaVersionAgent.java
Outdated
Show resolved
Hide resolved
@gaoran10 Please reply to my review comments. |
80e22d4
to
86f12c6
Compare
@lhotari Thanks for your suggestions, and address comments. PTAL |
envMap.put("managedLedgerMaxEntriesPerLedger", String.valueOf(ENTRIES_PER_LEDGER)); | ||
envMap.put("managedLedgerMinLedgerRolloverTimeMinutes", "0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these settings might be needed for other tests, not just PulsarSQL offloading tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These configurations are only needed by the test TestPrestoQueryTieredStorage.java
, they are used to control offload operation. The TestBasicPresto.java
don't need them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take care of that in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you making changes to TestPrestoQueryTieredStorage.java and PulsarSQLTestSuite.java as part of this PR? I think those changes should be reverted.
…undError: org/apache/pulsar/shade/javax/annotation/Priority. ``` Caused by: java.lang.NoClassDefFoundError: org/apache/pulsar/shade/javax/annotation/Priority at org.apache.pulsar.shade.org.glassfish.jersey.model.internal.CommonConfig$FeatureRegistration.priority(CommonCon {} at org.apache.pulsar.shade.org.glassfish.jersey.model.internal.CommonConfig$FeatureRegistration.<init>(CommonConfig.java:119) at org.apache.pulsar.shade.org.glassfish.jersey.model.internal.CommonConfig$FeatureRegistration.<init>(CommonConfig.java:107) at org.apache.pulsar.shade.org.glassfish.jersey.model.internal.CommonConfig.processFeatureRegistration(CommonConfig.java:511) at org.apache.pulsar.shade.org.glassfish.jersey.model.internal.CommonConfig.register(CommonConfig.java:418) at org.apache.pulsar.shade.org.glassfish.jersey.client.ClientConfig$State.register(ClientConfig.java:216) at org.apache.pulsar.shade.org.glassfish.jersey.client.ClientConfig.register(ClientConfig.java:606) at org.apache.pulsar.client.admin.internal.PulsarAdminImpl.<init>(PulsarAdminImpl.java:179) at org.apache.pulsar.client.admin.internal.PulsarAdminBuilderImpl.build(PulsarAdminBuilderImpl.java:47) at org.apache.pulsar.sql.presto.PulsarConnectorConfig.getPulsarAdmin(PulsarConnectorConfig.java:474) ... 51 more {} Caused by: java.lang.ClassNotFoundException: org.apache.pulsar.shade.javax.annotation.Priority at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587) at io.prestosql.server.PluginClassLoader.loadClass(PluginClassLoader.java:89) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ... 61 more ```
@codelipenghui @lhotari All comments are resolved. PTAL, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
…e#15236) Fix apache#14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f)
@gaoran10 I'm not able to cherry-pick this one to branch-2.10, could you please help with this or push a PR to branch-2.10 directly. |
421e7c7 for cherry-picking to branch-2.9 |
…e#15236) Fix apache#14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f)
…e#15236) Fix apache#14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f)
…#15373) * [patch][pulsar-sql] Add Java version trim agent for presto 332 (#15236) Fix #14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f) * fix presto License check and version
…e#15236) Fix apache#14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f)
…e#15236) Fix apache#14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f)
…e#15236) Fix apache#14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f)
…e#15236) Fix apache#14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f)
…e#15236) Fix apache#14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f)
…e#15236) Fix apache#14951 The presto 332 couldn't parse Java version like this `11.0.14.1`, so add a Java version trim agent to walk around the problem. This is a temporary patch, after the presto upgrade to 332+, we could remove this. Add a Java version trim agent to format the system property `java.version` for the Pulsar SQL plugin. (cherry picked from commit a1aa18f)
#15371 cherrypick to branch-2.10 |
Fix #14951
Motivation
The presto 332 couldn't parse Java version like this
11.0.14.1
, so add a Java version trim agent to walk around the problem.This is a temporary patch, after the presto upgrade to 332+, we could remove this.
Modifications
Add a Java version trim agent to format the system property
java.version
for the Pulsar SQL plugin.Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below or label this PR directly.
Need to update docs?
doc-required
(Your PR needs to update docs and you will update later)
no-need-doc
(Please explain why)
doc
(Your PR contains doc changes)
doc-added
(Docs have been already added)