Skip to content

[improve][doc] ProducerBuilder.java - #1

Closed
mendonk wants to merge 1630 commits into
masterfrom
mkissling-cleanup-producer-builder-javadoc
Closed

mendonk wants to merge 1630 commits into
masterfrom
mkissling-cleanup-producer-builder-javadoc

Conversation

@mendonk

@mendonk mendonk commented Dec 7, 2022 •

Copy link
Copy Markdown
Owner

This PR is for running tests for upstream PR apache#18809.

/pulsarbot rerun-failure-checks

tjiuming and others added 30 commits October 24, 2022 20:24
…ackAffinityMapping (apache#15640)

* [Autorecovery] Default reppDnsResolverClass to ZkBookieRackAffinityMapping

* Improve documentation

Fixes: apache#18012

### Motivation

The current Bookkeeper configuration defaults to using `org.apache.bookkeeper.net.ScriptBasedMapping` for the `DNSToSwitchMapping` implementation. However, this default configuration does not align with the Broker's default configuration, which is `org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping`. As such, the default configuration for a Pulsar cluster does not lead to ideal rack awareness when ledgers need to be recovered. The result is that a user can configure a cluster for rack awareness and the brokers will honor that configuration, but the autorecovery process will not because it does not have the correct bookkeeper cluster topology view.

I propose we configure bookkeeper to use the broker's `ZkBookieRackAffinityMapping` class. That way, autorecovery will honor the operator's configured rack awareness policies out of the box.

### Modifications

* Add default value for `reppDnsResolverClass` to the `conf/bookkeeper.conf` configuration. This change effectively switches the default from `org.apache.bookkeeper.net.ScriptBasedMapping` to `org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping`.

### Verifying this change

I manually verified that the `ZkBookieRackAffinityMapping` works by running some tests in a minikube cluster deployed with the DataStax helm chart. I set up 3 racks, 4 bookies, and a topic with a E=2, Qw=2, and Qa=2. I then verified that the autorecovery pod correctly discovered the racks and then identified when an ensemble was not following the rack placement policy after two bookies were removed. I documented my testing a bit more here: datastax/pulsar-helm-chart#214.

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

It changes a default value. The tradeoff is that a user relying on the `ScriptBasedMapping` default might accidentally get switched to using the `ZkBookieRackAffinityMapping` implementation. Given that `ScriptBasedMapping` doesn't work out of the box, and that the broker's default to `ZkBookieRackAffinityMapping`, I think this is an acceptable tradeoff.

- [x] `doc`
* [fix][doc] Remove archived and halted repositories

* Add back archived repositories

For anyone who wants to revive them.

Signed-off-by: tison <[email protected]>

Signed-off-by: tison <[email protected]>
* do not serialize field bundleStats

* add unit test.

* use org.testng.Assert.assertFalse

* add apache license header

* fix doc

* fix doc and change the package level.

Co-authored-by: fengwenzhi <[email protected]>
* add go-client chunking doc

* Update site2/docs/client-libraries-go.md

Co-authored-by: Zixuan Liu <[email protected]>

* Update site2/docs/client-libraries-go.md

Co-authored-by: Anonymitaet <[email protected]>

* Update site2/docs/client-libraries-go.md

Co-authored-by: Anonymitaet <[email protected]>

* Update site2/docs/client-libraries-go.md

Co-authored-by: Anonymitaet <[email protected]>

Co-authored-by: Zixuan Liu <[email protected]>
Co-authored-by: Anonymitaet <[email protected]>
…multiple providers (apache#18035)

* Update security-athenz.md

* improve auth overview

* address review comments

* Improve OAuth2 authentication

* improve Kerberos authentication

* Update security-athenz.md
…he#18188)

* [improve][doc] cherry-pick cpp client docs installation section

Signed-off-by: tison <[email protected]>

* Apply suggestions from code review

Co-authored-by: momo-jun <[email protected]>

* Update client-libraries-cpp.md

Signed-off-by: tison <[email protected]>
Co-authored-by: momo-jun <[email protected]>
apache#18219)

### Motivation
https://github.com/apache/pulsar/blob/b061c6ac5833c21e483368febebd0d30679a35e1/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L748-L774
The `pendingLookupRequestSemaphore` will leak when handleError. There are `LookUpRequestSemaphore` not released when removing it from `pendingRequests`

related PR: apache#17856 

### Modifications
We can't easily release the semaphore in `handleError`, because there are not only `LookUpRequest`. So release the semaphore when LookupException

### Verifying this change
Add unit test case to cover this change

### Documentation

<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->

- [ ] `doc-required` 
(Your PR needs to update docs and you will update later)

- [x] `doc-not-needed` 
bug fixs, no need doc

- [ ] `doc` 
(Your PR contains doc changes)

- [ ] `doc-complete`
(Docs have been already added)
BewareMyPower and others added 26 commits November 29, 2022 12:38
…8489)

### Modifications
This PR Added ServiceUnitStateChannelImpl and its unit test.

For the pip-192 project, this ServiceUnitStateChannelImpl
- has a tableview and a producer on the system topic, persistent://pulsar/system/service-unit-state-channel
- has a leader coordination service to elect the owner broker of the channel.
- define message handlers according to the service unit state changes.
- define ownership cleanup logic in case a broker is unregistered (dead).
…pache#18084)

Master Issue: apache#16691

### Motivation

We will start raising PRs to implement PIP-192, apache#16691

### Modifications

The PR adds base classes for the new broker load balance project and does not integrate with the existing load balance logic. This PR should not impact the existing broker load balance behavior.

For the pip-192 project, this PR

* defines the base interface under `org.apache.pulsar.broker.loadbalance.extensible` package.
* defines this `BrokerRegistry` public interface and its expected behaviors.
* defines `BrokerFilter` interfaces.
* defines `LoadDataReporter` interfaces.
* defines `NamespaceBundleSplitStrategy` interfaces.
* defines `LoadManagerScheduler` interfaces.
* defines `NamespaceUnloadStrategy` interfaces.
* defines `LoadDataStore` interfaces.
* defines `ExtensibleLoadManager` interfaces.
* defines `LoadManagerContext` interfaces.
* defines `BrokerLoadData` and `BrokerLookupData` data classes.
@mendonk mendonk changed the title [run-tests] [improve][doc] ProducerBuilder.java [improve][doc] ProducerBuilder.java Dec 8, 2022
@mendonk mendonk closed this Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.