Github user jaceklaskowski commented on a diff in the pull request:
https://github.com/apache/spark/pull/13329#discussion_r64900321
--- Diff:
yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnScheduler.scala ---
@@ -31,9 +31,8 @@ private[spark] class YarnScheduler(sc: SparkContext)
extends TaskSchedulerImpl(s
Logger.getLogger(classOf[RackResolver]).setLevel(Level.WARN)
}
- // By default, rack is unknown
override def getRackForHost(hostPort: String): Option[String] = {
- val host = Utils.parseHostPort(hostPort)._1
+ val (host, _) = Utils.parseHostPort(hostPort)
--- End diff --
It is when you agree that you could easily (?) miss `_1` at the very end. I
do agree and I did miss it few times while reviewing that piece of code.
Opinions may vary and I can happily revert this change if requested (I need
your advice to learn your coding style).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]