You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "turboFei (via GitHub)" <gi...@apache.org> on 2025/03/24 04:12:00 UTC
[PR] [CELEBORN-1923][0.4] Correct Celeborn available slots calculation logic [celeborn]
turboFei opened a new pull request, #3167:
URL: https://github.com/apache/celeborn/pull/3167
<!--
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?
### Why are the changes needed?
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
--
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-1923][0.4] Correct Celeborn available slots calculation logic [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas closed pull request #3167: [CELEBORN-1923][0.4] Correct Celeborn available slots calculation logic
URL: https://github.com/apache/celeborn/pull/3167
--
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-1923][0.4] Correct Celeborn available slots calculation logic [celeborn]
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on code in PR #3167:
URL: https://github.com/apache/celeborn/pull/3167#discussion_r2009430485
##########
common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala:
##########
@@ -135,21 +135,22 @@ class WorkerInfo(
}
def slotAvailable(): Boolean = this.synchronized {
- diskInfos.asScala.exists { case (_, disk) => (disk.maxSlots - disk.activeSlots) > 0 }
+ diskInfos.asScala.exists { case (_, disk) => (disk.availableSlots) > 0 }
}
def getTotalSlots(): Long = this.synchronized {
diskInfos.asScala.map(_._2.maxSlots).sum
}
- def updateDiskMaxSlots(estimatedPartitionSize: Long): Unit = this.synchronized {
+ def updateDiskSlots(estimatedPartitionSize: Long): Unit = this.synchronized {
diskInfos.asScala.foreach { case (_, disk) =>
- disk.maxSlots_$eq(disk.actualUsableSpace / estimatedPartitionSize)
+ disk.maxSlots_$eq(disk.configuredUsableSpace / estimatedPartitionSize)
Review Comment:
due `totalSpace` is not available, I use `configuredUsableSpace` instead.
--
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-1923][0.4] Correct Celeborn available slots calculation logic [celeborn]
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on code in PR #3167:
URL: https://github.com/apache/celeborn/pull/3167#discussion_r2009431114
##########
common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala:
##########
@@ -166,12 +167,14 @@ class WorkerInfo(
curDisk.avgFlushTime = newDisk.avgFlushTime
curDisk.avgFetchTime = newDisk.avgFetchTime
if (estimatedPartitionSize.nonEmpty && curDisk.storageType != StorageInfo.Type.HDFS) {
- curDisk.maxSlots = curDisk.actualUsableSpace / estimatedPartitionSize.get
+ curDisk.maxSlots = curDisk.configuredUsableSpace / estimatedPartitionSize.get
Review Comment:
ditto
--
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-1923][0.4] Correct Celeborn available slots calculation logic [celeborn]
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on code in PR #3167:
URL: https://github.com/apache/celeborn/pull/3167#discussion_r2009430686
##########
common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala:
##########
@@ -135,21 +135,22 @@ class WorkerInfo(
}
def slotAvailable(): Boolean = this.synchronized {
- diskInfos.asScala.exists { case (_, disk) => (disk.maxSlots - disk.activeSlots) > 0 }
+ diskInfos.asScala.exists { case (_, disk) => (disk.availableSlots) > 0 }
}
def getTotalSlots(): Long = this.synchronized {
diskInfos.asScala.map(_._2.maxSlots).sum
}
- def updateDiskMaxSlots(estimatedPartitionSize: Long): Unit = this.synchronized {
+ def updateDiskSlots(estimatedPartitionSize: Long): Unit = this.synchronized {
diskInfos.asScala.foreach { case (_, disk) =>
- disk.maxSlots_$eq(disk.actualUsableSpace / estimatedPartitionSize)
+ disk.maxSlots_$eq(disk.configuredUsableSpace / estimatedPartitionSize)
Review Comment:
totalSpace was introduced by https://github.com/apache/celeborn/pull/2521
--
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-1923][0.4] Correct Celeborn available slots calculation logic [celeborn]
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on code in PR #3167:
URL: https://github.com/apache/celeborn/pull/3167#discussion_r2009431237
##########
common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala:
##########
@@ -166,12 +167,14 @@ class WorkerInfo(
curDisk.avgFlushTime = newDisk.avgFlushTime
curDisk.avgFetchTime = newDisk.avgFetchTime
if (estimatedPartitionSize.nonEmpty && curDisk.storageType != StorageInfo.Type.HDFS) {
- curDisk.maxSlots = curDisk.actualUsableSpace / estimatedPartitionSize.get
+ curDisk.maxSlots = curDisk.configuredUsableSpace / estimatedPartitionSize.get
+ curDisk.availableSlots = curDisk.actualUsableSpace / estimatedPartitionSize.get
}
curDisk.setStatus(newDisk.status)
} else {
if (estimatedPartitionSize.nonEmpty && newDisk.storageType != StorageInfo.Type.HDFS) {
- newDisk.maxSlots = newDisk.actualUsableSpace / estimatedPartitionSize.get
+ newDisk.maxSlots = newDisk.configuredUsableSpace / estimatedPartitionSize.get
Review Comment:
ditto
--
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