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

[java-client] Add support for key hash range reading. #5928

Merged
merged 3 commits into from
Jan 9, 2020

Conversation

codelipenghui
Copy link
Contributor

Master Issue: #4077

Motivation

Add support for sticky key hash range reader. Broker will only dispatch messages which hash of the message key contains by the specified key hash range.

Multiple key hash ranges can be specified on a reader by following example:

pulsarClient.newReader()
                    .topic(topic)
                    .startMessageId(MessageId.earliest)
                    .keyHashRange(Range.of(0, 10000), Range.of(20001, 30000))
                    .create();

Verifying this change

New unit tests was added for cover this change

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: (yes )
  • 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

  • Does this pull request introduce a new feature? (yes)

@codelipenghui
Copy link
Contributor Author

run java8 tests
run integration tests

@codelipenghui
Copy link
Contributor Author

run cpp tests

@codelipenghui
Copy link
Contributor Author

rerun java8 tests

1 similar comment
@codelipenghui
Copy link
Contributor Author

rerun java8 tests

@codelipenghui
Copy link
Contributor Author

run java8 tests
run integration tests

@codelipenghui
Copy link
Contributor Author

run java8 tests

2 similar comments
@codelipenghui
Copy link
Contributor Author

run java8 tests

@codelipenghui
Copy link
Contributor Author

run java8 tests

@codelipenghui
Copy link
Contributor Author

rerun java8 tests

2 similar comments
@codelipenghui
Copy link
Contributor Author

rerun java8 tests

@codelipenghui
Copy link
Contributor Author

rerun java8 tests

Copy link
Member

@sijie sijie left a comment

Choose a reason for hiding this comment

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

LGTM +1

@codelipenghui well done!

Can you rebase this pull request to master?

@sijie sijie added area/client java type/feature The PR added a new feature or issue requested a new feature labels Jan 6, 2020
@sijie sijie added this to the 2.6.0 milestone Jan 6, 2020
@codelipenghui
Copy link
Contributor Author

retest this please

1 similar comment
@codelipenghui
Copy link
Contributor Author

retest this please

@sijie
Copy link
Member

sijie commented Jan 8, 2020

run java8 tests
run integration tests

@codelipenghui
Copy link
Contributor Author

run integration tests

@codelipenghui codelipenghui merged commit 5fc4a90 into apache:master Jan 9, 2020
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Aug 24, 2020
### Motivation

Add support for sticky key hash range reader. Broker will only dispatch messages which hash of the message key contains by  the specified key hash range. 

Multiple key hash ranges can be specified on a reader by following example:
```java
pulsarClient.newReader()
                    .topic(topic)
                    .startMessageId(MessageId.earliest)
                    .keyHashRange(Range.of(0, 10000), Range.of(20001, 30000))
                    .create();
```
@codelipenghui codelipenghui deleted the key_range_reader branch March 19, 2021 05:09
@codelipenghui codelipenghui added the doc-required Your PR changes impact docs and you will update later. label Mar 19, 2021
@Anonymitaet Anonymitaet added doc-complete Your PR changes impact docs and the related docs have been already added. and removed doc-required Your PR changes impact docs and you will update later. labels Feb 21, 2022
@Anonymitaet
Copy link
Member

Doc is added
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client doc-complete Your PR changes impact docs and the related docs have been already added. type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants