beliefer commented on code in PR #44172:
URL: https://github.com/apache/spark/pull/44172#discussion_r1415430138


##########
core/src/main/scala/org/apache/spark/io/CompressionCodec.scala:
##########
@@ -233,18 +233,22 @@ class ZStdCompressionCodec(conf: SparkConf) extends 
CompressionCodec {
     NoPool.INSTANCE
   }
 
+  private val workers = conf.get(IO_COMPRESSION_ZSTD_WORKERS)
+
   override def compressedOutputStream(s: OutputStream): OutputStream = {
     // Wrap the zstd output stream in a buffered output stream, so that we can
     // avoid overhead excessive of JNI call while trying to compress small 
amount of data.
-    val os = new ZstdOutputStreamNoFinalizer(s, bufferPool).setLevel(level)
+    val os = new ZstdOutputStreamNoFinalizer(s, 
bufferPool).setLevel(level).setWorkers(workers)

Review Comment:
   Late LGTM.
   How much is the default worker num if not specify the worker num?



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to