otterc commented on a change in pull request #32401:
URL: https://github.com/apache/spark/pull/32401#discussion_r668247313



##########
File path: 
core/src/main/scala/org/apache/spark/storage/DiskBlockObjectWriter.scala
##########
@@ -101,12 +108,30 @@ private[spark] class DiskBlockObjectWriter(
    */
   private var numRecordsWritten = 0
 
+  /**
+   * Set the checksum that the checksumOutputStream should use
+   */
+  def setChecksum(checksum: Checksum): Unit = {
+    if (checksumOutputStream == null) {
+      this.checksumEnabled = true
+      this.checksum = checksum
+    } else {
+      checksumOutputStream.setChecksum(checksum)

Review comment:
       So `checksumOutputStream` is not null after DiskBlockObjectWriter is 
initialized. Is the intention here to change the checksum even after this 
initialization?




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