Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/21867#discussion_r204972249
--- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
---
@@ -731,7 +731,14 @@ private[spark] class BlockManager(
}
if (data != null) {
- return Some(ChunkedByteBuffer.fromManagedBuffer(data, chunkSize))
+ // SPARK-24307 undocumented "escape-hatch" in case there are any
issues in converting to
+ // to ChunkedByteBuffer, to go back to old code-path. Can be
removed post Spark 2.4 if
+ // new path is stable.
+ if (conf.getBoolean("spark.fetchToNioBuffer", false)) {
--- End diff --
Since this condition is immutable, can we define a new variable whose value
is assigned out of this method to reduce overhead?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]