Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/18730#discussion_r135036499
--- Diff:
core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
@@ -40,6 +41,9 @@ private[spark] class ChunkedByteBuffer(var chunks:
Array[ByteBuffer]) {
require(chunks != null, "chunks must not be null")
require(chunks.forall(_.position() == 0), "chunks' positions must be 0")
+ // Chunk size in bytes
+ private val NIO_BUFFER_LIMIT =
SparkEnv.get.conf.get(config.STORAGE_NIO_BUFFER_LIMIT)
--- End diff --
`SparkEnv.get` may be null in test cases, how about
`Option(SparkEnv.get).map(_.conf.get(BUFFER_WRITE_CHUNK_SIZE)).getOrElse(BUFFER_WRITE_CHUNK_SIZE.defaultValue.get)`
---
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]