LuciferYang commented on a change in pull request #34153:
URL: https://github.com/apache/spark/pull/34153#discussion_r728032743
##########
File path: pom.xml
##########
@@ -2737,7 +2739,7 @@
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<filereports>SparkTestSuite.txt</filereports>
- <argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g
-XX:ReservedCodeCacheSize=${CodeCacheSize}
-Dio.netty.tryReflectionSetAccessible=true</argLine>
+ <argLine>-ea -Xmx5g -Xss4m -XX:MaxMetaspaceSize=2g
-XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs}
-Dio.netty.tryReflectionSetAccessible=true</argLine>
Review comment:
```
test("SPARK-36464: size returns correct positive number even with over 2GB
data") {
val ref = new Array[Byte](1024 * 1024 * 1024)
val o = new ChunkedByteBufferOutputStream(1024 * 1024,
ByteBuffer.allocate)
o.write(ref)
o.write(ref)
o.close()
assert(o.size > 0L) // make sure it is not overflowing
assert(o.size == ref.length.toLong * 2)
}
```
@srowen can we use `ByteBuffer.allocateDirect` instead of
`ByteBuffer.allocate` in the case, I re-test it with Java 8, Java 11 and Java
17, Heap OOM will not occur again when use `ByteBuffer.allocateDirect` even if
`-Xmx` is 4g.
It seems that using `ByteBuffer.allocateDirect` does not change what the UT
wants to test, If we accept this, I will give a pr tomorrow.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]