RexXiong commented on code in PR #990:
URL: 
https://github.com/apache/incubator-celeborn/pull/990#discussion_r1029998532


##########
client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala:
##########
@@ -246,6 +283,88 @@ class LifecycleManager(appId: String, val conf: 
CelebornConf) extends RpcEndpoin
         batchHandleChangePartitionRequestInterval,
         TimeUnit.MILLISECONDS)
     }
+
+    batchHandleCommitPartitionSchedulerThread.foreach {
+      _.scheduleAtFixedRate(
+        new Runnable {
+          override def run(): Unit = {
+            logWarning("Batch commit hard split partition")
+            commitPartitionRequests.asScala.foreach { case (shuffleId, 
requests) =>
+              batchHandleCommitPartitionExecutors.submit {
+                new Runnable {
+                  override def run(): Unit = {
+                    val shuffleCommittedInfo = 
committedPartitionInfo.get(shuffleId)

Review Comment:
   I think we can extract a method to handle both stage_end and early commit 
scenarios. Because no matter what kind of scenario, our processing process 
would be similar, and we all need to care about whether there is datalost, and 
we can record committed file groups/filecount, etc.  for example  `` private 
def handleCommitFiles(applicationId: String,
         shuffleId: Int,
         allocatedWorkers: util.Map[WorkerInfo, PartitionLocationInfo],
         partitionLocationOpt: Option[util.HashSet[String]] = None)``



##########
client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala:
##########
@@ -246,6 +283,88 @@ class LifecycleManager(appId: String, val conf: 
CelebornConf) extends RpcEndpoin
         batchHandleChangePartitionRequestInterval,
         TimeUnit.MILLISECONDS)
     }
+
+    batchHandleCommitPartitionSchedulerThread.foreach {
+      _.scheduleAtFixedRate(
+        new Runnable {
+          override def run(): Unit = {
+            logWarning("Batch commit hard split partition")
+            commitPartitionRequests.asScala.foreach { case (shuffleId, 
requests) =>
+              batchHandleCommitPartitionExecutors.submit {
+                new Runnable {
+                  override def run(): Unit = {
+                    val shuffleCommittedInfo = 
committedPartitionInfo.get(shuffleId)

Review Comment:
   I think we can extract a method to handle both stage_end and early commit 
scenarios. Because no matter what kind of scenario, our processing process 
would be similar, and we all need to care about whether there is datalost, and 
we can record committed file groups/filecount, etc.  for example  `` private 
def handleCommitFiles(applicationId: String,
         shuffleId: Int,
         allocatedWorkers: util.Map[WorkerInfo, PartitionLocationInfo],
         partitionLocationOpt: Option[util.HashSet[PartitionLocation]] = None)``



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