Ngone51 commented on a change in pull request #31876:
URL: https://github.com/apache/spark/pull/31876#discussion_r618052332
##########
File path: core/src/main/scala/org/apache/spark/MapOutputTracker.scala
##########
@@ -162,7 +162,7 @@ private class ShuffleStatus(numPartitions: Int) extends
Logging {
*/
def removeOutputsOnHost(host: String): Unit = withWriteLock {
logDebug(s"Removing outputs for host ${host}")
- removeOutputsByFilter(x => x.asInstanceOf[BlockManagerId].host == host)
+ removeOutputsByFilter(x => x.asInstanceOf[HostLocation].host == host)
Review comment:
The function is used for host-based locations intentionally. So,
ideally, the caller should be responsible for it.
I can add an assertion like `assert(x.isInstanceOf[HostLocation], "Location
is not HostLocation")` for the safety,
##########
File path: core/src/main/scala/org/apache/spark/MapOutputTracker.scala
##########
@@ -162,7 +162,7 @@ private class ShuffleStatus(numPartitions: Int) extends
Logging {
*/
def removeOutputsOnHost(host: String): Unit = withWriteLock {
logDebug(s"Removing outputs for host ${host}")
- removeOutputsByFilter(x => x.asInstanceOf[BlockManagerId].host == host)
+ removeOutputsByFilter(x => x.asInstanceOf[HostLocation].host == host)
Review comment:
The function is used for host-based locations intentionally. So,
ideally, the caller should be responsible for it.
I can add an assertion like `assert(x.isInstanceOf[HostLocation], "Location
is not HostLocation")` for the safety.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]