-
Notifications
You must be signed in to change notification settings - Fork 76
Speed up the process to start standalone for tests #236
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
Speed up the process to start standalone for tests #236
Conversation
### Motivation It took too much time to start Pulsar standalone for tests because of the slow JVM startup when running `pulsar-admin` commands. ### Modifications Use `curl` to send REST requests directly. After this change, the startup time reduced from 1m39.597s to 32.451s in my local env.
RobertIndie
left a comment
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.
Is it better to use pulsar-shell instead of using raw HTTP calls?
We can use the no-interactive mode of the pulsar shell: https://pulsar.apache.org/docs/next/administration-pulsar-shell/#run-commands-sequentially
If we're going to use For this case, using |
|
@BewareMyPower Why do we need to download it separately? This script is running inside the docker. The pulsar after 2.11 already contains the Using the |
Okay. I will replace it with the pulsar-shell command. |
|
When I tried to write shell scripts for while my script is: admin namespaces create public/default -c standalone
admin namespaces grant-permission \
--actions produce,consume --role anonymous \
public/defaultThe backslash seems not recognized, which is bad from my view. BTW, I think the readability is not bad even with the raw REST APIs.
In addition, it can also be easily used to verify an older Pulsar image (< 2.11.0) to test the backward compatibility. |
RobertIndie
left a comment
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.
Thanks for the explanation. Make sense to me.
Migrate the PRs from the pulsar-client-cpp repo: - apache/pulsar-client-cpp#297 - apache/pulsar-client-cpp#236 - apache/pulsar-client-cpp#340
Migrate the PRs from the pulsar-client-cpp repo: - apache/pulsar-client-cpp#297 - apache/pulsar-client-cpp#236 - apache/pulsar-client-cpp#340
Motivation
It took too much time to start Pulsar standalone for tests because of the slow JVM startup when running
pulsar-admincommands.Modifications
Use
curlto send REST requests directly. After this change, the startup time reduced from 1m39.597s to 32.451s in my local env.Documentation
doc-required(Your PR needs to update docs and you will update later)
doc-not-needed(Please explain why)
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)