-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-41376][CORE] Correct the Netty preferDirectBufs check logic on executor start #38901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,7 +85,19 @@ private[spark] class CoarseGrainedExecutorBackend( | |
|
|
||
| logInfo("Connecting to driver: " + driverUrl) | ||
| try { | ||
| if (PlatformDependent.directBufferPreferred() && | ||
| // The following logic originally comes from the constructor of | ||
| // org.apache.spark.network.client.TransportClientFactory | ||
| val sharedByteBufAllocators = | ||
| env.conf.getBoolean("spark.network.sharedByteBufAllocators.enabled", true) | ||
| val preferDirectBufsForSharedByteBufAllocators = | ||
| env.conf.getBoolean("spark.network.io.preferDirectBufs", true) | ||
| val preferDirectBufs = | ||
| env.conf.getBoolean("spark.shuffle.io.preferDirectBufs", true) | ||
Ngone51 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| val shuffleClientPreferDirectBufs = PlatformDependent.directBufferPreferred() && { | ||
| if (sharedByteBufAllocators) preferDirectBufsForSharedByteBufAllocators | ||
| else preferDirectBufs | ||
| } | ||
| if (shuffleClientPreferDirectBufs && | ||
| PlatformDependent.maxDirectMemory() < env.conf.get(MAX_REMOTE_BLOCK_SIZE_FETCH_TO_MEM)) { | ||
| throw new SparkException(s"Netty direct memory should at least be bigger than " + | ||
| s"'${MAX_REMOTE_BLOCK_SIZE_FETCH_TO_MEM.key}', but got " + | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add this logic into a NettyUitls function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid not,
NettyUtilslocated atnetwork-common, it can not accessSparkConfwhich incoreThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about NettyUtils just accept boolean inputs, not config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, @Ngone51 would you please take a look again?