You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/07 22:44:46 UTC
[GitHub] [pulsar] mendonk opened a new pull request, #18809: [improve][doc] ProducerBuilder.java
mendonk opened a new pull request, #18809:
URL: https://github.com/apache/pulsar/pull/18809
### Motivation
Improve the comments in ProducerBuilder.java for clarity and cleanliness.
These can be the first documentation devs see in an IDE, so they should inspire more confidence in users.
### Modifications
Cleaned up the comments in the ProducerBuilder.java file.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
*(Please pick either of the following options)*
This change is a trivial rework / code cleanup without any test coverage.
*(or)*
This change is already covered by existing tests, such as *(please describe tests)*.
*(or)*
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end deployment with large payloads (10MB)*
- *Extended integration test for recovery after broker failure*
### Does this pull request potentially affect one of the following parts:
*If the box was checked, please highlight the changes*
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] Anything that affects deployment
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [x] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codecov-commenter commented on pull request #18809: [improve][doc] ProducerBuilder.java
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #18809:
URL: https://github.com/apache/pulsar/pull/18809#issuecomment-1347610110
# [Codecov](https://codecov.io/gh/apache/pulsar/pull/18809?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#18809](https://codecov.io/gh/apache/pulsar/pull/18809?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0ccac3d) into [master](https://codecov.io/gh/apache/pulsar/commit/99e26f5e943e3978bba135a2c17ff08dc9b9599a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (99e26f5) will **decrease** coverage by `7.70%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/pulsar/pull/18809/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/pulsar/pull/18809?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #18809 +/- ##
============================================
- Coverage 44.79% 37.09% -7.71%
+ Complexity 10026 1970 -8056
============================================
Files 703 209 -494
Lines 68808 14431 -54377
Branches 7375 1574 -5801
============================================
- Hits 30822 5353 -25469
+ Misses 34378 8493 -25885
+ Partials 3608 585 -3023
```
| Flag | Coverage Δ | |
|---|---|---|
| unittests | `37.09% <ø> (-7.71%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/18809?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...he/pulsar/client/impl/MultiTopicsConsumerImpl.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL011bHRpVG9waWNzQ29uc3VtZXJJbXBsLmphdmE=) | `22.78% <0.00%> (-0.20%)` | :arrow_down: |
| [...va/org/apache/pulsar/client/impl/ConsumerImpl.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0NvbnN1bWVySW1wbC5qYXZh) | `15.09% <0.00%> (-0.04%)` | :arrow_down: |
| [...ar/broker/service/persistent/ShadowReplicator.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL3BlcnNpc3RlbnQvU2hhZG93UmVwbGljYXRvci5qYXZh) | | |
| [...ache/pulsar/broker/loadbalance/LinuxInfoUtils.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9sb2FkYmFsYW5jZS9MaW51eEluZm9VdGlscy5qYXZh) | | |
| [...va/org/apache/pulsar/broker/service/ServerCnx.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1NlcnZlckNueC5qYXZh) | | |
| [...java/org/apache/pulsar/proxy/stats/ProxyStats.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLXByb3h5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvcHJveHkvc3RhdHMvUHJveHlTdGF0cy5qYXZh) | | |
| [...r/service/SystemTopicTxnBufferSnapshotService.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1N5c3RlbVRvcGljVHhuQnVmZmVyU25hcHNob3RTZXJ2aWNlLmphdmE=) | | |
| [...roker/service/PulsarMetadataEventSynchronizer.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1B1bHNhck1ldGFkYXRhRXZlbnRTeW5jaHJvbml6ZXIuamF2YQ==) | | |
| [...saction/pendingack/impl/PendingAckHandleState.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci90cmFuc2FjdGlvbi9wZW5kaW5nYWNrL2ltcGwvUGVuZGluZ0Fja0hhbmRsZVN0YXRlLmphdmE=) | | |
| [...java/org/apache/pulsar/broker/rest/TopicsBase.java](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9yZXN0L1RvcGljc0Jhc2UuamF2YQ==) | | |
| ... and [487 more](https://codecov.io/gh/apache/pulsar/pull/18809/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on a diff in pull request #18809: [improve][doc] ProducerBuilder.java
Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #18809:
URL: https://github.com/apache/pulsar/pull/18809#discussion_r1044073449
##########
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ProducerBuilder.java:
##########
@@ -275,15 +275,16 @@
/**
* Set the compression type for the producer.
*
- * <p>By default, message payloads are not compressed. Supported compression types are:
+ * <p>By default, message payloads are not compressed.
+ * <p>Supported compression types are:
* <ul>
- * <li>{@link CompressionType#NONE}: No compression (Default)</li>
- * <li>{@link CompressionType#LZ4}: Compress with LZ4 algorithm. Faster but lower compression than ZLib</li>
- * <li>{@link CompressionType#ZLIB}: Standard ZLib compression</li>
- * <li>{@link CompressionType#ZSTD} Compress with Zstandard codec. Since Pulsar 2.3. Zstd cannot be used if consumer
- * applications are not in version >= 2.3 as well</li>
- * <li>{@link CompressionType#SNAPPY} Compress with Snappy codec. Since Pulsar 2.4. Snappy cannot be used if
- * consumer applications are not in version >= 2.4 as well</li>
+ * <li>{@link CompressionType#NONE}: No compression (default)</li>
+ * <li>{@link CompressionType#LZ4}: Compress with LZ4 algorithm. Faster but lower compression than ZLib.</li>
+ * <li>{@link CompressionType#ZLIB}: Standard ZLib compression.</li>
+ * <li>{@link CompressionType#ZSTD} Compress with Zstandard codec. Since Pulsar 2.3, Zstandard can only be used
Review Comment:
```suggestion
* <li>{@link CompressionType#ZSTD} Compress with Zstd codec. Since Pulsar 2.3, Zstd can only be used
```
This should be a famous abbr.
##########
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ProducerBuilder.java:
##########
@@ -164,37 +164,37 @@
ProducerBuilder<T> sendTimeout(int sendTimeout, TimeUnit unit);
/**
- * Set the max size of the queue holding the messages pending to receive an acknowledgment from the broker.
+ * Set the max size of the messages pending queue to receive an acknowledgment from the broker.
Review Comment:
```suggestion
* Set the max size of the queue holding the messages pending to receive an acknowledgment from the broker.
```
Revert. Not quite different.
##########
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ProducerBuilder.java:
##########
@@ -164,37 +164,37 @@
ProducerBuilder<T> sendTimeout(int sendTimeout, TimeUnit unit);
/**
- * Set the max size of the queue holding the messages pending to receive an acknowledgment from the broker.
+ * Set the max size of the messages pending queue to receive an acknowledgment from the broker.
*
* <p>When the queue is full, by default, all calls to {@link Producer#send} and {@link Producer#sendAsync}
* will fail unless {@code blockIfQueueFull=true}. Use {@link #blockIfQueueFull(boolean)}
* to change the blocking behavior.
*
* <p>The producer queue size also determines the max amount of memory that will be required by
- * the client application. Until, the producer gets a successful acknowledgment back from the broker,
+ * the client application. Until the producer gets a successful acknowledgment back from the broker,
* it will keep in memory (direct memory pool) all the messages in the pending queue.
*
- * <p>Default is 0, disable the pending messages check.
+ * <p>Default is 0, which disables the pending messages check.
*
* @param maxPendingMessages
- * the max size of the pending messages queue for the producer
+ * the max size of the messages pending queue for the producer
Review Comment:
```suggestion
* the max size of the pending messages queue for the producer
```
This should be the idiom phrase and also the method is named `maxPendingMessages `
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on pull request #18809: [improve][doc] ProducerBuilder.java
Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #18809:
URL: https://github.com/apache/pulsar/pull/18809#issuecomment-1348315830
Merging...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun merged pull request #18809: [improve][doc] ProducerBuilder.java
Posted by GitBox <gi...@apache.org>.
tisonkun merged PR #18809:
URL: https://github.com/apache/pulsar/pull/18809
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org