AngersZhuuuu commented on code in PR #990:
URL:
https://github.com/apache/incubator-celeborn/pull/990#discussion_r1033507174
##########
client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala:
##########
@@ -249,6 +285,98 @@ class LifecycleManager(appId: String, val conf:
CelebornConf) extends RpcEndpoin
batchHandleChangePartitionRequestInterval,
TimeUnit.MILLISECONDS)
}
+
+ batchHandleCommitPartitionSchedulerThread.foreach {
+ _.scheduleAtFixedRate(
+ new Runnable {
+ override def run(): Unit = {
+ committedPartitionInfo.asScala.foreach { case (shuffleId,
shuffleCommittedInfo) =>
+ batchHandleCommitPartitionExecutors.submit {
+ new Runnable {
+ override def run(): Unit = {
+ if (inProcessStageEndShuffleSet.contains(shuffleId) ||
+ stageEndShuffleSet.contains(shuffleId)) {
+ logWarning(s"Shuffle $shuffleId ended or during
processing stage end.")
+ shuffleCommittedInfo.commitPartitionRequests.clear()
+ } else {
+ val currentBatch = shuffleCommittedInfo.synchronized {
+ val batch =
ConcurrentHashMap.newKeySet[CommitPartitionRequest]()
+
batch.addAll(shuffleCommittedInfo.commitPartitionRequests)
+ val currentBatch = batch.asScala.filterNot { request =>
+
shuffleCommittedInfo.handledCommitPartitionRequests.contains(
+ request.partition)
+ }
+
shuffleCommittedInfo.commitPartitionRequests.removeAll(batch)
+ currentBatch.foreach { commitPartitionRequest =>
+
shuffleCommittedInfo.handledCommitPartitionRequests.add(
+ commitPartitionRequest.partition)
+ if (commitPartitionRequest.partition.getPeer !=
null) {
+
shuffleCommittedInfo.handledCommitPartitionRequests.add(
+ commitPartitionRequest.partition.getPeer)
+ }
+ }
+ currentBatch
+ }
+ if (currentBatch.nonEmpty) {
+ logWarning(s"Commit current batch HARD_SPLIT
partitions for $shuffleId: " +
+
s"${currentBatch.map(_.partition.getUniqueId).mkString("[", ",", "]")}")
+ val workerToRequests = currentBatch.flatMap { request
=>
+ if (request.partition.getPeer != null) {
+ Seq(request.partition, request.partition.getPeer)
+ } else {
+ Seq(request.partition)
+ }
+ }.groupBy(_.getWorker)
Review Comment:
Change here's code to support grep replica partition location to each worker
--
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]