You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "jiang13021 (via GitHub)" <gi...@apache.org> on 2024/09/02 13:36:28 UTC

[PR] [CELEBORN-1585] Remove updateMapStatus in HashBasedShuffleWriter [celeborn]

jiang13021 opened a new pull request, #2720:
URL: https://github.com/apache/celeborn/pull/2720

   <!--
   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?
   Similar to https://github.com/apache/celeborn/pull/2508, it is unnecessary to call updateRecordsWrittenMetrics in HashBasedShuffleWriter for spark3. So we can remove updateMapStatus in HashBasedShuffleWriter.
   
   
   ### Why are the changes needed?
    ditto
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   No
   


-- 
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


Re: [PR] [CELEBORN-1585] Remove updateRecordsWrittenMetrics in HashBasedShuffleWriter [celeborn]

Posted by "jiang13021 (via GitHub)" <gi...@apache.org>.
jiang13021 commented on PR #2720:
URL: https://github.com/apache/celeborn/pull/2720#issuecomment-2327821442

   Please review this, thank you. cc @waitinfuture @RexXiong @onebox-li


-- 
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


Re: [PR] [CELEBORN-1585] Remove updateRecordsWrittenMetrics in HashBasedShuffleWriter [celeborn]

Posted by "jiang13021 (via GitHub)" <gi...@apache.org>.
jiang13021 commented on code in PR #2720:
URL: https://github.com/apache/celeborn/pull/2720#discussion_r1746457092


##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/HashBasedShuffleWriter.java:
##########
@@ -374,7 +373,7 @@ private void close() throws IOException, InterruptedException {
     closeWrite();
     shuffleClient.pushMergedData(shuffleId, mapId, encodedAttemptId);
     writeMetrics.incWriteTime(System.nanoTime() - pushMergedDataTime);
-    updateRecordsWrittenMetrics();
+    writeMetrics.incRecordsWritten(tmpRecordsWritten);

Review Comment:
   The way we observe the change in metrics is to wait for the task to enter its final state (success, failure, or killed), then collect the metrics and resend them to the driver. The driver will then collect and display the metrics. Therefore, IMO, only updating metrics when close does not affect our observation of the change in metrics for the running stage.



-- 
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


Re: [PR] [CELEBORN-1585] Remove updateRecordsWrittenMetrics in HashBasedShuffleWriter [celeborn]

Posted by "jiang13021 (via GitHub)" <gi...@apache.org>.
jiang13021 commented on code in PR #2720:
URL: https://github.com/apache/celeborn/pull/2720#discussion_r1746661315


##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/HashBasedShuffleWriter.java:
##########
@@ -374,7 +373,7 @@ private void close() throws IOException, InterruptedException {
     closeWrite();
     shuffleClient.pushMergedData(shuffleId, mapId, encodedAttemptId);
     writeMetrics.incWriteTime(System.nanoTime() - pushMergedDataTime);
-    updateRecordsWrittenMetrics();
+    writeMetrics.incRecordsWritten(tmpRecordsWritten);

Review Comment:
   Sorry, my mistake. Our logView made modifications here, and I mistakenly thought it was the original logic of Spark. Thank you for pointing this out. I will close this PR.



-- 
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


Re: [PR] [CELEBORN-1585] Remove updateRecordsWrittenMetrics in HashBasedShuffleWriter [celeborn]

Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on code in PR #2720:
URL: https://github.com/apache/celeborn/pull/2720#discussion_r1746480530


##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/HashBasedShuffleWriter.java:
##########
@@ -374,7 +373,7 @@ private void close() throws IOException, InterruptedException {
     closeWrite();
     shuffleClient.pushMergedData(shuffleId, mapId, encodedAttemptId);
     writeMetrics.incWriteTime(System.nanoTime() - pushMergedDataTime);
-    updateRecordsWrittenMetrics();
+    writeMetrics.incRecordsWritten(tmpRecordsWritten);

Review Comment:
   <img width="1179" alt="image" src="https://github.com/user-attachments/assets/6ffd383e-7cee-4611-9cd3-57ce0836b60a">
   
   
   ```bash
   spark.sparkContext.parallelize(1 to 1000000, 2).map { i => (i, Range(1, 1000).mkString(",")) }.groupByKey(16).collect()
   ```
   
   
   SPARK-2099. Report progress while task is running.
   
   https://issues.apache.org/jira/browse/SPARK-2099
   
   https://github.com/apache/spark/blob/26e59f26b10c1647b4517869fc911fb7e13fdd22/core/src/main/scala/org/apache/spark/shuffle/ShufflePartitionPairsWriter.scala#L129-L146



-- 
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


Re: [PR] [CELEBORN-1585] Remove updateRecordsWrittenMetrics in HashBasedShuffleWriter [celeborn]

Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on code in PR #2720:
URL: https://github.com/apache/celeborn/pull/2720#discussion_r1746480530


##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/HashBasedShuffleWriter.java:
##########
@@ -374,7 +373,7 @@ private void close() throws IOException, InterruptedException {
     closeWrite();
     shuffleClient.pushMergedData(shuffleId, mapId, encodedAttemptId);
     writeMetrics.incWriteTime(System.nanoTime() - pushMergedDataTime);
-    updateRecordsWrittenMetrics();
+    writeMetrics.incRecordsWritten(tmpRecordsWritten);

Review Comment:
   <img width="1179" alt="image" src="https://github.com/user-attachments/assets/6ffd383e-7cee-4611-9cd3-57ce0836b60a">
   
   
   ```bash
   spark.sparkContext.parallelize(1 to 1000000, 2).map { i => (i, Range(1, 1000).mkString(",")) }.groupByKey(16).collect()
   ```
   
   
   SPARK-2099. Report progress while task is running.
   
   https://issues.apache.org/jira/browse/SPARK-2099



-- 
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


Re: [PR] [CELEBORN-1585] Remove updateRecordsWrittenMetrics in HashBasedShuffleWriter [celeborn]

Posted by "zaynt4606 (via GitHub)" <gi...@apache.org>.
zaynt4606 commented on PR #2720:
URL: https://github.com/apache/celeborn/pull/2720#issuecomment-2328092064

   LGTM.


-- 
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


Re: [PR] [CELEBORN-1585] Remove updateRecordsWrittenMetrics in HashBasedShuffleWriter [celeborn]

Posted by "jiang13021 (via GitHub)" <gi...@apache.org>.
jiang13021 closed pull request #2720: [CELEBORN-1585] Remove updateRecordsWrittenMetrics in HashBasedShuffleWriter
URL: https://github.com/apache/celeborn/pull/2720


-- 
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


Re: [PR] [CELEBORN-1585] Remove updateRecordsWrittenMetrics in HashBasedShuffleWriter [celeborn]

Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on code in PR #2720:
URL: https://github.com/apache/celeborn/pull/2720#discussion_r1745530557


##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/HashBasedShuffleWriter.java:
##########
@@ -374,7 +373,7 @@ private void close() throws IOException, InterruptedException {
     closeWrite();
     shuffleClient.pushMergedData(shuffleId, mapId, encodedAttemptId);
     writeMetrics.incWriteTime(System.nanoTime() - pushMergedDataTime);
-    updateRecordsWrittenMetrics();
+    writeMetrics.incRecordsWritten(tmpRecordsWritten);

Review Comment:
   If we only update metrics when close, how can we observe changes in the metrics of the running stage?



-- 
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