You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "boneanxs (via GitHub)" <gi...@apache.org> on 2023/02/07 08:11:00 UTC
[GitHub] [incubator-celeborn] boneanxs opened a new pull request, #1209: [CELEBORN-275] WrappedCallback should only handle response from replica
boneanxs opened a new pull request, #1209:
URL: https://github.com/apache/incubator-celeborn/pull/1209
<!--
Thanks for sending a pull request! Here are some tips for you:
- Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] Your PR title ...'.
- Be sure to keep the PR description updated to reflect all changes.
- Please write your PR title to summarize what this PR proposes.
- If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
1. Move `WrappedCallback` in the `doReplicate` block
2. Remove unnecessary check in the wrappedCallback
3. Currently slave push data timer metric is not well calculated, need to fix it
### Why are the changes needed?
Clean the codes and fix the bug of calculating slave push data timer
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
MT. and existing UT.
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] codecov[bot] commented on pull request #1209: [CELEBORN-275] WrappedCallback should only handle response from replica
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #1209:
URL: https://github.com/apache/incubator-celeborn/pull/1209#issuecomment-1420372071
# [Codecov](https://codecov.io/gh/apache/incubator-celeborn/pull/1209?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 [#1209](https://codecov.io/gh/apache/incubator-celeborn/pull/1209?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (90bf113) into [main](https://codecov.io/gh/apache/incubator-celeborn/commit/bff6e91e0b2c29bc412705a64b1afd1f369d7c44?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bff6e91) will **decrease** coverage by `0.02%`.
> The diff coverage is `0.00%`.
```diff
@@ Coverage Diff @@
## main #1209 +/- ##
============================================
- Coverage 27.25% 27.22% -0.02%
+ Complexity 806 804 -2
============================================
Files 212 212
Lines 17932 17937 +5
Branches 1962 1957 -5
============================================
- Hits 4885 4882 -3
- Misses 12724 12731 +7
- Partials 323 324 +1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-celeborn/pull/1209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...leborn/service/deploy/worker/PushDataHandler.scala](https://codecov.io/gh/apache/incubator-celeborn/pull/1209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d29ya2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvY2VsZWJvcm4vc2VydmljZS9kZXBsb3kvd29ya2VyL1B1c2hEYXRhSGFuZGxlci5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [...ice/deploy/master/clustermeta/ha/HARaftServer.java](https://codecov.io/gh/apache/incubator-celeborn/pull/1209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWFzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jZWxlYm9ybi9zZXJ2aWNlL2RlcGxveS9tYXN0ZXIvY2x1c3Rlcm1ldGEvaGEvSEFSYWZ0U2VydmVyLmphdmE=) | `76.58% <0.00%> (-1.35%)` | :arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #1209: [CELEBORN-275] WrappedCallback should only handle response from replica
Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on code in PR #1209:
URL: https://github.com/apache/incubator-celeborn/pull/1209#discussion_r1098411378
##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/PushDataHandler.scala:
##########
@@ -645,6 +635,25 @@ class PushDataHandler extends BaseMessageHandler with Logging {
override def checkRegistered(): Boolean = registered.get()
+ class WrappedTimeMetric(
Review Comment:
This class name is weird.... how about `RpcResponseCallbackWithTimer `
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] AngersZhuuuu commented on pull request #1209: [CELEBORN-275] WrappedCallback should only handle response from replica
Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on PR #1209:
URL: https://github.com/apache/incubator-celeborn/pull/1209#issuecomment-1420480647
Pls run `./dev/reformat` to format the code
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture merged pull request #1209: [CELEBORN-275] WrappedCallback should only handle response from replica
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture merged PR #1209:
URL: https://github.com/apache/incubator-celeborn/pull/1209
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1209: [CELEBORN-275] WrappedCallback should only handle response from replica
Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture commented on code in PR #1209:
URL: https://github.com/apache/incubator-celeborn/pull/1209#discussion_r1098370415
##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/PushDataHandler.scala:
##########
@@ -385,11 +379,12 @@ class PushDataHandler extends BaseMessageHandler with Logging {
val isMaster = mode == PartitionLocation.Mode.MASTER
val key = s"${pushMergedData.requestId}"
- if (isMaster) {
- workerSource.startTimer(WorkerSource.MasterPushDataTime, key)
- } else {
- workerSource.startTimer(WorkerSource.SlavePushDataTime, key)
- }
+ val callbackWithTimer =
+ if (isMaster) {
+ new WrappedTimeMetric(workerSource, WorkerSource.MasterPushDataTime, key, callback)
+ } else {
+ new WrappedTimeMetric(workerSource, WorkerSource.MasterPushDataTime, key, callback)
Review Comment:
SlavePushDataTime
##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/PushDataHandler.scala:
##########
@@ -645,6 +635,24 @@ class PushDataHandler extends BaseMessageHandler with Logging {
override def checkRegistered(): Boolean = registered.get()
+ class WrappedTimeMetric(
+ source: Source,
+ metricName: String,
+ key: String,
+ callback: RpcResponseCallback)
+ extends RpcResponseCallback {
+ source.startTimer(metricName, key)
+
+ override def onSuccess(response: ByteBuffer): Unit = {
+ callback.onSuccess(response)
+ source.stopTimer(metricName, key)
+ }
+
+ override def onFailure(e: Throwable): Unit = {
+ callback.onFailure(e)
+ source.stopTimer(metricName, key)
+ }
+ }
Review Comment:
please add a blank line after the class definition
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org