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

[Pulsar-Perf] Allow configuring metadataStoreUrl in pulsar-perf managed-ledger #14145

Merged
merged 4 commits into from
Feb 8, 2022

Conversation

RobertIndie
Copy link
Member

Master Issue: #13760

Motivation

As per #13760, zookeeperServers need to be renamed to metadataStoreUrl.

Modifications

  • Add metadataStoreUrl parameter to ManagedLedgerWriter of the pulsar perf.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): ( no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

  • doc-required

…naged-ledger`

Motivation
`zookeeperServers` need to be renamed to `metadataStoreUrl`

Modifications
* Add `metadataStoreUrl` parameter to ManagedLedgerWriter of the pulsar perf.

Signed-off-by: Zike Yang <zkyang@streamnative.io>
@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label Feb 7, 2022
Signed-off-by: Zike Yang <zkyang@streamnative.io>
Signed-off-by: Zike Yang <zkyang@streamnative.io>
RobertIndie added a commit to RobertIndie/pulsar that referenced this pull request Feb 8, 2022
…dger`

Add doc for apache#14145

Signed-off-by: Zike Yang <zkyang@streamnative.io>
ClientConfiguration bkConf = new ClientConfiguration();
bkConf.setUseV2WireProtocol(true);
bkConf.setAddEntryTimeout(30);
bkConf.setReadEntryTimeout(30);
bkConf.setThrottleValue(0);
bkConf.setNumChannelsPerBookie(arguments.maxConnections);
bkConf.setZkServers(arguments.zookeeperServers);
bkConf.setMetadataServiceUri(arguments.metadataStoreUrl);
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that only the param arguments.metadataStoreUrl is valid, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.

@@ -151,6 +156,12 @@ public static void main(String[] args) throws Exception {
PerfClientUtils.exit(-1);
}

if (arguments.metadataStoreUrl == null && arguments.zookeeperServers == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the param arguments.zookeeperServers still be useful?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we need to make it backward compatible.

Signed-off-by: Zike Yang <zkyang@streamnative.io>
public String zookeeperServers;

@Parameter(names = {"-md",
"--metadata-store"}, description = "Metadata store service url. eg: zk:my-zk:2181")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"--metadata-store"}, description = "Metadata store service url. eg: zk:my-zk:2181")
"--metadata-store"}, description = "Metadata store service URL. For example: zk:my-zk:2181")

Please capitalize proper nouns correctly. Details: https://docs.google.com/document/d/1lc5j4RtuLIzlEYCBo97AC8-U_3Erzs_lxpkDuseU0n4/edit#bookmark=id.je5thtkj42cb

@Anonymitaet Anonymitaet added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-required Your PR changes impact docs and you will update later. labels Feb 8, 2022
@merlimat merlimat merged commit 605070b into apache:master Feb 8, 2022
@Anonymitaet Anonymitaet added this to the 2.10.0 milestone Feb 10, 2022
@Anonymitaet Anonymitaet added the doc-complete Your PR changes impact docs and the related docs have been already added. label Feb 10, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
…naged-ledger` (apache#14145)

* [Pulsar-Perf] Allow configuring `metadataStoreUrl` in `pulsar-perf managed-ledger`

Motivation
`zookeeperServers` need to be renamed to `metadataStoreUrl`

Modifications
* Add `metadataStoreUrl` parameter to ManagedLedgerWriter of the pulsar perf.

Signed-off-by: Zike Yang <zkyang@streamnative.io>

* Make zookeeperServers hidden.

Signed-off-by: Zike Yang <zkyang@streamnative.io>

* Add null checker.

Signed-off-by: Zike Yang <zkyang@streamnative.io>

* Add deprecated.

Signed-off-by: Zike Yang <zkyang@streamnative.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. doc-complete Your PR changes impact docs and the related docs have been already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants