-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Producer] Change the time units from ns to ms #13057
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
merlimat
reviewed
Nov 30, 2021
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
Outdated
Show resolved
Hide resolved
merlimat
added
the
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
label
Nov 30, 2021
michaeljmarshall
requested changes
Dec 3, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you contribution @tomscut. I'd like to get some consensus that changing from nanoTime
to currentTimeMillis
is the right change before we merge this PR.
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
Outdated
Show resolved
Hide resolved
tomscut
force-pushed
the
change-time-unit
branch
from
December 11, 2021 00:37
723f12f
to
f8356f5
Compare
Hi @merlimat @michaeljmarshall @hangc0276 , could you please help review again. Thanks a lot. |
merlimat
approved these changes
Dec 15, 2021
michaeljmarshall
approved these changes
Dec 15, 2021
nicoloboschi
approved these changes
Dec 16, 2021
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
Outdated
Show resolved
Hide resolved
nicoloboschi
approved these changes
Dec 16, 2021
michaeljmarshall
approved these changes
Dec 16, 2021
hangc0276
approved these changes
Dec 23, 2021
Technoboy-
pushed a commit
to Technoboy-/pulsar
that referenced
this pull request
Dec 29, 2021
### Motivation The time unit in this exception message is ns, which is not very readable. We can change it from ns to ms. ``` org.apache.pulsar.client.api.PulsarClientException$TimeoutException: The producer xxx can not send message to the topic xxx within given timeout : createdAt 461913074 ns ago, firstSentAt 29545553038276935 ns ago, lastSentAt 29545553038276935 ns ago, retryCount 0 at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:916) at org.apache.pulsar.client.impl.TypedMessageBuilderImpl.send(TypedMessageBuilderImpl.java:93) at org.apache.pulsar.client.impl.ProducerBase.send(ProducerBase.java:63) at com.yum.boh.oh.service.impl.StoreOrderPostServiceImpl.generalProcessing(StoreOrderPostServiceImpl.java:272) at com.yum.boh.oh.service.impl.StoreOrderPostServiceImpl.saveThirdOrder(StoreOrderPostServiceImpl.java:72) at com.yum.boh.oh.controller.StoreOrderController.postOrderInfo$original$T8425mfx(StoreOrderController.java:39) at com.yum.boh.oh.controller.StoreOrderController.postOrderInfo$original$T8425mfx$accessor$vJljNzML(StoreOrderController.java) at com.yum.boh.oh.controller.StoreOrderController$auxiliary$nysalhgy.call(Unknown Source) at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:86) ``` ### Modifications Change the time units from ns to ms for ProducerImpl#OpSendMsg.
codelipenghui
pushed a commit
that referenced
this pull request
Dec 30, 2021
### Motivation The time unit in this exception message is ns, which is not very readable. We can change it from ns to ms. ``` org.apache.pulsar.client.api.PulsarClientException$TimeoutException: The producer xxx can not send message to the topic xxx within given timeout : createdAt 461913074 ns ago, firstSentAt 29545553038276935 ns ago, lastSentAt 29545553038276935 ns ago, retryCount 0 at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:916) at org.apache.pulsar.client.impl.TypedMessageBuilderImpl.send(TypedMessageBuilderImpl.java:93) at org.apache.pulsar.client.impl.ProducerBase.send(ProducerBase.java:63) at com.yum.boh.oh.service.impl.StoreOrderPostServiceImpl.generalProcessing(StoreOrderPostServiceImpl.java:272) at com.yum.boh.oh.service.impl.StoreOrderPostServiceImpl.saveThirdOrder(StoreOrderPostServiceImpl.java:72) at com.yum.boh.oh.controller.StoreOrderController.postOrderInfo$original$T8425mfx(StoreOrderController.java:39) at com.yum.boh.oh.controller.StoreOrderController.postOrderInfo$original$T8425mfx$accessor$vJljNzML(StoreOrderController.java) at com.yum.boh.oh.controller.StoreOrderController$auxiliary$nysalhgy.call(Unknown Source) at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:86) ``` ### Modifications Change the time units from ns to ms for ProducerImpl#OpSendMsg. (cherry picked from commit 891660e)
codelipenghui
pushed a commit
that referenced
this pull request
Dec 30, 2021
### Motivation The time unit in this exception message is ns, which is not very readable. We can change it from ns to ms. ``` org.apache.pulsar.client.api.PulsarClientException$TimeoutException: The producer xxx can not send message to the topic xxx within given timeout : createdAt 461913074 ns ago, firstSentAt 29545553038276935 ns ago, lastSentAt 29545553038276935 ns ago, retryCount 0 at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:916) at org.apache.pulsar.client.impl.TypedMessageBuilderImpl.send(TypedMessageBuilderImpl.java:93) at org.apache.pulsar.client.impl.ProducerBase.send(ProducerBase.java:63) at com.yum.boh.oh.service.impl.StoreOrderPostServiceImpl.generalProcessing(StoreOrderPostServiceImpl.java:272) at com.yum.boh.oh.service.impl.StoreOrderPostServiceImpl.saveThirdOrder(StoreOrderPostServiceImpl.java:72) at com.yum.boh.oh.controller.StoreOrderController.postOrderInfo$original$T8425mfx(StoreOrderController.java:39) at com.yum.boh.oh.controller.StoreOrderController.postOrderInfo$original$T8425mfx$accessor$vJljNzML(StoreOrderController.java) at com.yum.boh.oh.controller.StoreOrderController$auxiliary$nysalhgy.call(Unknown Source) at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:86) ``` ### Modifications Change the time units from ns to ms for ProducerImpl#OpSendMsg. (cherry picked from commit 891660e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/client
cherry-picked/branch-2.8
Archived: 2.8 is end of life
cherry-picked/branch-2.9
Archived: 2.9 is end of life
doc-not-needed
Your PR changes do not impact docs
release/2.8.3
release/2.9.2
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The time unit in this exception message is ns, which is not very readable. We can change it from ns to ms.
Modifications
Change the time units from ns to ms for ProducerImpl#OpSendMsg.
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
doc-required
no-need-doc
doc