You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "davisusanibar (via GitHub)" <gi...@apache.org> on 2023/04/04 15:42:35 UTC

[GitHub] [arrow] davisusanibar commented on a diff in pull request #34873: GH-34749 : [Java] Make Zstd compression level configurable

davisusanibar commented on code in PR #34873:
URL: https://github.com/apache/arrow/pull/34873#discussion_r1157445328


##########
java/compression/src/main/java/org/apache/arrow/compression/CommonsCompressionFactory.java:
##########
@@ -27,15 +27,22 @@
  */
 public class CommonsCompressionFactory implements CompressionCodec.Factory {
 
-  public static final CommonsCompressionFactory INSTANCE = new CommonsCompressionFactory();
+  private int compressionLevel;
+
+  public CommonsCompressionFactory(int compressionLevel) {
+    this.compressionLevel = compressionLevel;
+  }
+
+  @Deprecated
+  public static final CommonsCompressionFactory INSTANCE = new CommonsCompressionFactory(3);
 
   @Override
   public CompressionCodec createCodec(CompressionUtil.CodecType codecType) {

Review Comment:
   Just updated.
   
   ```
   ArrowFileWriter writer = new ArrowFileWriter(vectorSchemaRoot, null,
     fileOutputStream.getChannel(), null, IpcOption.DEFAULT,
     CommonsCompressionFactory.INSTANCE, zstdCodec.getCodecType(), /*compressionLevel*/ 7)
   ```



-- 
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: github-unsubscribe@arrow.apache.org

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