You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/07/05 07:18:51 UTC

[camel] branch main updated: CAMEL-19571 - camel-parquet-avro: Add other compression codecs than gzip

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 3d904e95480 CAMEL-19571 - camel-parquet-avro: Add other compression codecs than gzip
3d904e95480 is described below

commit 3d904e95480bc673a9f0e88bb08fcfdccd3cbf81
Author: Kengo Seki <se...@apache.org>
AuthorDate: Tue Jul 4 14:30:30 2023 +0900

    CAMEL-19571 - camel-parquet-avro: Add other compression codecs than gzip
---
 .../camel/catalog/dataformats/parquetAvro.json     |   5 +-
 .../apache/camel/catalog/models/parquetAvro.json   |   5 +-
 .../apache/camel/catalog/schemas/camel-spring.xsd  |  11 +-
 .../camel/dataformat/parquet/avro/parquetAvro.json |   5 +-
 .../src/main/docs/parquetAvro-dataformat.adoc      |   2 +-
 .../parquet/avro/ParquetAvroDataFormat.java        |  18 ++-
 .../ParquetAvroMarshalCompressionCodecTest.java    | 157 +++++++++++++++++++++
 .../apache/camel/model/dataformat/parquetAvro.json |   5 +-
 .../model/dataformat/ParquetAvroDataFormat.java    |  25 ++++
 .../java/org/apache/camel/xml/in/ModelParser.java  |   9 +-
 .../java/org/apache/camel/xml/out/ModelWriter.java |   1 +
 .../org/apache/camel/yaml/out/ModelWriter.java     |   1 +
 .../dsl/yaml/deserializers/ModelDeserializers.java |   6 +
 .../generated/resources/schema/camel-yaml-dsl.json |   3 +
 .../generated/resources/schema/camelYamlDsl.json   |   3 +
 15 files changed, 241 insertions(+), 15 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/parquetAvro.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/parquetAvro.json
index 31f864c81aa..b4658eaca90 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/parquetAvro.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/parquetAvro.json
@@ -16,7 +16,8 @@
     "modelJavaType": "org.apache.camel.model.dataformat.ParquetAvroDataFormat"
   },
   "properties": {
-    "unmarshalType": { "index": 0, "kind": "attribute", "displayName": "Unmarshal Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class to use when unmarshalling." },
-    "id": { "index": 1, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
+    "compressionCodecName": { "index": 0, "kind": "attribute", "displayName": "Compression Codec Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GZIP", "description": "Compression codec to use when marshalling." },
+    "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class to use when unmarshalling." },
+    "id": { "index": 2, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
   }
 }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/parquetAvro.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/parquetAvro.json
index b61d7563ce3..7d86486496e 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/parquetAvro.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/parquetAvro.json
@@ -13,7 +13,8 @@
     "output": false
   },
   "properties": {
-    "unmarshalType": { "index": 0, "kind": "attribute", "displayName": "Unmarshal Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class to use when unmarshalling." },
-    "id": { "index": 1, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
+    "compressionCodecName": { "index": 0, "kind": "attribute", "displayName": "Compression Codec Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GZIP", "description": "Compression codec to use when marshalling." },
+    "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class to use when unmarshalling." },
+    "id": { "index": 2, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
   }
 }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index dc428d9a181..2967b48d92d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -8730,6 +8730,15 @@ false. Default value: false
     <xs:complexContent>
       <xs:extension base="tns:dataFormat">
         <xs:sequence/>
+        <xs:attribute name="compressionCodecName" type="xs:string">
+          <xs:annotation>
+            <xs:documentation xml:lang="en">
+<![CDATA[
+Compression codec to use when marshalling. Default value: GZIP
+]]>
+            </xs:documentation>
+          </xs:annotation>
+        </xs:attribute>
         <xs:attribute name="unmarshalType" type="xs:string">
           <xs:annotation>
             <xs:documentation xml:lang="en">
@@ -17193,4 +17202,4 @@ An optional certificate alias to use. This is useful when the keystore has multi
       <xs:enumeration value="TransactionErrorHandler"/>
     </xs:restriction>
   </xs:simpleType>
-</xs:schema>
\ No newline at end of file
+</xs:schema>
diff --git a/components/camel-parquet-avro/src/generated/resources/org/apache/camel/dataformat/parquet/avro/parquetAvro.json b/components/camel-parquet-avro/src/generated/resources/org/apache/camel/dataformat/parquet/avro/parquetAvro.json
index 31f864c81aa..b4658eaca90 100644
--- a/components/camel-parquet-avro/src/generated/resources/org/apache/camel/dataformat/parquet/avro/parquetAvro.json
+++ b/components/camel-parquet-avro/src/generated/resources/org/apache/camel/dataformat/parquet/avro/parquetAvro.json
@@ -16,7 +16,8 @@
     "modelJavaType": "org.apache.camel.model.dataformat.ParquetAvroDataFormat"
   },
   "properties": {
-    "unmarshalType": { "index": 0, "kind": "attribute", "displayName": "Unmarshal Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class to use when unmarshalling." },
-    "id": { "index": 1, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
+    "compressionCodecName": { "index": 0, "kind": "attribute", "displayName": "Compression Codec Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GZIP", "description": "Compression codec to use when marshalling." },
+    "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class to use when unmarshalling." },
+    "id": { "index": 2, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
   }
 }
diff --git a/components/camel-parquet-avro/src/main/docs/parquetAvro-dataformat.adoc b/components/camel-parquet-avro/src/main/docs/parquetAvro-dataformat.adoc
index 641d3b61a35..c73f0d3785a 100644
--- a/components/camel-parquet-avro/src/main/docs/parquetAvro-dataformat.adoc
+++ b/components/camel-parquet-avro/src/main/docs/parquetAvro-dataformat.adoc
@@ -11,7 +11,7 @@
 
 *Since Camel {since}*
 
-The ParquetAvro Data Format Data Format is a Camel Frameworks's data format implementation based on parquet-avro library for (de)/serialization purposes. Messages can be unmarshalled (conversion to simple Java POJO(s)) to plain Java objects. By the help of Camel's routing engine and data transformations you can then play with POJO(s) and apply customised formatting and call other Camel Component's to convert and send messages to upstream systems.
+The ParquetAvro Data Format is a Camel Framework's data format implementation based on parquet-avro library for (de)/serialization purposes. Messages can be unmarshalled (conversion to simple Java POJO(s)) to plain Java objects. By the help of Camel's routing engine and data transformations you can then play with POJO(s) and apply customised formatting and call other Camel Component's to convert and send messages to upstream systems.
 
 == Parquet Data Format Options
 
diff --git a/components/camel-parquet-avro/src/main/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroDataFormat.java b/components/camel-parquet-avro/src/main/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroDataFormat.java
index d733804d106..d150492f6a7 100644
--- a/components/camel-parquet-avro/src/main/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroDataFormat.java
+++ b/components/camel-parquet-avro/src/main/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroDataFormat.java
@@ -35,6 +35,7 @@ import org.apache.parquet.avro.AvroParquetReader;
 import org.apache.parquet.avro.AvroParquetWriter;
 import org.apache.parquet.hadoop.ParquetReader;
 import org.apache.parquet.hadoop.ParquetWriter;
+import org.apache.parquet.hadoop.metadata.CompressionCodecName;
 
 import static org.apache.parquet.hadoop.ParquetFileWriter.Mode.OVERWRITE;
 import static org.apache.parquet.hadoop.metadata.CompressionCodecName.GZIP;
@@ -44,6 +45,8 @@ public class ParquetAvroDataFormat extends ServiceSupport implements DataFormat,
 
     private static final DefaultUuidGenerator DEFAULT_UUID_GENERATOR = new DefaultUuidGenerator();
 
+    private CompressionCodecName compressionCodecName = GZIP;
+
     private Class<?> unmarshalType;
 
     public String getDataFormatName() {
@@ -67,7 +70,7 @@ public class ParquetAvroDataFormat extends ServiceSupport implements DataFormat,
                 .withSchema(ReflectData.AllowNull.get().getSchema(unmarshalType)) // generate nullable fields
                 .withDataModel(ReflectData.get())
                 .withConf(conf)
-                .withCompressionCodec(GZIP)
+                .withCompressionCodec(compressionCodecName)
                 .withWriteMode(OVERWRITE)
                 .build()) {
             for (Object grapElem : list) {
@@ -110,6 +113,19 @@ public class ParquetAvroDataFormat extends ServiceSupport implements DataFormat,
         // no-op
     }
 
+    public String getCompressionCodecName() {
+        return compressionCodecName.name();
+    }
+
+    /**
+     * Compression codec to use when marshalling. You can find the supported codecs at
+     * https://github.com/apache/parquet-format/blob/master/Compression.md#codecs. Note that some codecs may require you
+     * to include additional libraries into the classpath.
+     */
+    public void setCompressionCodecName(String compressionCodecName) {
+        this.compressionCodecName = CompressionCodecName.valueOf(compressionCodecName);
+    }
+
     public Class<?> getUnmarshalType() {
         return unmarshalType;
     }
diff --git a/components/camel-parquet-avro/src/test/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroMarshalCompressionCodecTest.java b/components/camel-parquet-avro/src/test/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroMarshalCompressionCodecTest.java
new file mode 100644
index 00000000000..2d969218733
--- /dev/null
+++ b/components/camel-parquet-avro/src/test/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroMarshalCompressionCodecTest.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dataformat.parquet.avro;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.support.DefaultUuidGenerator;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.apache.parquet.ParquetReadOptions;
+import org.apache.parquet.hadoop.ParquetFileReader;
+import org.apache.parquet.hadoop.metadata.CompressionCodecName;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.parquet.hadoop.metadata.CompressionCodecName.*;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class ParquetAvroMarshalCompressionCodecTest extends CamelTestSupport {
+
+    Collection<Pojo> in = List.of(
+            new Pojo(1, "airport"),
+            new Pojo(2, "penguin"),
+            new Pojo(3, "verb"));
+
+    DefaultUuidGenerator uuidGenerator = new DefaultUuidGenerator();
+
+    ParquetReadOptions readOptions = ParquetReadOptions.builder().build();
+
+    @Test
+    public void testMarshalCompressionCodec() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:default");
+        mock.expectedMessageCount(1);
+
+        template.requestBody("direct:default", in);
+        mock.assertIsSatisfied();
+
+        byte[] marshalled = mock.getExchanges().get(0).getIn().getBody(byte[].class);
+        ParquetInputStream inputStream = new ParquetInputStream(uuidGenerator.generateUuid(), marshalled);
+        try (ParquetFileReader reader = new ParquetFileReader(inputStream, readOptions)) {
+            CompressionCodecName codecName = reader.getRowGroups().get(0).getColumns().get(0).getCodec();
+            assertEquals(GZIP, codecName);
+        }
+    }
+
+    @Test
+    public void testMarshalCompressionCodecGzip() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:gzip");
+        mock.expectedMessageCount(1);
+
+        template.requestBody("direct:gzip", in);
+        mock.assertIsSatisfied();
+
+        byte[] marshalled = mock.getExchanges().get(0).getIn().getBody(byte[].class);
+        ParquetInputStream inputStream = new ParquetInputStream(uuidGenerator.generateUuid(), marshalled);
+        try (ParquetFileReader reader = new ParquetFileReader(inputStream, readOptions)) {
+            CompressionCodecName codecName = reader.getRowGroups().get(0).getColumns().get(0).getCodec();
+            assertEquals(GZIP, codecName);
+        }
+    }
+
+    @Test
+    public void testMarshalCompressionCodecSnappy() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:snappy");
+        mock.expectedMessageCount(1);
+
+        template.requestBody("direct:snappy", in);
+        mock.assertIsSatisfied();
+
+        byte[] marshalled = mock.getExchanges().get(0).getIn().getBody(byte[].class);
+        ParquetInputStream inputStream = new ParquetInputStream(uuidGenerator.generateUuid(), marshalled);
+        try (ParquetFileReader reader = new ParquetFileReader(inputStream, readOptions)) {
+            CompressionCodecName codecName = reader.getRowGroups().get(0).getColumns().get(0).getCodec();
+            assertEquals(SNAPPY, codecName);
+        }
+    }
+
+    @Test
+    public void testMarshalCompressionCodecUncompressed() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:uncompressed");
+        mock.expectedMessageCount(1);
+
+        template.requestBody("direct:uncompressed", in);
+        mock.assertIsSatisfied();
+
+        byte[] marshalled = mock.getExchanges().get(0).getIn().getBody(byte[].class);
+        ParquetInputStream inputStream = new ParquetInputStream(uuidGenerator.generateUuid(), marshalled);
+        try (ParquetFileReader reader = new ParquetFileReader(inputStream, readOptions)) {
+            CompressionCodecName codecName = reader.getRowGroups().get(0).getColumns().get(0).getCodec();
+            assertEquals(UNCOMPRESSED, codecName);
+        }
+    }
+
+    @Test
+    public void testMarshalCompressionCodecZstd() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:zstd");
+        mock.expectedMessageCount(1);
+
+        template.requestBody("direct:zstd", in);
+        mock.assertIsSatisfied();
+
+        byte[] marshalled = mock.getExchanges().get(0).getIn().getBody(byte[].class);
+        ParquetInputStream inputStream = new ParquetInputStream(uuidGenerator.generateUuid(), marshalled);
+        try (ParquetFileReader reader = new ParquetFileReader(inputStream, readOptions)) {
+            CompressionCodecName codecName = reader.getRowGroups().get(0).getColumns().get(0).getCodec();
+            assertEquals(ZSTD, codecName);
+        }
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+
+            @Override
+            public void configure() {
+                ParquetAvroDataFormat defaultFormat = new ParquetAvroDataFormat();
+                defaultFormat.setUnmarshalType(Pojo.class);
+                from("direct:default").marshal(defaultFormat).to("mock:default");
+
+                ParquetAvroDataFormat gzipFormat = new ParquetAvroDataFormat();
+                gzipFormat.setUnmarshalType(Pojo.class);
+                gzipFormat.setCompressionCodecName(GZIP.name());
+                from("direct:gzip").marshal(gzipFormat).to("mock:gzip");
+
+                ParquetAvroDataFormat snappyFormat = new ParquetAvroDataFormat();
+                snappyFormat.setUnmarshalType(Pojo.class);
+                snappyFormat.setCompressionCodecName(SNAPPY.name());
+                from("direct:snappy").marshal(snappyFormat).to("mock:snappy");
+
+                ParquetAvroDataFormat uncompressedFormat = new ParquetAvroDataFormat();
+                uncompressedFormat.setUnmarshalType(Pojo.class);
+                uncompressedFormat.setCompressionCodecName(UNCOMPRESSED.name());
+                from("direct:uncompressed").marshal(uncompressedFormat).to("mock:uncompressed");
+
+                ParquetAvroDataFormat zstdFormat = new ParquetAvroDataFormat();
+                zstdFormat.setUnmarshalType(Pojo.class);
+                zstdFormat.setCompressionCodecName(ZSTD.name());
+                from("direct:zstd").marshal(zstdFormat).to("mock:zstd");
+            }
+        };
+    }
+}
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/parquetAvro.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/parquetAvro.json
index b61d7563ce3..7d86486496e 100644
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/parquetAvro.json
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/parquetAvro.json
@@ -13,7 +13,8 @@
     "output": false
   },
   "properties": {
-    "unmarshalType": { "index": 0, "kind": "attribute", "displayName": "Unmarshal Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class to use when unmarshalling." },
-    "id": { "index": 1, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
+    "compressionCodecName": { "index": 0, "kind": "attribute", "displayName": "Compression Codec Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GZIP", "description": "Compression codec to use when marshalling." },
+    "unmarshalType": { "index": 1, "kind": "attribute", "displayName": "Unmarshal Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class to use when unmarshalling." },
+    "id": { "index": 2, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
   }
 }
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ParquetAvroDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ParquetAvroDataFormat.java
index ee0808a5007..334034be8e5 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ParquetAvroDataFormat.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ParquetAvroDataFormat.java
@@ -34,6 +34,10 @@ import org.apache.camel.spi.Metadata;
 @XmlAccessorType(XmlAccessType.FIELD)
 public class ParquetAvroDataFormat extends DataFormatDefinition {
 
+    @XmlAttribute
+    @Metadata(defaultValue = "GZIP")
+    private String compressionCodecName;
+
     @XmlTransient
     private Class<?> unmarshalType;
 
@@ -56,10 +60,22 @@ public class ParquetAvroDataFormat extends DataFormatDefinition {
 
     private ParquetAvroDataFormat(Builder builder) {
         this();
+        this.compressionCodecName = builder.compressionCodecName;
         this.unmarshalTypeName = builder.unmarshalTypeName;
         this.unmarshalType = builder.unmarshalType;
     }
 
+    /**
+     * Compression codec to use when marshalling.
+     */
+    public void setCompressionCodecName(String compressionCodecName) {
+        this.compressionCodecName = compressionCodecName;
+    }
+
+    public String getCompressionCodecName() {
+        return compressionCodecName;
+    }
+
     public Class<?> getUnmarshalType() {
         return unmarshalType;
     }
@@ -88,9 +104,18 @@ public class ParquetAvroDataFormat extends DataFormatDefinition {
     @XmlTransient
     public static class Builder implements DataFormatBuilder<ParquetAvroDataFormat> {
 
+        private String compressionCodecName;
         private Class<?> unmarshalType;
         private String unmarshalTypeName;
 
+        /**
+         * Compression codec to use when marshalling.
+         */
+        public Builder compressionCodecName(String compressionCodecName) {
+            this.compressionCodecName = compressionCodecName;
+            return this;
+        }
+
         /**
          * Class to use when unmarshalling.
          */
diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index 1438223c20f..ce19e0b8291 100644
--- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -2387,11 +2387,12 @@ public class ModelParser extends BaseParser {
     }
     protected ParquetAvroDataFormat doParseParquetAvroDataFormat() throws IOException, XmlPullParserException {
         return doParse(new ParquetAvroDataFormat(), (def, key, val) -> {
-            if ("unmarshalType".equals(key)) {
-                def.setUnmarshalTypeName(val);
-                return true;
+            switch (key) {
+                case "compressionCodecName": def.setCompressionCodecName(val); break;
+                case "unmarshalType": def.setUnmarshalTypeName(val); break;
+                default: return identifiedTypeAttributeHandler().accept(def, key, val);
             }
-            return identifiedTypeAttributeHandler().accept(def, key, val);
+            return true;
         }, noElementHandler(), noValueHandler());
     }
     protected ProtobufDataFormat doParseProtobufDataFormat() throws IOException, XmlPullParserException {
diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
index ea0520d9d52..9466dcbfe84 100644
--- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
+++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
@@ -3401,6 +3401,7 @@ public class ModelWriter extends BaseWriter {
             throws IOException {
         startElement(name);
         doWriteIdentifiedTypeAttributes(def);
+        doWriteAttribute("compressionCodecName", def.getCompressionCodecName());
         doWriteAttribute("unmarshalType", def.getUnmarshalTypeName());
         endElement(name);
     }
diff --git a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
index b0d62b775d7..926278a016b 100644
--- a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
+++ b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
@@ -3401,6 +3401,7 @@ public class ModelWriter extends BaseWriter {
             throws IOException {
         startElement(name);
         doWriteIdentifiedTypeAttributes(def);
+        doWriteAttribute("compressionCodecName", def.getCompressionCodecName());
         doWriteAttribute("unmarshalType", def.getUnmarshalTypeName());
         endElement(name);
     }
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index c0211030ffb..24272a5c3ef 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -10169,6 +10169,7 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
             types = org.apache.camel.model.dataformat.ParquetAvroDataFormat.class,
             order = org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1,
             properties = {
+                    @YamlProperty(name = "compression-codec-name", type = "string"),
                     @YamlProperty(name = "id", type = "string"),
                     @YamlProperty(name = "unmarshal-type", type = "string")
             }
@@ -10192,6 +10193,11 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
         protected boolean setProperty(ParquetAvroDataFormat target, String propertyKey,
                 String propertyName, Node node) {
             switch(propertyKey) {
+                case "compression-codec-name": {
+                    String val = asText(node);
+                    target.setCompressionCodecName(val);
+                    break;
+                }
                 case "id": {
                     String val = asText(node);
                     target.setId(val);
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
index 5d7127bcd0e..1fb8163bcc0 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
@@ -5461,6 +5461,9 @@
         }, {
           "type" : "object",
           "properties" : {
+            "compression-codec-name" : {
+              "type" : "string"
+            },
             "id" : {
               "type" : "string"
             },
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index ed5bc50550e..f6c9f8f4c4f 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -5371,6 +5371,9 @@
         }, {
           "type" : "object",
           "properties" : {
+            "compressionCodecName" : {
+              "type" : "string"
+            },
             "id" : {
               "type" : "string"
             },