Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/10069#discussion_r46325129
--- Diff:
core/src/main/scala/org/apache/spark/util/ByteBufferOutputStream.scala ---
@@ -23,7 +23,9 @@ import java.nio.ByteBuffer
/**
* Provide a zero-copy way to convert data in ByteArrayOutputStream to
ByteBuffer
*/
-private[spark] class ByteBufferOutputStream extends ByteArrayOutputStream {
+private[spark] class ByteBufferOutputStream(val size: int) extends
ByteArrayOutputStream(size) {
--- End diff --
Although `ByteArrayOutputStream` calls it `size`, I prefer to use
`capacity`. And please remove `val` here. E.g.,
```
private[spark] class ByteBufferOutputStream(capacity: Int) extends
ByteArrayOutputStream(capacity) {
```
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]