Github user kmadhugit commented on the pull request:
https://github.com/apache/spark/pull/7461#issuecomment-132461469
@shivaram , @mateiz ,
Found the root cause, its not a bug in DAGScheduler's location preference
logic. The executors ares registered to SparkDeploySchedulerBackend in a lazy
manner only when the first task needs to be deployed on them. The block manager
registration is part of executor initialization hence they also gets registered
with BlockManagerMasterEndPoint during the deployment of first task. The driver
block manager getting registered as a part of SparkContext creation. So before
DAGScheduler submits its first job, there will be only one block manager(i.e
driver) registered with BlockManagerMasterEndPoint.
In treeAggregate(), at the time of calling
sc.getExecutorStorageStatus.length the BlockManagerMaster would return 1 as
there was no prior job submitted by DAGScheduler. So we end up doing something
similar to rdd.aggregate() causing the failure.
I could think of couple of solutions,
1. Call some simple action on the RDD may be count, or before calling
sc.getExecutorStorageStatus.length
2. Try to get number of executors instead of BlockManagers - This may give
problem if some of executor didn't process the data.
Let me know your comments.
---
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]