Repository navigation
[SPARK-11063][Streaming]Change preferredLocations of Receiver's RDD to hosts rather than hostports - #9075
[SPARK-11063][Streaming]Change preferredLocations of Receiver's RDD to hosts rather than hostports#9075zsxwing wants to merge 3 commits into
Conversation
|
Test build #43564 has finished for PR 9075 at commit
|
|
The fix looks good to me. |
|
What is the implication of this bug in case for the scheduling? We are trying to evenly distribute receivers to executors. But if we set the preferredLocations to only the granularity of hosts, then the following could happen. Two executors can be in the same host (through YARN). We set the preferred locations for two receivers for that same host even though we want them to be in two different executors. It may so happen that both executors get scheduled at the same executor. Isnt it? |
Right. However, |
|
From my understanding, Spark's scheduler does not support scheduling with port (https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/scheduler/TaskLocation.scala) |
|
Yeah, we have to fix it for branch 1.5 with a small fix like this. |
|
I think we could add another |
There was a problem hiding this comment.
@CodingCat could you take a look at this change?
There was a problem hiding this comment.
sure, will do tomorrow morning
There was a problem hiding this comment.
This looks like a significant bug in the core. If so probably go into a separate patch.
There was a problem hiding this comment.
And how is this related to the main bug we are considering in this PR?
There was a problem hiding this comment.
This is not related. I will move it in a separate PR.
There was a problem hiding this comment.
hmmm....it's a typo but would not take any effect
see discussions here: #3816 (only look at the comments after Dec 30, 2014 is enough)
There was a problem hiding this comment.
Didn't notice this PR. Thanks.
|
Added a unit test and fixed a minor issue in |
|
Tested this patch in a 5 nodes cluster. Each node has an executor, the executor core is 1 and the receiver number is 5. Before this patch, there were several Receiver restarting logs. After applying this patch, all restarting logs disappeared. |
|
Test build #43840 has finished for PR 9075 at commit
|
|
Test build #43877 has finished for PR 9075 at commit
|
There was a problem hiding this comment.
What will it be if it is not set correctly? That is, without the fix above, what would locality be
There was a problem hiding this comment.
It's TaskLocality.ANY without this patch.
|
LGTM. Just a clarifying question. |
|
Merging this to master and branch 1.5 |
… to hosts rather than hostports The format of RDD's preferredLocations must be hostname but the format of Streaming Receiver's scheduling executors is hostport. So it doesn't work. This PR converts `schedulerExecutors` to `hosts` before creating Receiver's RDD. Author: zsxwing <zsxwing@gmail.com> Closes #9075 from zsxwing/SPARK-11063. (cherry picked from commit 6758213) Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>
The format of RDD's preferredLocations must be hostname but the format of Streaming Receiver's scheduling executors is hostport. So it doesn't work.
This PR converts
schedulerExecutorstohostsbefore creating Receiver's RDD.