You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/08 01:46:52 UTC
[GitHub] [spark] liupc commented on a change in pull request #23695:
[SPARK-26780][CORE]Improve shuffle read using ReadAheadInputStream
liupc commented on a change in pull request #23695: [SPARK-26780][CORE]Improve shuffle read using ReadAheadInputStream
URL: https://github.com/apache/spark/pull/23695#discussion_r263640195
##########
File path: core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
##########
@@ -474,6 +475,12 @@ final class ShuffleBlockFetcherIterator(
// TODO: manage the memory used here, and spill it into disk in case of OOM.
Utils.copyStream(input, out, closeStreams = true)
input = out.toChunkedByteBuffer.toInputStream(dispose = true)
+ } else {
+ val readAheadEnabled = SparkEnv.get != null &&
Review comment:
I think we'd better not use `SparkEnv` here, though it can not be null in actual execution.
We can put this config a constructor args of the `ShuffleBlockFetcherIterator` just like the `detectCorrupt` config.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org