Uh oh!
There was an error while loading. Please reload this page.
[SPARK-25776][CORE]The disk write buffer size must be greater than 12 - #22754
[SPARK-25776][CORE]The disk write buffer size must be greater than 12#2275410110346 wants to merge 1 commit into
Conversation
SparkQA
commented
Oct 17, 2018
Test build #97484 has finished for PR 22754 at commit
|
Good catch. My suggestion is to create a JIRA entry. |
10110346
commented
Oct 19, 2018
If we set 12 into this, |
10110346
commented
Oct 19, 2018
@kiszk Thanks,I will create a JIRA. |
There was a problem hiding this comment.
Can we refine this comment to explain more than 12 bytes are required?
For example, space used by prefix + len + recordLength is more than 4 + 8 bytes?
Uh oh!
There was an error while loading. Please reload this page.
kiszk
commented
Oct 21, 2018
Thank you for your clarification. |
10110346
commented
Oct 22, 2018
Thank you for your review, I will update it @kiszk |
59bf755 to
a0d36c7CompareSparkQA
commented
Oct 22, 2018
Test build #97689 has started for PR 22754 at commit |
SparkQA
commented
Oct 22, 2018
Test build #97693 has finished for PR 22754 at commit
|
SparkQA
commented
Oct 22, 2018
Test build #97696 has finished for PR 22754 at commit
|
SparkQA
commented
Oct 22, 2018
Test build #97758 has finished for PR 22754 at commit
|
SparkQA
commented
Oct 22, 2018
Test build #97763 has finished for PR 22754 at commit
|
SparkQA
commented
Oct 22, 2018
Test build #97776 has started for PR 22754 at commit |
SparkQA
commented
Oct 22, 2018
Test build #97770 has started for PR 22754 at commit |
There was a problem hiding this comment.
assert shouldn't be used to check arguments in public APIs. But, despite its visibility I'm not sure if this is really a public API.
There was a problem hiding this comment.
I am not sure too, but I see many places(BitSetMethods.java, HeapMemoryAllocator.java, LongArray.java) that use it like this.
There was a problem hiding this comment.
Doesn't the updated checkValue of spark.shuffle.spill.diskWriteBufferSize already guarantee this?
There was a problem hiding this comment.
Yes, it can guarantee this.
Here explains why it must be greater than 12.
There was a problem hiding this comment.
If just for explaining it, maybe you can put a comment on where diskWriteBufferSize is defined, instead of an assert.
There was a problem hiding this comment.
Where is the best place of this comment? I am neutral on this.
a0d36c7 to
6f8404bCompareSparkQA
commented
Oct 23, 2018
Test build #97887 has finished for PR 22754 at commit
|
SparkQA
commented
Oct 23, 2018
Test build #97903 has finished for PR 22754 at commit
|
viirya
commented
Oct 23, 2018
You can remove [MINOR] from the title since there is a JIRA ticket now. |
viirya
commented
Oct 23, 2018
retest this please. |
SparkQA
commented
Oct 23, 2018
Test build #97916 has finished for PR 22754 at commit
|
SparkQA
commented
Oct 23, 2018
Test build #97917 has finished for PR 22754 at commit
|
SparkQA
commented
Oct 24, 2018
Test build #97951 has finished for PR 22754 at commit
|
SparkQA
commented
Oct 25, 2018
Test build #97996 has finished for PR 22754 at commit
|
b2ca621 to
c97906cCompareThere was a problem hiding this comment.
nit: For a multiple-line comment, a starting line /** does not have a text.
c97906c to
c883f4bCompareSparkQA
commented
Oct 28, 2018
Test build #98157 has finished for PR 22754 at commit
|
SparkQA
commented
Oct 28, 2018
Test build #98165 has finished for PR 22754 at commit
|
LGTM, pending Jenkins |
kiszk
commented
Nov 4, 2018
retest this please |
SparkQA
commented
Nov 4, 2018
Test build #98434 has finished for PR 22754 at commit
|
kiszk
commented
Nov 4, 2018
Thanks! merging to master |
## What changes were proposed in this pull request? In `UnsafeSorterSpillWriter.java`, when we write a record to a spill file wtih ` void write(Object baseObject, long baseOffset, int recordLength, long keyPrefix)`, `recordLength` and `keyPrefix` will be written the disk write buffer first, and these will take 12 bytes, so the disk write buffer size must be greater than 12. If `diskWriteBufferSize` is 10, it will print this exception info: _java.lang.ArrayIndexOutOfBoundsException: 10 at org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillWriter.writeLongToBuffer (UnsafeSorterSpillWriter.java:91) at org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillWriter.write(UnsafeSorterSpillWriter.java:123) at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.spillIterator(UnsafeExternalSorter.java:498) at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.spill(UnsafeExternalSorter.java:222) at org.apache.spark.memory.MemoryConsumer.spill(MemoryConsumer.java:65)_ ## How was this patch tested? Existing UT in `UnsafeExternalSorterSuite` Closesapache#22754 from 10110346/diskWriteBufferSize. Authored-by: liuxian <liu.xian3@zte.com.cn> Signed-off-by: Kazuaki Ishizaki <ishizaki@jp.ibm.com>
dongjoon-hyun
commented
Apr 26, 2019
Hi, @kiszk . |
…han 12 apache#22754 In UnsafeSorterSpillWriter.java, when we write a record to a spill file wtih void write(Object baseObject, long baseOffset, int recordLength, long keyPrefix), recordLength and keyPrefix will be written the disk write buffer first, and these will take 12 bytes, so the disk write buffer size must be greater than 12. If diskWriteBufferSize is 10, it will print this exception info: java.lang.ArrayIndexOutOfBoundsException: 10 at org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillWriter.writeLongToBuffer (UnsafeSorterSpillWriter.java:91) at org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillWriter.write(UnsafeSorterSpillWriter.java:123) at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.spillIterator(UnsafeExternalSorter.java:498) at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.spill(UnsafeExternalSorter.java:222) at org.apache.spark.memory.MemoryConsumer.spill(MemoryConsumer.java:65)
Ref: LIHADOOP-42707 In `UnsafeSorterSpillWriter.java`, when we write a record to a spill file wtih ` void write(Object baseObject, long baseOffset, int recordLength, long keyPrefix)`, `recordLength` and `keyPrefix` will be written the disk write buffer first, and these will take 12 bytes, so the disk write buffer size must be greater than 12. If `diskWriteBufferSize` is 10, it will print this exception info: _java.lang.ArrayIndexOutOfBoundsException: 10 at org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillWriter.writeLongToBuffer (UnsafeSorterSpillWriter.java:91) at org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillWriter.write(UnsafeSorterSpillWriter.java:123) at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.spillIterator(UnsafeExternalSorter.java:498) at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.spill(UnsafeExternalSorter.java:222) at org.apache.spark.memory.MemoryConsumer.spill(MemoryConsumer.java:65)_ Existing UT in `UnsafeExternalSorterSuite` Closesapache#22754 from 10110346/diskWriteBufferSize. Authored-by: liuxian <liu.xian3@zte.com.cn> Signed-off-by: Kazuaki Ishizaki <ishizaki@jp.ibm.com> (cherry picked from commit 6c9e5ac) RB=1518191 BUG=LIHADOOP-42707 G=superfriends-reviewers R=fli,mshen,yezhou,edlu A=fli
What changes were proposed in this pull request?
In
UnsafeSorterSpillWriter.java, when we write a record to a spill file wtihvoid write(Object baseObject, long baseOffset, int recordLength, long keyPrefix),recordLengthandkeyPrefixwill be written the disk write buffer first, and these will take 12 bytes, so the disk write buffer size must be greater than 12.If
diskWriteBufferSizeis 10, it will print this exception info:java.lang.ArrayIndexOutOfBoundsException: 10
at org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillWriter.writeLongToBuffer (UnsafeSorterSpillWriter.java:91)
at org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillWriter.write(UnsafeSorterSpillWriter.java:123)
at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.spillIterator(UnsafeExternalSorter.java:498)
at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.spill(UnsafeExternalSorter.java:222)
at org.apache.spark.memory.MemoryConsumer.spill(MemoryConsumer.java:65)
How was this patch tested?
Existing UT in
UnsafeExternalSorterSuite