Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/8100#discussion_r43577959
--- Diff:
yarn/src/main/scala/org/apache/spark/deploy/yarn/LocalityPreferredContainerPlacementStrategy.scala
---
@@ -179,4 +196,26 @@ private[yarn] class
LocalityPreferredContainerPlacementStrategy(
(host, math.max(0, (expectedCount - existedCount).ceil.toInt))
}
}
+
+ /**
+ * Calculate the host to possible number of containers for pending
allocated containers.
+ * @param localityMatchedPendingAllocations A sequence of pending
container request which
+ * matches the localities of
current required tasks.
+ * @return a Map with hostname as key and possible number of containers
on this host as value
--- End diff --
This confused me a little bit; the "possible number of containers" would be
just the raw count stored in `localityMatchedPendingAllocations`, no? Instead,
the method is returning some kind of ratio. It would be nice to clarify that
here.
---
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]