You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/10/18 02:37:44 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #17500: [FLINK-24564][formats] Change the default compression to snappy for parquet, orc, avro in table

JingsongLi commented on a change in pull request #17500:
URL: https://github.com/apache/flink/pull/17500#discussion_r730531888



##########
File path: flink-formats/flink-orc/src/main/java/org/apache/flink/orc/writer/OrcBulkWriterFactory.java
##########
@@ -113,6 +115,10 @@ public OrcBulkWriterFactory(
             for (Map.Entry<String, String> entry : confMap.entrySet()) {
                 conf.set(entry.getKey(), entry.getValue());
             }
+            writerProperties.setProperty(
+                    OrcConf.COMPRESS.getAttribute(),

Review comment:
       It seems the default compression of orc is zlib. We can not change it.

##########
File path: flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/row/ParquetRowDataBuilder.java
##########
@@ -122,7 +122,11 @@ public FlinkParquetBuilder(RowType rowType, Configuration conf, boolean utcTimes
         public ParquetWriter<RowData> createWriter(OutputFile out) throws IOException {
             Configuration conf = configuration.conf();
             return new ParquetRowDataBuilder(out, rowType, utcTimestamp)
-                    .withCompressionCodec(getParquetCompressionCodec(conf))
+                    .withCompressionCodec(
+                            CompressionCodecName.fromConf(

Review comment:
       `CompressionCodecName.fromConf(configuration.get(ParquetOutputFormat.COMPRESSION, CompressionCodecName.SNAPPY.name()))`




-- 
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: issues-unsubscribe@flink.apache.org

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