You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "xy2953396112 (via GitHub)" <gi...@apache.org> on 2025/08/17 07:08:52 UTC

[PR] [CELEBORN-2114] Add max partition number threshold when allocates shu… [celeborn]

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

   …ffle
   
   <!--
   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?
   
   Add max partition number threshold when allocates shuffle
   


-- 
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-2114] Add max partition number threshold when allocates shu… [celeborn]

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


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -3054,6 +3056,24 @@ object CelebornConf extends Logging {
       .intConf
       .createWithDefault(2)
 
+  val MASTER_SLOT_ASSIGN_MAX_PARTITIONS: ConfigEntry[Int] =
+    buildConf("celeborn.master.slot.assign.maxPartitions")
+      .withAlternative("celeborn.slots.assign.maxPartitions")
+      .categories("master")
+      .version("0.6.0")
+      .doc("Max partition numbers that one shuffle can be allocated, reject if exceeds")
+      .intConf
+      .createWithDefault(50000)

Review Comment:
   it would fail the applications and is a break change
   
   You can set a threshold to fallback in client end.
   https://github.com/apache/celeborn/blob/main/client-spark/common/src/main/java/org/apache/spark/shuffle/celeborn/ShufflePartitionsFallbackPolicy.java
   



-- 
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-2114] Add max partition number threshold when allocates shu… [celeborn]

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


##########
master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala:
##########
@@ -894,6 +896,14 @@ private[celeborn] class Master(
     val numReducers = requestSlots.partitionIdList.size()
     val shuffleKey = Utils.makeShuffleKey(requestSlots.applicationId, requestSlots.shuffleId)
 
+    if (numReducers > slotAssignMaxPartitions) {
+      logError(s"reject $shuffleKey to request $numReducers partitions, which exceeds $slotAssignMaxPartitions")
+      context.reply(RequestSlotsResponse(StatusCode.REQUEST_FAILED, new WorkerResource()))
+      return
+    } else if (numReducers > slotAssignWarningPartitions) {
+      logWarning(s"too much partitions, $shuffleKey requests $numReducers exceeds $slotAssignWarningPartitions")

Review Comment:
   we audit the partitions, it is not necessary to log warning.
   https://github.com/apache/celeborn/pull/3265



-- 
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-2114] Add max partition number threshold when allocates shu… [celeborn]

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


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -3054,6 +3056,24 @@ object CelebornConf extends Logging {
       .intConf
       .createWithDefault(2)
 
+  val MASTER_SLOT_ASSIGN_MAX_PARTITIONS: ConfigEntry[Int] =
+    buildConf("celeborn.master.slot.assign.maxPartitions")
+      .withAlternative("celeborn.slots.assign.maxPartitions")
+      .categories("master")
+      .version("0.6.0")
+      .doc("Max partition numbers that one shuffle can be allocated, reject if exceeds")
+      .intConf
+      .createWithDefault(50000)

Review Comment:
   it would fail the applications and is a break change, default value could be Int.MaxValue
   
   You can set a threshold to fallback in client end.
   https://github.com/apache/celeborn/blob/main/client-spark/common/src/main/java/org/apache/spark/shuffle/celeborn/ShufflePartitionsFallbackPolicy.java
   



-- 
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-2114] Add max partition number threshold when allocates shu… [celeborn]

Posted by "xy2953396112 (via GitHub)" <gi...@apache.org>.
xy2953396112 closed pull request #3427: [CELEBORN-2114] Add max partition number threshold when allocates shu…
URL: https://github.com/apache/celeborn/pull/3427


-- 
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-2114] Add max partition number threshold when allocates shu… [celeborn]

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


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -3054,6 +3056,24 @@ object CelebornConf extends Logging {
       .intConf
       .createWithDefault(2)
 
+  val MASTER_SLOT_ASSIGN_MAX_PARTITIONS: ConfigEntry[Int] =
+    buildConf("celeborn.master.slot.assign.maxPartitions")
+      .withAlternative("celeborn.slots.assign.maxPartitions")
+      .categories("master")
+      .version("0.6.0")
+      .doc("Max partition numbers that one shuffle can be allocated, reject if exceeds")
+      .intConf
+      .createWithDefault(50000)

Review Comment:
   it would fail the applications.
   
   You can set a threshold to fallback in client end.
   https://github.com/apache/celeborn/blob/main/client-spark/common/src/main/java/org/apache/spark/shuffle/celeborn/ShufflePartitionsFallbackPolicy.java
   



-- 
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-2114] Add max partition number threshold when allocates shu… [celeborn]

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


##########
master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala:
##########
@@ -894,6 +896,14 @@ private[celeborn] class Master(
     val numReducers = requestSlots.partitionIdList.size()
     val shuffleKey = Utils.makeShuffleKey(requestSlots.applicationId, requestSlots.shuffleId)
 
+    if (numReducers > slotAssignMaxPartitions) {
+      logError(s"reject $shuffleKey to request $numReducers partitions, which exceeds $slotAssignMaxPartitions")
+      context.reply(RequestSlotsResponse(StatusCode.REQUEST_FAILED, new WorkerResource()))
+      return
+    } else if (numReducers > slotAssignWarningPartitions) {
+      logWarning(s"too much partitions, $shuffleKey requests $numReducers exceeds $slotAssignWarningPartitions")

Review Comment:
   we audit the all the partitions number, it is not necessary to log warning.
   https://github.com/apache/celeborn/pull/3265



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