hiboyang commented on a change in pull request #31876: URL: https://github.com/apache/spark/pull/31876#discussion_r618026215
########## File path: core/src/main/scala/org/apache/spark/MapOutputTracker.scala ########## @@ -172,7 +172,7 @@ private class ShuffleStatus(numPartitions: Int) extends Logging { */ def removeOutputsOnExecutor(execId: String): Unit = withWriteLock { logDebug(s"Removing outputs for execId ${execId}") - removeOutputsByFilter(x => x.asInstanceOf[BlockManagerId].executorId == execId) + removeOutputsByFilter(x => x.asInstanceOf[ExecutorLocation].executorId == execId) Review comment: Could we do `x.isInstanceOf[ExecutorLocation] && x.asInstanceOf[ExecutorLocation].executorId == execId`, since people could have `Location` implementation which does not implement `ExecutorLocation`? ########## 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: Could we do `x.isInstanceOf[HostLocation] && x.asInstanceOf[HostLocation].host == host`, since people could have `Location` implementation which does not implement `HostLocation`? -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org