xleoken commented on code in PR #2119:
URL: 
https://github.com/apache/incubator-celeborn/pull/2119#discussion_r1407693144


##########
master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala:
##########
@@ -674,15 +674,11 @@ private[celeborn] class Master(
         else Math.min(slotsAssignMaxWorkers, requestSlots.maxWorkers)),
       numAvailableWorkers)
     val startIndex = Random.nextInt(numAvailableWorkers)

Review Comment:
   Thanks, updated



##########
master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala:
##########
@@ -674,15 +674,11 @@ private[celeborn] class Master(
         else Math.min(slotsAssignMaxWorkers, requestSlots.maxWorkers)),
       numAvailableWorkers)
     val startIndex = Random.nextInt(numAvailableWorkers)

Review Comment:
   > Although it is now easy to read, this approach has memory inefficient 
drawback.
   
   Hi, `simulatedCycleList` is a local variable, and the `numAvailableWorkers` 
is not a big value, we can ignore the memory inefficient drawback affect.



##########
master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala:
##########
@@ -674,15 +674,11 @@ private[celeborn] class Master(
         else Math.min(slotsAssignMaxWorkers, requestSlots.maxWorkers)),
       numAvailableWorkers)
     val startIndex = Random.nextInt(numAvailableWorkers)

Review Comment:
   @RexXiong @FMX 
   Thanks for share your worry, had update the patch with using `for` directly, 
the complexity of the algorithm is o (1).
   It's more friendly for developers than using `subList` `addAll`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to