Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/14475#discussion_r73278229 --- Diff: core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeSorterSpillReader.java --- @@ -50,7 +55,19 @@ public UnsafeSorterSpillReader( File file, BlockId blockId) throws IOException { assert (file.length() > 0); - final BufferedInputStream bs = new BufferedInputStream(new FileInputStream(file)); + long bufferSizeBytes = + SparkEnv.get().conf().getSizeAsBytes("spark.unsafe.sorter.spill.reader.buffer.size", + DEFAULT_BUFFER_SIZE_BYTES); + if (bufferSizeBytes > Integer.MAX_VALUE) { + // fall back to a sane default value + logger.error("Value of config \"spark.unsafe.sorter.spill.reader.buffer.size\" exceeds " + --- End diff -- warning? because this isn't a fatal error. Is it reasonable to fall back? I'd imagine that specifying an incredibly large buffer is just an error. What about 0 or negative values?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org