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

[metadata] Optimize put and get methods in AbstractMetadataStore #12916

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

Jason918
Copy link
Contributor

Motivation

For the convenience to implement other metadata store, I am proposing two small optimizations to AbstractMetadataStore.

  1. The implementation of put is the same in LocalMemoryMetadataStore and ZKMetadataStore, can be moved to AbstractMetadataStore.
  2. Add abstract method storeGet in AbstractMetadataStore, so that all subclass only need to implement "storeXXX" version methods. And we can add common code in AbstractMetadataStore#get like the path parameter check.

Modifications

See above.

Verifying this change

  • Make sure that the change passes the CI checks.

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

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • no-need-doc

Code optimize. No user behavior changed.

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 22, 2021
@codelipenghui codelipenghui added this to the 2.10.0 milestone Nov 22, 2021
@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Nov 22, 2021
@merlimat merlimat merged commit 2d83a82 into apache:master Nov 22, 2021
zeo1995 pushed a commit to zeo1995/pulsar that referenced this pull request Nov 23, 2021
* up/master:
  [Doc] add explanations for REST (apache#12918)
  [Doc] add explanations for permissions (apache#12920)
  Apply executable file permissions to py scripts. (apache#12852)
  Fix log level config for pulsar-admin, pulsar-client and pulsar-perf (apache#12915)
  Abstract some common methods to AbstractMetadataStore (apache#12916)
  Build website using https://pulsar.apache.org (apache#12901)
dlg99 pushed a commit to dlg99/pulsar that referenced this pull request Nov 23, 2021
eolivelli pushed a commit to eolivelli/pulsar that referenced this pull request Nov 29, 2021
fxbing pushed a commit to fxbing/pulsar that referenced this pull request Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants