Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/9181#discussion_r42559207
--- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskLocation.scala
---
@@ -65,7 +70,15 @@ private[spark] object TaskLocation {
def apply(str: String): TaskLocation = {
val hstr = str.stripPrefix(inMemoryLocationTag)
if (hstr.equals(str)) {
- new HostTaskLocation(str)
+ if (str.startsWith(executorLocationTag)) {
+ val splits = str.split("_")
+ if (splits.length != 3) {
+ throw new IllegalArgumentException("Illegal executor location
format: " + str)
+ }
+ new ExecutorCacheTaskLocation(splits(1), splits(2))
+ } else {
+ new HostTaskLocation(str)
+ }
} else {
--- End diff --
The goal of this PR is to enable the streaming scheduler to place receivers
(which run as tasks) in specific executors. Basically, I want to have more
control on the placement of the receivers such that they are evenly distributed
among the executors. We tried to do this without changing the core scheduling
logic, but its not possible to precisely put a task in a specific executor with
this change. I dont think this change affects the performance of anything else.
Also this is not exposed to the user. Only the streaming scheduler uses
this.
---
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]