Github user wangjiaochun commented on a diff in the pull request: https://github.com/apache/spark/pull/23225#discussion_r239700999 --- Diff: core/src/test/java/org/apache/spark/shuffle/sort/UnsafeShuffleWriterSuite.java --- @@ -562,4 +562,18 @@ public void testPeakMemoryUsed() throws Exception { } } + @Test + public void writeEmptyIteratorNotCreateEmptySpillFile() throws Exception { + final UnsafeShuffleWriter<Object, Object> writer = createWriter(true); + writer.write(Iterators.emptyIterator()); + final Option<MapStatus> mapStatus = writer.stop(true); + assertTrue(mapStatus.isDefined()); + assertTrue(mergedOutputFile.exists()); + assertEquals(0, spillFilesCreated.size()); --- End diff -- Test writeEmptyIterator() has create spill file although write empty iterator,but the writeEmptyIteratorNotCreateEmptySpillFile test not create spill file while there has not records in memroy
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org