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 2021/04/02 06:31:46 UTC

[camel] branch master updated (0437d19 -> ea2fdf0)

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

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


    from 0437d19  Regen for commit 421c35ca1ecfdebe6ba77945d96aae7995a84f30 (#5288)
     new 36489fa  CAMEL-16185 - Added more docs
     new 7e1110d1 CAMEL-16185 - Regen docs
     new ea2fdf0  Camel-AWS2-S3: Fixed CS

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/catalog/docs/aws2-s3-component.adoc       | 21 +++++++++++++++++++++
 .../src/main/docs/aws2-s3-component.adoc            | 21 +++++++++++++++++++++
 .../camel/component/aws2/s3/utils/AWS2S3Utils.java  | 16 ++++++++++++++++
 .../modules/ROOT/pages/aws2-s3-component.adoc       | 21 +++++++++++++++++++++
 4 files changed, 79 insertions(+)

[camel] 02/03: CAMEL-16185 - Regen docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7e1110d10e2153a3fd8b45b79b8494798d2bb8e1
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 2 08:29:55 2021 +0200

    CAMEL-16185 - Regen docs
---
 .../camel/catalog/docs/aws2-s3-component.adoc       | 21 +++++++++++++++++++++
 .../modules/ROOT/pages/aws2-s3-component.adoc       | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-component.adoc
index b9f86e9..5d5ea99 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-component.adoc
@@ -553,6 +553,27 @@ This operation will return an S3Object instance related to the camelKey object i
 
 This operation will return a download link url for the file camel-key in the bucket mycamelbucket and region region
 
+== Stream mode
+
+With the stream mode enabled users will be able to upload data to S3 without knowing ahead of time the dimension of the data, by leveraging multipart upload.
+The upload will be completed when: the batchSize has been completed or the batchMessageNumber has been reached.
+There are two possible naming strategy: progressive and random. With the progressive strategy each file will have the name composed by keyName option and a progressive counter, and eventually the file extension (if any), while with the random strategy a UUID will be added after keyName and eventually the file extension will appended.
+
+As an example:
+
+[source,java]
+--------------------------------------------------------------------------------
+from(kafka("topic1").brokers("localhost:9092"))
+        .log("Kafka Message is: ${body}")
+        .to(aws2S3("camel-bucket").streamMode(true).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic1}}/{{kafkaTopic1}}.txt"));
+
+from(kafka("topic2").brokers("localhost:9092"))
+         .log("Kafka Message is: ${body}")
+         .to(aws2S3("camel-bucket").streamMode(true).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic2}}/{{kafkaTopic2}}.txt"));
+--------------------------------------------------------------------------------
+
+The default size for a batch is 1 Mb, but you can adjust it according to your requirements.
+
 == Bucket Autocreation
 
 With the option `autoCreateBucket` users are able to avoid the autocreation of an S3 Bucket in case it doesn't exist. The default for this option is `true`.
diff --git a/docs/components/modules/ROOT/pages/aws2-s3-component.adoc b/docs/components/modules/ROOT/pages/aws2-s3-component.adoc
index 5799ff8..d9b4856 100644
--- a/docs/components/modules/ROOT/pages/aws2-s3-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-s3-component.adoc
@@ -555,6 +555,27 @@ This operation will return an S3Object instance related to the camelKey object i
 
 This operation will return a download link url for the file camel-key in the bucket mycamelbucket and region region
 
+== Stream mode
+
+With the stream mode enabled users will be able to upload data to S3 without knowing ahead of time the dimension of the data, by leveraging multipart upload.
+The upload will be completed when: the batchSize has been completed or the batchMessageNumber has been reached.
+There are two possible naming strategy: progressive and random. With the progressive strategy each file will have the name composed by keyName option and a progressive counter, and eventually the file extension (if any), while with the random strategy a UUID will be added after keyName and eventually the file extension will appended.
+
+As an example:
+
+[source,java]
+--------------------------------------------------------------------------------
+from(kafka("topic1").brokers("localhost:9092"))
+        .log("Kafka Message is: ${body}")
+        .to(aws2S3("camel-bucket").streamMode(true).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic1}}/{{kafkaTopic1}}.txt"));
+
+from(kafka("topic2").brokers("localhost:9092"))
+         .log("Kafka Message is: ${body}")
+         .to(aws2S3("camel-bucket").streamMode(true).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic2}}/{{kafkaTopic2}}.txt"));
+--------------------------------------------------------------------------------
+
+The default size for a batch is 1 Mb, but you can adjust it according to your requirements.
+
 == Bucket Autocreation
 
 With the option `autoCreateBucket` users are able to avoid the autocreation of an S3 Bucket in case it doesn't exist. The default for this option is `true`.

[camel] 03/03: Camel-AWS2-S3: Fixed CS

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ea2fdf0c189307cfde39364672bb40bf8b546bbb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 2 08:30:24 2021 +0200

    Camel-AWS2-S3: Fixed CS
---
 .../camel/component/aws2/s3/utils/AWS2S3Utils.java       | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java
index 8118ffe..3f8ab3d 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java
@@ -1,3 +1,19 @@
+/*
+ * 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.component.aws2.s3.utils;
 
 import java.io.ByteArrayOutputStream;

[camel] 01/03: CAMEL-16185 - Added more docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 36489fad498bcef9481fd0d7f49eb819f73e26bb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 2 08:24:07 2021 +0200

    CAMEL-16185 - Added more docs
---
 .../src/main/docs/aws2-s3-component.adoc            | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
index b9f86e9..5d5ea99 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
+++ b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
@@ -553,6 +553,27 @@ This operation will return an S3Object instance related to the camelKey object i
 
 This operation will return a download link url for the file camel-key in the bucket mycamelbucket and region region
 
+== Stream mode
+
+With the stream mode enabled users will be able to upload data to S3 without knowing ahead of time the dimension of the data, by leveraging multipart upload.
+The upload will be completed when: the batchSize has been completed or the batchMessageNumber has been reached.
+There are two possible naming strategy: progressive and random. With the progressive strategy each file will have the name composed by keyName option and a progressive counter, and eventually the file extension (if any), while with the random strategy a UUID will be added after keyName and eventually the file extension will appended.
+
+As an example:
+
+[source,java]
+--------------------------------------------------------------------------------
+from(kafka("topic1").brokers("localhost:9092"))
+        .log("Kafka Message is: ${body}")
+        .to(aws2S3("camel-bucket").streamMode(true).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic1}}/{{kafkaTopic1}}.txt"));
+
+from(kafka("topic2").brokers("localhost:9092"))
+         .log("Kafka Message is: ${body}")
+         .to(aws2S3("camel-bucket").streamMode(true).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic2}}/{{kafkaTopic2}}.txt"));
+--------------------------------------------------------------------------------
+
+The default size for a batch is 1 Mb, but you can adjust it according to your requirements.
+
 == Bucket Autocreation
 
 With the option `autoCreateBucket` users are able to avoid the autocreation of an S3 Bucket in case it doesn't exist. The default for this option is `true`.