rename pulsar env variables for pulsar tools #16623
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
As #4105, we could config pulsar in container environments through environment variables.
Current, both broker and pulsar tools (admin, client, perf) use
PULSAR_MEMto config jvm memory.Consider we create a pod for broker through kubernetes, we set
containers.resources.limits.memoryto 25Gi, set envPULSAR_MEMto-Xms10g -Xmx10g -XX:MaxDirectMemorySize=10g, broker will start with this jvm memory config.When we run pulsar-admin or pulsar-client in this pod, they will start with broker's jvm memory config since
PULSAR_MEMwas already set, that will cause pod's total memory exceed the limit.Modifications
Rename
PULSAR_MEMtoPULSAR_TOOL_MEMfor pulsar tools, we could setPULSAR_TOOL_MEMthrough environment variables for pulsar tools, or just use the default jvm memory setting.Verifying this change
This change is a trivial rework
Documentation
doc-not-needed