mridulm commented on code in PR #46858:
URL: https://github.com/apache/spark/pull/46858#discussion_r1626058226


##########
core/src/main/scala/org/apache/spark/io/CompressionCodec.scala:
##########
@@ -170,9 +171,14 @@ class LZ4CompressionCodec(conf: SparkConf) extends 
CompressionCodec {
  */
 @DeveloperApi
 class LZFCompressionCodec(conf: SparkConf) extends CompressionCodec {
+  private val parallelCompression = conf.get(IO_COMPRESSION_LZF_PARALLEL)
 
   override def compressedOutputStream(s: OutputStream): OutputStream = {
-    new LZFOutputStream(s).setFinishBlockOnFlush(true)
+    if (parallelCompression) {
+      new PLZFOutputStream(s)

Review Comment:
   This is creating a threadpool per `compressedOutputStream` - which can end 
up being quite expensive (num thread is num processors + some 'interesting' 
logic which tries to modulate it) .
   
   Did you get a chance to try this on some nontrivial jobs ? Very curious 
about the experience.
   Given this is turned off by default, dont see any concerns with the change 
itself though ! Would be a good way to understand the impact.



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