liuzqt commented on code in PR #38064:
URL: https://github.com/apache/spark/pull/38064#discussion_r993747322


##########
core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala:
##########
@@ -84,6 +92,64 @@ private[spark] class ChunkedByteBuffer(var chunks: 
Array[ByteBuffer]) {
     }
   }
 
+  /**
+   * write to stream with zero copy if possible
+   */
+  def writeToStream(out: OutputStream): Unit = {
+    var buffer: Array[Byte] = null
+    val bufferLen = 1024 * 1024
+    writeBufferToDest(this, out.write)
+  }

Review Comment:
   good catch. This method is in my first implementation and I actually don't 
need it any more. Removed it and also remove the `writeBufferToDest`



-- 
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]

Reply via email to