Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ private[spark] abstract class YarnSchedulerBackend(
* This includes executors already pending or running.
*/
override def doRequestTotalExecutors(requestedTotal: Int): Boolean = {
yarnSchedulerEndpoint.askWithRetry[Boolean](RequestExecutors(requestedTotal))
if (conf.getBoolean("spark.dynamicAllocation.enabled", false)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain how this method is called with dynamic allocation disabled?

The only call chain I can find starts with ExecutorAllocationManager, which is not instantiated when dynamic allocation is off.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can do sc.requestTotalExecutors

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean:

private[spark] override def requestTotalExecutors

I don't see any calls to it, and given it's private[spark]...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I meant sc.requestExecutors, which eventually calls the method here.

return yarnSchedulerEndpoint.askWithRetry[Boolean](RequestExecutors(requestedTotal))
}
false
}

/**
Expand Down