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/01/27 05:50:16 UTC
[camel] branch master updated (ae2c79d -> 4d3c860)
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 ae2c79d Full build
new b6bf2b7 [Camel-15341] Created camel-azure-storage-datalake component
new 8dc7115 CAMEL-15341 - Regen
new 6d7a474 code refractor
new cc7343a CAMEL-15341 - Full regen
new 84ee9f2 Regen
new 988bdbb CAMEL-15341 - Regen and added back profile for skipping IT Test
new 86fea84 CAMEL-15341 - Renamed IT test classes
new 4d3c860 CAMEL-15341 - Fixed logging configuration
The 8 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:
bom/camel-bom/pom.xml | 5 +
camel-dependencies/pom.xml | 2 +
.../org/apache/camel/catalog/components.properties | 1 +
.../catalog/components/azure-storage-datalake.json | 97 +
.../org/apache/camel/catalog/docs.properties | 1 +
.../docs/azure-storage-datalake-component.adoc | 553 +++++
components/camel-azure-storage-datalake/pom.xml | 139 ++
.../datalake/DataLakeComponentConfigurer.java | 229 ++
.../datalake/DataLakeEndpointConfigurer.java | 231 ++
.../datalake/DataLakeEndpointUriFactory.java | 97 +
.../services/org/apache/camel/component.properties | 7 +
.../apache/camel/component/azure-storage-datalake | 2 +
.../configurer/azure-storage-datalake-component | 2 +
.../configurer/azure-storage-datalake-endpoint | 2 +
.../urifactory/azure-storage-datalake-endpoint | 2 +
.../storage/datalake/azure-storage-datalake.json | 97 +
.../docs/azure-storage-datalake-component.adoc | 553 +++++
.../azure/storage/datalake/DataLakeComponent.java | 112 +
.../storage/datalake/DataLakeConfiguration.java | 356 +++
.../DataLakeConfigurationOptionsProxy.java | 267 +++
.../azure/storage/datalake/DataLakeConstants.java | 86 +
.../azure/storage/datalake/DataLakeConsumer.java | 165 ++
.../azure/storage/datalake/DataLakeEndpoint.java | 97 +
.../storage/datalake/DataLakeExchangeHeaders.java | 414 ++++
.../datalake/DataLakeOperationsDefinition.java | 35 +
.../azure/storage/datalake/DataLakeProducer.java | 172 ++
.../azure/storage/datalake/DataLakeUtils.java | 48 +
.../storage/datalake/FileCommonRequestOptions.java | 78 +
.../storage/datalake/FileStreamAndLength.java | 78 +
.../datalake/client/DataLakeClientFactory.java | 94 +
.../client/DataLakeDirectoryClientWrapper.java | 56 +
.../datalake/client/DataLakeFileClientWrapper.java | 130 ++
.../client/DataLakeFileSystemClientWrapper.java | 70 +
.../client/DataLakeServiceClientWrapper.java | 47 +
.../operations/DataLakeDirectoryOperations.java | 69 +
.../operations/DataLakeFileOperations.java | 240 ++
.../operations/DataLakeFileSystemOperations.java | 85 +
.../operations/DataLakeOperationResponse.java | 53 +
.../operations/DataLakeServiceOperations.java | 42 +
.../datalake/component/DataLakeComponentTest.java | 86 +
.../azure/storage/datalake/integration/BaseIT.java | 94 +
.../datalake/integration/DataLakeConsumerIT.java | 224 ++
.../integration/DataLakeFileOperationIT.java | 135 ++
.../integration/DataLakeFileSystemOperationIT.java | 81 +
.../operations/DataLakeDirectoryOperationTest.java | 81 +
.../operations/DataLakeFileOperationTest.java | 110 +
.../DataLakeFileSystemOperationTest.java | 172 ++
.../src/test/resources/log4j2.properties | 27 +
components/pom.xml | 1 +
core/camel-allcomponents/pom.xml | 4 +
.../component/ComponentsBuilderFactory.java | 13 +
...zureStorageDatalakeComponentBuilderFactory.java | 641 +++++
.../src/generated/resources/metadata.json | 22 +
.../builder/endpoint/EndpointBuilderFactory.java | 1 +
.../camel/builder/endpoint/EndpointBuilders.java | 1 +
.../builder/endpoint/StaticEndpointBuilders.java | 49 +
.../dsl/DataLakeEndpointBuilderFactory.java | 2465 ++++++++++++++++++++
docs/components/modules/ROOT/nav.adoc | 1 +
.../pages/azure-storage-datalake-component.adoc | 555 +++++
parent/pom.xml | 12 +
.../pom.xml | 69 +
.../src/main/resources/META-INF/MANIFEST.MF | 0
.../clients/AzureStorageDataLakeClientUtils.java | 45 +
.../AzureStorageDataLakeRemoteService.java | 54 +
.../AzureStorageDataLakeServiceFactory.java | 43 +
test-infra/pom.xml | 1 +
66 files changed, 9801 insertions(+)
create mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-storage-datalake.json
create mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc
create mode 100644 components/camel-azure-storage-datalake/pom.xml
create mode 100644 components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeComponentConfigurer.java
create mode 100644 components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpointConfigurer.java
create mode 100644 components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpointUriFactory.java
create mode 100644 components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/component.properties
create mode 100644 components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/component/azure-storage-datalake
create mode 100644 components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/configurer/azure-storage-datalake-component
create mode 100644 components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/configurer/azure-storage-datalake-endpoint
create mode 100644 components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/urifactory/azure-storage-datalake-endpoint
create mode 100644 components/camel-azure-storage-datalake/src/generated/resources/org/apache/camel/component/azure/storage/datalake/azure-storage-datalake.json
create mode 100644 components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeComponent.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConfiguration.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConfigurationOptionsProxy.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConstants.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConsumer.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpoint.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeExchangeHeaders.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeOperationsDefinition.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeProducer.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeUtils.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/FileCommonRequestOptions.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/FileStreamAndLength.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeClientFactory.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeDirectoryClientWrapper.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileClientWrapper.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileSystemClientWrapper.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeServiceClientWrapper.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeDirectoryOperations.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileOperations.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileSystemOperations.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeOperationResponse.java
create mode 100644 components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeServiceOperations.java
create mode 100644 components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/component/DataLakeComponentTest.java
create mode 100644 components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/BaseIT.java
create mode 100644 components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
create mode 100644 components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
create mode 100644 components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
create mode 100644 components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeDirectoryOperationTest.java
create mode 100644 components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileOperationTest.java
create mode 100644 components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileSystemOperationTest.java
create mode 100644 components/camel-azure-storage-datalake/src/test/resources/log4j2.properties
create mode 100644 core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureStorageDatalakeComponentBuilderFactory.java
create mode 100644 core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataLakeEndpointBuilderFactory.java
create mode 100644 docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc
create mode 100644 test-infra/camel-test-infra-azure-storage-datalake/pom.xml
copy {tooling/maven/camel-resources-plugin => test-infra/camel-test-infra-azure-storage-datalake}/src/main/resources/META-INF/MANIFEST.MF (100%)
create mode 100644 test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/clients/AzureStorageDataLakeClientUtils.java
create mode 100644 test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeRemoteService.java
create mode 100644 test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeServiceFactory.java
[camel] 04/08: CAMEL-15341 - Full regen
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 cc7343ac369f807434da5d65a327308a12b51606
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jan 26 19:03:26 2021 +0100
CAMEL-15341 - Full regen
---
.../camel/catalog/docs/azure-storage-datalake-component.adoc | 8 +++++++-
.../modules/ROOT/pages/azure-storage-datalake-component.adoc | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc
index e6fcd5e..bc6f3e6 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc
@@ -541,6 +541,12 @@ For running all the test in the component, you will need to obtain azure account
can run the full test, on this component directory, by running the following maven command
----
-mvn test -Dazure.storage.account.name=accountName -Dazure.storage.account.key=accountKey
+mvn verify -PfullTests -Dazure.storage.account.name=<accountName> -Dazure.storage.account.key=<accessKey>
+----
+
+You can also skip the integration test, and run only basic unit test by using the command
+
+----
+mvn test
----
diff --git a/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc b/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc
index c95eecb..fffe00e 100644
--- a/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc
+++ b/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc
@@ -543,6 +543,12 @@ For running all the test in the component, you will need to obtain azure account
can run the full test, on this component directory, by running the following maven command
----
-mvn test -Dazure.storage.account.name=accountName -Dazure.storage.account.key=accountKey
+mvn verify -PfullTests -Dazure.storage.account.name=<accountName> -Dazure.storage.account.key=<accessKey>
+----
+
+You can also skip the integration test, and run only basic unit test by using the command
+
+----
+mvn test
----
[camel] 05/08: Regen
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 84ee9f26b9dadebf581410fb711d497be9192041
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jan 26 19:18:03 2021 +0100
Regen
---
components/camel-azure-storage-datalake/pom.xml | 29 ----------------------
.../azure/storage/datalake/integration/BaseIT.java | 2 ++
...ConsumerIT.java => DataLakeConsumerITTest.java} | 4 +--
...ionIT.java => DataLakeFileOperationITTest.java} | 4 ++-
...java => DataLakeFileSystemOperationITTest.java} | 4 ++-
5 files changed, 10 insertions(+), 33 deletions(-)
diff --git a/components/camel-azure-storage-datalake/pom.xml b/components/camel-azure-storage-datalake/pom.xml
index 1c5fba3..b4ecd6b 100644
--- a/components/camel-azure-storage-datalake/pom.xml
+++ b/components/camel-azure-storage-datalake/pom.xml
@@ -106,34 +106,5 @@
<scope>test</scope>
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>fullTests</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${maven-surefire-plugin-version}</version>
- <executions>
- <execution>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>none</exclude>
- </excludes>
- <includes>
- <include>**/*IT</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/BaseIT.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/BaseIT.java
index dea734f..ceaa970 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/BaseIT.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/BaseIT.java
@@ -33,10 +33,12 @@ import org.apache.camel.test.infra.azure.storage.datalake.services.AzureStorageD
import org.apache.camel.test.junit5.CamelTestSupport;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
+import org.junit.Ignore;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.RegisterExtension;
+@Ignore
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class BaseIT extends CamelTestSupport {
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerITTest.java
similarity index 99%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerITTest.java
index 4bd0062..5ce5afb 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerITTest.java
@@ -50,11 +50,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
-public class DataLakeConsumerIT extends BaseIT {
+public class DataLakeConsumerITTest extends BaseIT {
@TempDir
static Path testDir;
- private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumerIT.class);
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumerITTest.class);
@EndpointInject("direct:createFile")
private ProducerTemplate templateStart;
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationITTest.java
similarity index 98%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationITTest.java
index 5dd7a4f..7189c20 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationITTest.java
@@ -38,6 +38,7 @@ import org.apache.camel.component.azure.storage.datalake.operations.DataLakeOper
import org.apache.camel.support.DefaultExchange;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.RandomStringUtils;
+import org.junit.Ignore;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
@@ -45,7 +46,8 @@ import org.junit.jupiter.api.io.TempDir;
import static org.junit.jupiter.api.Assertions.*;
-public class DataLakeFileOperationIT extends BaseIT {
+@Ignore
+public class DataLakeFileOperationITTest extends BaseIT {
private DataLakeFileSystemClientWrapper fileSystemClientWrapper;
private String randomFileName;
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationITTest.java
similarity index 97%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationITTest.java
index 587662d..99d02e8 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationITTest.java
@@ -25,13 +25,15 @@ import org.apache.camel.component.azure.storage.datalake.client.DataLakeServiceC
import org.apache.camel.component.azure.storage.datalake.operations.DataLakeFileSystemOperations;
import org.apache.camel.component.azure.storage.datalake.operations.DataLakeOperationResponse;
import org.awaitility.Awaitility;
+import org.junit.Ignore;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
-public class DataLakeFileSystemOperationIT extends BaseIT {
+@Ignore
+public class DataLakeFileSystemOperationITTest extends BaseIT {
private DataLakeServiceClientWrapper serviceClientWrapper;
[camel] 07/08: CAMEL-15341 - Renamed IT test classes
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 86fea848310ce46c859586d62431d77bbdd97cfc
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 27 06:41:55 2021 +0100
CAMEL-15341 - Renamed IT test classes
---
.../{DataLakeConsumerITTest.java => DataLakeConsumerIT.java} | 4 ++--
...{DataLakeFileOperationITTest.java => DataLakeFileOperationIT.java} | 2 +-
...eSystemOperationITTest.java => DataLakeFileSystemOperationIT.java} | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerITTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
similarity index 99%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerITTest.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
index 5ce5afb..4bd0062 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerITTest.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
@@ -50,11 +50,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
-public class DataLakeConsumerITTest extends BaseIT {
+public class DataLakeConsumerIT extends BaseIT {
@TempDir
static Path testDir;
- private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumerITTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumerIT.class);
@EndpointInject("direct:createFile")
private ProducerTemplate templateStart;
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationITTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
similarity index 99%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationITTest.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
index 7189c20..c51233c 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationITTest.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
@@ -47,7 +47,7 @@ import org.junit.jupiter.api.io.TempDir;
import static org.junit.jupiter.api.Assertions.*;
@Ignore
-public class DataLakeFileOperationITTest extends BaseIT {
+public class DataLakeFileOperationIT extends BaseIT {
private DataLakeFileSystemClientWrapper fileSystemClientWrapper;
private String randomFileName;
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationITTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
similarity index 98%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationITTest.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
index 99d02e8..72bd016 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationITTest.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
@Ignore
-public class DataLakeFileSystemOperationITTest extends BaseIT {
+public class DataLakeFileSystemOperationIT extends BaseIT {
private DataLakeServiceClientWrapper serviceClientWrapper;
[camel] 02/08: CAMEL-15341 - Regen
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 8dc711564af34eb60bb290c405e980f66d136567
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jan 26 17:17:59 2021 +0100
CAMEL-15341 - Regen
---
bom/camel-bom/pom.xml | 5 ++
camel-dependencies/pom.xml | 4 +
.../org/apache/camel/catalog/components.properties | 1 +
.../catalog/components/azure-storage-datalake.json | 97 ++++++++++++++++++++++
.../org/apache/camel/catalog/docs.properties | 1 +
docs/components/modules/ROOT/nav.adoc | 1 +
6 files changed, 109 insertions(+)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 9092713..23eac32 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -343,6 +343,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-azure-storage-datalake</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-azure-storage-queue</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index 092a28d..f981164 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -1,17 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
+
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.
+
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index cd3174c..8773a62 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -63,6 +63,7 @@ azure-blob
azure-eventhubs
azure-queue
azure-storage-blob
+azure-storage-datalake
azure-storage-queue
bean
bean-validator
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-storage-datalake.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-storage-datalake.json
new file mode 100644
index 0000000..344bc7b
--- /dev/null
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-storage-datalake.json
@@ -0,0 +1,97 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "azure-storage-datalake",
+ "title": "Azure storage datalake service",
+ "description": "Camel Azure Datalake Gen2 Component",
+ "deprecated": false,
+ "firstVersion": "3.8.0",
+ "label": "cloud,file",
+ "javaType": "org.apache.camel.component.azure.storage.datalake.DataLakeComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-azure-storage-datalake",
+ "version": "3.8.0-SNAPSHOT",
+ "scheme": "azure-storage-datalake",
+ "extendsScheme": "",
+ "syntax": "azure-storage-datalake:accountName\/fileSystemName",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": false,
+ "lenientProperties": false
+ },
+ "componentProperties": {
+ "accountKey": { "kind": "property", "displayName": "Account Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "account key for authentication" },
+ "clientId": { "kind": "property", "displayName": "Client Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client id for azure account" },
+ "clientSecret": { "kind": "property", "displayName": "Client Secret", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client secret for azure account" },
+ "clientSecretCredential": { "kind": "property", "displayName": "Client Secret Credential", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.identity.ClientSecretCredential", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client secret credential for authentication" },
+ "close": { "kind": "property", "displayName": "Close", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Whether or not a file changed event raised indicates completion (true) or modification (false)" },
+ "closeStreamAfterRead": { "kind": "property", "displayName": "Close Stream After Read", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "check for closing stream after read" },
+ "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "configuration object for datalake" },
+ "dataCount": { "kind": "property", "displayName": "Data Count", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "count number of bytes to download" },
+ "directoryName": { "kind": "property", "displayName": "Directory Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "directory of the file to be handled in component" },
+ "downloadLinkExpiration": { "kind": "property", "displayName": "Download Link Expiration", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "download link expiration time" },
+ "expression": { "kind": "property", "displayName": "Expression", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "expression for queryInputStream" },
+ "fileDir": { "kind": "property", "displayName": "File Dir", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "directory of file to do operations in the local system" },
+ "fileName": { "kind": "property", "displayName": "File Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "name of file to be handled in component" },
+ "fileOffset": { "kind": "property", "displayName": "File Offset", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "offset position in file for different operations" },
+ "maxResults": { "kind": "property", "displayName": "Max Results", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "maximum number of results to show at a time" },
+ "maxRetryRequests": { "kind": "property", "displayName": "Max Retry Requests", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "no of retries to a given request" },
+ "openOptions": { "kind": "property", "displayName": "Open Options", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Set<java.nio.file.OpenOption>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "set open options for creating file" },
+ "path": { "kind": "property", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "path in azure datalake for operations" },
+ "permission": { "kind": "property", "displayName": "Permission", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "permission string for the file" },
+ "position": { "kind": "property", "displayName": "Position", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file." },
+ "recursive": { "kind": "property", "displayName": "Recursive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "recursively include all paths" },
+ "regex": { "kind": "property", "displayName": "Regex", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "regular expression for matching file names" },
+ "retainUncommitedData": { "kind": "property", "displayName": "Retain Uncommited Data", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Whether or not uncommitted data is to be retained after the operation" },
+ "serviceClient": { "kind": "property", "displayName": "Service Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.file.datalake.DataLakeServiceClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "datalake service client for azure storage data [...]
+ "sharedKeyCredential": { "kind": "property", "displayName": "Shared Key Credential", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.common.StorageSharedKeyCredential", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "shared key credential for azure datalake gen2" },
+ "tenantId": { "kind": "property", "displayName": "Tenant Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "tenant id for azure account" },
+ "timeout": { "kind": "property", "displayName": "Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Timeout for operation" },
+ "umask": { "kind": "property", "displayName": "Umask", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "umask permission for file" },
+ "userPrincipalNameReturned": { "kind": "property", "displayName": "User Principal Name Returned", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "whether or not to use upn" },
+ "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a me [...]
+ "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
+ "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition", "enum": [ "listFileSystem", "listFiles" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "listFileSystem", "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField" [...]
+ "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
+ },
+ "properties": {
+ "accountName": { "kind": "path", "displayName": "Account Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "name of the azure account" },
+ "fileSystemName": { "kind": "path", "displayName": "File System Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "name of filesystem to be used" },
+ "accountKey": { "kind": "parameter", "displayName": "Account Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "account key for authentication" },
+ "clientId": { "kind": "parameter", "displayName": "Client Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client id for azure account" },
+ "clientSecret": { "kind": "parameter", "displayName": "Client Secret", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client secret for azure account" },
+ "clientSecretCredential": { "kind": "parameter", "displayName": "Client Secret Credential", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.identity.ClientSecretCredential", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client secret credential for authentication" },
+ "close": { "kind": "parameter", "displayName": "Close", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Whether or not a file changed event raised indicates completion (true) or modification (false)" },
+ "closeStreamAfterRead": { "kind": "parameter", "displayName": "Close Stream After Read", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "check for closing stream after read" },
+ "dataCount": { "kind": "parameter", "displayName": "Data Count", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "count number of bytes to download" },
+ "dataLakeServiceClient": { "kind": "parameter", "displayName": "Data Lake Service Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.file.datalake.DataLakeServiceClient", "deprecated": false, "autowired": false, "secret": false, "description": "service client of datalake" },
+ "directoryName": { "kind": "parameter", "displayName": "Directory Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "directory of the file to be handled in component" },
+ "downloadLinkExpiration": { "kind": "parameter", "displayName": "Download Link Expiration", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "download link expiration time" },
+ "expression": { "kind": "parameter", "displayName": "Expression", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "expression for queryInputStream" },
+ "fileDir": { "kind": "parameter", "displayName": "File Dir", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "directory of file to do operations in the local system" },
+ "fileName": { "kind": "parameter", "displayName": "File Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "name of file to be handled in component" },
+ "fileOffset": { "kind": "parameter", "displayName": "File Offset", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "offset position in file for different operations" },
+ "maxResults": { "kind": "parameter", "displayName": "Max Results", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "maximum number of results to show at a time" },
+ "maxRetryRequests": { "kind": "parameter", "displayName": "Max Retry Requests", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "no of retries to a given request" },
+ "openOptions": { "kind": "parameter", "displayName": "Open Options", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Set<java.nio.file.OpenOption>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "set open options for creating file" },
+ "path": { "kind": "parameter", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "path in azure datalake for operations" },
+ "permission": { "kind": "parameter", "displayName": "Permission", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "permission string for the file" },
+ "position": { "kind": "parameter", "displayName": "Position", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file." },
+ "recursive": { "kind": "parameter", "displayName": "Recursive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "recursively include all paths" },
+ "regex": { "kind": "parameter", "displayName": "Regex", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "regular expression for matching file names" },
+ "retainUncommitedData": { "kind": "parameter", "displayName": "Retain Uncommited Data", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Whether or not uncommitted data is to be retained after the operation" },
+ "serviceClient": { "kind": "parameter", "displayName": "Service Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.file.datalake.DataLakeServiceClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "datalake service client for azure storage dat [...]
+ "sharedKeyCredential": { "kind": "parameter", "displayName": "Shared Key Credential", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.common.StorageSharedKeyCredential", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "shared key credential for azure datalake gen2" },
+ "tenantId": { "kind": "parameter", "displayName": "Tenant Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "tenant id for azure account" },
+ "timeout": { "kind": "parameter", "displayName": "Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Timeout for operation" },
+ "umask": { "kind": "parameter", "displayName": "Umask", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "umask permission for file" },
+ "userPrincipalNameReturned": { "kind": "parameter", "displayName": "User Principal Name Returned", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "whether or not to use upn" },
+ "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
+ "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the con [...]
+ "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
+ "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during sta [...]
+ "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition", "enum": [ "listFileSystem", "listFiles" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "listFileSystem", "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField [...]
+ }
+}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties
index fd2e98b..fd942fb 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties
@@ -70,6 +70,7 @@ azure-blob-component
azure-eventhubs-component
azure-queue-component
azure-storage-blob-component
+azure-storage-datalake-component
azure-storage-queue-component
azure-summary
barcode-dataformat
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index b1991ef..377780b 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -70,6 +70,7 @@
*** xref:azure-blob-component.adoc[Azure Storage Blob Service (Deprecated)]
*** xref:azure-storage-queue-component.adoc[Azure Storage Queue Service]
*** xref:azure-queue-component.adoc[Azure Storage Queue Service (Deprecated)]
+** xref:azure-storage-datalake-component.adoc[Azure storage datalake service]
** xref:bean-component.adoc[Bean]
** xref:bean-validator-component.adoc[Bean Validator]
** xref:beanstalk-component.adoc[Beanstalk]
[camel] 06/08: CAMEL-15341 - Regen and added back profile for
skipping IT Test
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 988bdbbc5a3f6a13d8a2b57dbc9c9dff24b21e7c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 27 06:40:08 2021 +0100
CAMEL-15341 - Regen and added back profile for skipping IT Test
---
.../docs/azure-storage-datalake-component.adoc | 1 +
components/camel-azure-storage-datalake/pom.xml | 29 ++++++++++++++++++++++
.../pages/azure-storage-datalake-component.adoc | 1 +
3 files changed, 31 insertions(+)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc
index bc6f3e6..aafb47d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc
@@ -550,3 +550,4 @@ You can also skip the integration test, and run only basic unit test by using th
mvn test
----
+
diff --git a/components/camel-azure-storage-datalake/pom.xml b/components/camel-azure-storage-datalake/pom.xml
index b4ecd6b..1c5fba3 100644
--- a/components/camel-azure-storage-datalake/pom.xml
+++ b/components/camel-azure-storage-datalake/pom.xml
@@ -106,5 +106,34 @@
<scope>test</scope>
</dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>fullTests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${maven-surefire-plugin-version}</version>
+ <executions>
+ <execution>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <exclude>none</exclude>
+ </excludes>
+ <includes>
+ <include>**/*IT</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
diff --git a/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc b/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc
index fffe00e..11f651a 100644
--- a/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc
+++ b/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc
@@ -552,3 +552,4 @@ You can also skip the integration test, and run only basic unit test by using th
mvn test
----
+
[camel] 08/08: CAMEL-15341 - Fixed logging configuration
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 4d3c860f362c5c679de142d16add5d5db3ea1acf
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 27 06:42:50 2021 +0100
CAMEL-15341 - Fixed logging configuration
---
.../src/test/resources/log4j2.properties | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/components/camel-azure-storage-datalake/src/test/resources/log4j2.properties b/components/camel-azure-storage-datalake/src/test/resources/log4j2.properties
index ff832d3..b2c5e71 100644
--- a/components/camel-azure-storage-datalake/src/test/resources/log4j2.properties
+++ b/components/camel-azure-storage-datalake/src/test/resources/log4j2.properties
@@ -14,12 +14,14 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
-appender.out.layout.pattern=%d [%15.15t] %highlight{%-5p} %-30.30c - %m%n
-appender.out.layout.type=PatternLayout
-appender.out.name=out
-appender.out.type=Console
-logger.mine.level=INFO
-logger.mine.name=org.apache.camel.component.chuck
-loggers=mine
-rootLogger.appenderRef.out.ref=out
-rootLogger.level=INFO
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-azure-storage-datalake-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
[camel] 03/08: code refractor
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 6d7a4742e366fce32df9d48c3adc2d6f882bd154
Author: aryankoul <ar...@gmail.com>
AuthorDate: Tue Jan 26 23:18:13 2021 +0530
code refractor
---
components/camel-azure-storage-datalake/pom.xml | 29 ++++++++++++++++++++++
.../docs/azure-storage-datalake-component.adoc | 9 ++++++-
...keConsumerTest.java => DataLakeConsumerIT.java} | 4 +--
...ationTest.java => DataLakeFileOperationIT.java} | 2 +-
...est.java => DataLakeFileSystemOperationIT.java} | 2 +-
5 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/components/camel-azure-storage-datalake/pom.xml b/components/camel-azure-storage-datalake/pom.xml
index b4ecd6b..1c5fba3 100644
--- a/components/camel-azure-storage-datalake/pom.xml
+++ b/components/camel-azure-storage-datalake/pom.xml
@@ -106,5 +106,34 @@
<scope>test</scope>
</dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>fullTests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${maven-surefire-plugin-version}</version>
+ <executions>
+ <execution>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <exclude>none</exclude>
+ </excludes>
+ <includes>
+ <include>**/*IT</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
diff --git a/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc b/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
index e6fcd5e..aafb47d 100644
--- a/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
+++ b/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
@@ -541,6 +541,13 @@ For running all the test in the component, you will need to obtain azure account
can run the full test, on this component directory, by running the following maven command
----
-mvn test -Dazure.storage.account.name=accountName -Dazure.storage.account.key=accountKey
+mvn verify -PfullTests -Dazure.storage.account.name=<accountName> -Dazure.storage.account.key=<accessKey>
----
+You can also skip the integration test, and run only basic unit test by using the command
+
+----
+mvn test
+----
+
+
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
similarity index 99%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerTest.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
index 53bb232..4bd0062 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerTest.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
@@ -50,11 +50,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
-public class DataLakeConsumerTest extends BaseIT {
+public class DataLakeConsumerIT extends BaseIT {
@TempDir
static Path testDir;
- private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumerTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumerIT.class);
@EndpointInject("direct:createFile")
private ProducerTemplate templateStart;
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
similarity index 99%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationTest.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
index 3cda6eb..5dd7a4f 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationTest.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
@@ -45,7 +45,7 @@ import org.junit.jupiter.api.io.TempDir;
import static org.junit.jupiter.api.Assertions.*;
-public class DataLakeFileOperationTest extends BaseIT {
+public class DataLakeFileOperationIT extends BaseIT {
private DataLakeFileSystemClientWrapper fileSystemClientWrapper;
private String randomFileName;
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
similarity index 98%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationTest.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
index 02a32bc..587662d 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationTest.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
-public class DataLakeFileSystemOperationTest extends BaseIT {
+public class DataLakeFileSystemOperationIT extends BaseIT {
private DataLakeServiceClientWrapper serviceClientWrapper;
[camel] 01/08: [Camel-15341] Created camel-azure-storage-datalake
component
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 b6bf2b7f204946104353c9ed665c153a2449edbd
Author: aryankoul <ar...@gmail.com>
AuthorDate: Tue Oct 27 23:42:10 2020 +0530
[Camel-15341] Created camel-azure-storage-datalake component
---
camel-dependencies/pom.xml | 6 +-
.../docs/azure-storage-datalake-component.adoc | 546 +++++
components/camel-azure-storage-datalake/pom.xml | 110 +
.../datalake/DataLakeComponentConfigurer.java | 229 ++
.../datalake/DataLakeEndpointConfigurer.java | 231 ++
.../datalake/DataLakeEndpointUriFactory.java | 97 +
.../services/org/apache/camel/component.properties | 7 +
.../apache/camel/component/azure-storage-datalake | 2 +
.../configurer/azure-storage-datalake-component | 2 +
.../configurer/azure-storage-datalake-endpoint | 2 +
.../urifactory/azure-storage-datalake-endpoint | 2 +
.../storage/datalake/azure-storage-datalake.json | 97 +
.../docs/azure-storage-datalake-component.adoc | 546 +++++
.../azure/storage/datalake/DataLakeComponent.java | 112 +
.../storage/datalake/DataLakeConfiguration.java | 356 +++
.../DataLakeConfigurationOptionsProxy.java | 267 +++
.../azure/storage/datalake/DataLakeConstants.java | 86 +
.../azure/storage/datalake/DataLakeConsumer.java | 165 ++
.../azure/storage/datalake/DataLakeEndpoint.java | 97 +
.../storage/datalake/DataLakeExchangeHeaders.java | 414 ++++
.../datalake/DataLakeOperationsDefinition.java | 35 +
.../azure/storage/datalake/DataLakeProducer.java | 172 ++
.../azure/storage/datalake/DataLakeUtils.java | 48 +
.../storage/datalake/FileCommonRequestOptions.java | 78 +
.../storage/datalake/FileStreamAndLength.java | 78 +
.../datalake/client/DataLakeClientFactory.java | 94 +
.../client/DataLakeDirectoryClientWrapper.java | 56 +
.../datalake/client/DataLakeFileClientWrapper.java | 130 ++
.../client/DataLakeFileSystemClientWrapper.java | 70 +
.../client/DataLakeServiceClientWrapper.java | 47 +
.../operations/DataLakeDirectoryOperations.java | 69 +
.../operations/DataLakeFileOperations.java | 240 ++
.../operations/DataLakeFileSystemOperations.java | 85 +
.../operations/DataLakeOperationResponse.java | 53 +
.../operations/DataLakeServiceOperations.java | 42 +
.../datalake/component/DataLakeComponentTest.java | 86 +
.../azure/storage/datalake/integration/BaseIT.java | 92 +
.../datalake/integration/DataLakeConsumerTest.java | 224 ++
.../integration/DataLakeFileOperationTest.java | 133 ++
.../DataLakeFileSystemOperationTest.java | 79 +
.../operations/DataLakeDirectoryOperationTest.java | 81 +
.../operations/DataLakeFileOperationTest.java | 110 +
.../DataLakeFileSystemOperationTest.java | 172 ++
.../src/test/resources/log4j2.properties | 25 +
components/pom.xml | 1 +
core/camel-allcomponents/pom.xml | 4 +
.../component/ComponentsBuilderFactory.java | 13 +
...zureStorageDatalakeComponentBuilderFactory.java | 641 +++++
.../src/generated/resources/metadata.json | 22 +
.../builder/endpoint/EndpointBuilderFactory.java | 1 +
.../camel/builder/endpoint/EndpointBuilders.java | 1 +
.../builder/endpoint/StaticEndpointBuilders.java | 49 +
.../dsl/DataLakeEndpointBuilderFactory.java | 2465 ++++++++++++++++++++
.../pages/azure-storage-datalake-component.adoc | 548 +++++
parent/pom.xml | 12 +
.../pom.xml | 69 +
.../src/main/resources/META-INF/MANIFEST.MF | 0
.../clients/AzureStorageDataLakeClientUtils.java | 45 +
.../AzureStorageDataLakeRemoteService.java | 54 +
.../AzureStorageDataLakeServiceFactory.java | 43 +
test-infra/pom.xml | 1 +
61 files changed, 9638 insertions(+), 4 deletions(-)
diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index b11549e..092a28d 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -1,21 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-
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.
-
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
@@ -76,7 +72,9 @@
<axiom-version>1.2.14</axiom-version>
<azure-eventhubs-checkpointstore-blob-version>1.3.1</azure-eventhubs-checkpointstore-blob-version>
<azure-eventhubs-java-version>5.3.1</azure-eventhubs-java-version>
+ <azure-identity-version>1.1.3</azure-identity-version>
<azure-storage-blob-java-sdk12-version>12.9.0</azure-storage-blob-java-sdk12-version>
+ <azure-storage-datalake-java-sdk12-version>12.3.0</azure-storage-datalake-java-sdk12-version>
<azure-storage-java-sdk-version>8.6.0</azure-storage-java-sdk-version>
<azure-storage-queue-java-sdk12-version>12.7.0</azure-storage-queue-java-sdk12-version>
<beanio-version>2.1.0</beanio-version>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc
new file mode 100644
index 0000000..e6fcd5e
--- /dev/null
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-datalake-component.adoc
@@ -0,0 +1,546 @@
+[[azure-storage-datalake-component]]
+= Azure storage datalake service Component
+:docTitle: Azure storage datalake service
+:artifactId: camel-azure-storage-datalake
+:description: Camel Azure Datalake Gen2 Component
+:since: 3.8
+:supportLevel: Preview
+:component-header: Both producer and consumer are supported
+include::{cq-version}@camel-quarkus:ROOT:partial$reference/components/azure-storage-datalake.adoc[opts=optional]
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The Azure storage datalake component is used for storing and retrieving file from Azure Storage Datalake Sevice using the *Azure APIs v12*.
+
+Prerequisites
+
+You need to have a valid Azure account with Azure storage set up. More information can be found at https://docs.microsoft.com/azure/[Azure Documentation Portal].
+
+Maven users will need to add the following dependency to their `pom.xml` for this component.
+
+[source,xml]
+---------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-azure-storage-datalake</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your camel core version -->
+</dependency>
+---------------
+
+== Uri Format
+
+[source,text]
+--
+azure-storage-datalake:accountName[/fileSystemName][?options]
+--
+
+In case of a consumer, both accountName and fileSystemName are required. In case of the producer, it depends on the operation
+being requested.
+
+You can append query options to the URI in the following format, ?option1=value&option2=value&...
+
+For example, in order to download content from file `test.txt` located on the `filesystem` in `camelTesting` storage account, use the following snippet:
+
+[source,java]
+--
+from("azure-storage-datalake:camelTesting/filesystem?fileName=test.txt&accountKey=key").
+to("file://fileDirectory");
+--
+
+== Uri Options
+
+// component options: START
+The Azure storage datalake service component supports 33 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accountKey* (common) | account key for authentication | | String
+| *clientId* (common) | client id for azure account | | String
+| *clientSecret* (common) | client secret for azure account | | String
+| *clientSecretCredential* (common) | client secret credential for authentication | | ClientSecretCredential
+| *close* (common) | Whether or not a file changed event raised indicates completion (true) or modification (false) | | Boolean
+| *closeStreamAfterRead* (common) | check for closing stream after read | | Boolean
+| *configuration* (common) | configuration object for datalake | | DataLakeConfiguration
+| *dataCount* (common) | count number of bytes to download | | Long
+| *directoryName* (common) | directory of the file to be handled in component | | String
+| *downloadLinkExpiration* (common) | download link expiration time | | Long
+| *expression* (common) | expression for queryInputStream | | String
+| *fileDir* (common) | directory of file to do operations in the local system | | String
+| *fileName* (common) | name of file to be handled in component | | String
+| *fileOffset* (common) | offset position in file for different operations | | Long
+| *maxResults* (common) | maximum number of results to show at a time | | Integer
+| *maxRetryRequests* (common) | no of retries to a given request | | int
+| *openOptions* (common) | set open options for creating file | | Set
+| *path* (common) | path in azure datalake for operations | | String
+| *permission* (common) | permission string for the file | | String
+| *position* (common) | This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. | | Long
+| *recursive* (common) | recursively include all paths | | Boolean
+| *regex* (common) | regular expression for matching file names | | String
+| *retainUncommitedData* (common) | Whether or not uncommitted data is to be retained after the operation | | Boolean
+| *serviceClient* (common) | *Autowired* datalake service client for azure storage datalake | | DataLakeServiceClient
+| *sharedKeyCredential* (common) | shared key credential for azure datalake gen2 | | StorageSharedKeyCredential
+| *tenantId* (common) | tenant id for azure account | | String
+| *timeout* (common) | Timeout for operation | | Duration
+| *umask* (common) | umask permission for file | | String
+| *userPrincipalNameReturned* (common) | whether or not to use upn | | Boolean
+| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
+| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
+| *operation* (producer) | operation to be performed. There are 2 enums and the value can be one of: listFileSystem, listFiles | listFileSystem | DataLakeOperationsDefinition
+| *autowiredEnabled* (advanced) | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
+|===
+// component options: END
+
+// endpoint options: START
+The Azure storage datalake service endpoint is configured using URI syntax:
+
+----
+azure-storage-datalake:accountName/fileSystemName
+----
+
+with the following path and query parameters:
+
+=== Path Parameters (2 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accountName* | name of the azure account | | String
+| *fileSystemName* | name of filesystem to be used | | String
+|===
+
+
+=== Query Parameters (34 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accountKey* (common) | account key for authentication | | String
+| *clientId* (common) | client id for azure account | | String
+| *clientSecret* (common) | client secret for azure account | | String
+| *clientSecretCredential* (common) | client secret credential for authentication | | ClientSecretCredential
+| *close* (common) | Whether or not a file changed event raised indicates completion (true) or modification (false) | | Boolean
+| *closeStreamAfterRead* (common) | check for closing stream after read | | Boolean
+| *dataCount* (common) | count number of bytes to download | | Long
+| *dataLakeServiceClient* (common) | service client of datalake | | DataLakeServiceClient
+| *directoryName* (common) | directory of the file to be handled in component | | String
+| *downloadLinkExpiration* (common) | download link expiration time | | Long
+| *expression* (common) | expression for queryInputStream | | String
+| *fileDir* (common) | directory of file to do operations in the local system | | String
+| *fileName* (common) | name of file to be handled in component | | String
+| *fileOffset* (common) | offset position in file for different operations | | Long
+| *maxResults* (common) | maximum number of results to show at a time | | Integer
+| *maxRetryRequests* (common) | no of retries to a given request | | int
+| *openOptions* (common) | set open options for creating file | | Set
+| *path* (common) | path in azure datalake for operations | | String
+| *permission* (common) | permission string for the file | | String
+| *position* (common) | This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. | | Long
+| *recursive* (common) | recursively include all paths | | Boolean
+| *regex* (common) | regular expression for matching file names | | String
+| *retainUncommitedData* (common) | Whether or not uncommitted data is to be retained after the operation | | Boolean
+| *serviceClient* (common) | *Autowired* datalake service client for azure storage datalake | | DataLakeServiceClient
+| *sharedKeyCredential* (common) | shared key credential for azure datalake gen2 | | StorageSharedKeyCredential
+| *tenantId* (common) | tenant id for azure account | | String
+| *timeout* (common) | Timeout for operation | | Duration
+| *umask* (common) | umask permission for file | | String
+| *userPrincipalNameReturned* (common) | whether or not to use upn | | Boolean
+| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
+| *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler
+| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. There are 3 enums and the value can be one of: InOnly, InOut, InOptionalOut | | ExchangePattern
+| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
+| *operation* (producer) | operation to be performed. There are 2 enums and the value can be one of: listFileSystem, listFiles | listFileSystem | DataLakeOperationsDefinition
+|===
+// endpoint options: END
+
+=== Methods of authentication
+In order to use this component, you will have to provide at least one of the below given points for authentication purposes.
+
+- Provide `accountName` and `accessKey` for your azure account.
+- Provide StorageSharedKeyCredential instance which can be provided into `sharedKeyCredential` option.
+- Provide ClientSecretCredential instance which can be provided into `clientSecretCredential` option.
+- Provide `accountName`, `clientId`, `clientSecret` and `tenantId` for authentication with Azure Active Directory.
+- Provide a DataLakeServiceClient instance which can be provided into `serviceClient` option.
+
+=== Batch Consumer
+
+This component implements the Batch Consumer.
+
+This allows you to know how many messages exists in this batch and let the Aggregator aggregate this number of messages.
+
+== Usage
+
+=== Message Headers specified by user
+
+[width="100%",cols="10%,10%,10%,70%",options="header",]
+|===
+|Header |Variable Name |Type |Description
+|`CamelAzureStorageDataLakeListFileSystemsOptions` |`DataLakeConstants.LIST_FILESYSTEMS_OPTIONS` | `ListFileSystemsOptions` | Defines options available to configure the behavior of a call to listFileSystemsSegment on a DataLakeServiceAsyncClient object. Null may be passed.
+|`CamelAzureStorageDataLakeTimeout` |`DataLakeConstants.TIMEOUT` |`Duration` | An optional timeout value beyond which a RuntimeException will be raised.
+|`CamelAzureStorageDataLakeOperation` |`DataLakeConstants.DATALAKE_OPERATION` |`DataLakeOperationsDefinition` | Specify the producer operation to execute. Different operations allowed are shown below.
+|`CamelAzureStorageDataLakeFileSystemName` |`DataLakeConstants.FILESYSTEM_NAME` |`String` | Name of the file system in azure datalake on which operation is to be performed. Please make sure that filesystem name is all lowercase.
+|`CamelAzureStorageDataLakeDirectoryName` |`DataLakeConstants.DIRECTORY_NAME` |`String` | Name of the directory in azure datalake on which operation is to be performed.
+|`CamelAzureStorageDataLakeFileName` |`DataLakeConstants.FILE_NAME` |`String` | Name of the file in azure datalake on which operation is to be performed.
+|`CamelAzureStorageDataLakeMetadata` |`DataLakeConstants.METADATA` |`Map<String,String>` | The metadata to associate with the file.
+|`CamelAzureStorageDataLakePublicAccessType` |`DataLakeConstants.PUBLIC_ACCESS_TYPE` |`PublicAccessType` |
+|`CamelAzureStorageDataLakeRequestCondition` |`DataLakeConstants.DATALAKE_REQUEST_CONDITION` |`DataLakeRequestConditions` | This contains values which will restrict the successful operation of a variety of requests to the conditions present. These conditions are entirely optional.
+|`CamelAzureStorageDataLakeListPathOptions` |`DataLakeConstants.LIST_PATH_OPTIONS` |`ListPathOptions` | Defines options available to configure the behavior of a call to listContainersSegment on a DataLakeFileSystemClient object. Null may be passed.
+|`CamelAzureStorageDataLakePath` |`DataLakeConstants.PATH` |`String` | Path of the file to be used for upload operations.
+|`CamelAzureStorageDataLakeRecursive` |`DataLakeConstants.RECURSIVE` |`Boolean` | Specifies if the call to listContainersSegment should recursively include all paths.
+|`CamelAzureStorageDataLakeMaxResults` |`DataLakeConstants.MAX_RESULTS` |`Integer` | Specifies the maximum number of blobs to return, including all BlobPrefix elements.
+|`CamelAzureStorageDataLakeUserPrincipalNameReturned` |`DataLakeConstants.USER_PRINCIPAL_NAME_RETURNED` |`Boolean` |
+|`CamelAzureStorageDataLakeRegex` |`DataLakeConstants.REGEX` |`String` | Filter the results to return only those files with match the specified regular expression.
+|`CamelAzureStorageDataLakeFileDir` |`DataLakeConstants.FILE_DIR` |`String` | Directory in which the file is to be downloaded.
+|`CamelAzureStorageDataLakeContentMD5` |`DataLakeConstants.CONTENT_MD5` |`byte[]` | An MD5 hash of the content. The hash is used to verify the intergity of the file during transport.
+|`CamelAzureStorageDataLakeFileRange` |`DataLakeConstants.FILE_RANGE` |`FileRange` | This is a representation of a range of bytes on a file, typically used during a download operation. Passing null as a FileRange value will default to the entire range of the file.
+|`CamelAzureStorageDataLakeParallelTransferOptions` |`DataLakeConstants.PARALLEL_TRANSFER_OPTIONS` | `ParallelTransferOptions` |
+|`CamelAzureStorageDataLakeOpenOptions` |`DataLakeConstants.OPEN_OPTIONS` |`Set<OpenOption>` | Set of OpenOption used to configure how to open or create a file.
+|`CamelAzureStorageDataLakeIncrementalCopy` |`DataLakeConstants.INCREMENTAL_COPY` |`Boolean` | Flag indicating if the file was incrementally copied.
+|`CamelAzureStorageDataLakeDownloadLinkExpiration` |`DataLakeConstants.DOWNLOAD_LINK_EXPIRATION` |`Long` | Set the Expiration time of the download link.
+|`CamelAzureStorageDataLakeFileOffset` |`DataLakeConstants.FILE_OFFSET` |`Long` | The position where the data is to be appended.
+|`CamelAzureStorageDataLakeLeaseId` |`DataLakeConstants.LEASE_ID` |`String` | By setting lease id, requests will fail if the provided lease does not match the active lease on the file.
+|`CamelAzureStorageDataLakePathHttpHeaders` |`DataLakeConstants.PATH_HTTP_HEADERS` |`PathHttpHeaders` | Additional parameters for a set of operations.
+|`CamelAzureStorageDataLakeRetainCommitedData` |`DataLakeConstants.RETAIN_UNCOMMITED_DATA` |`Boolean` | Determines Whether or not uncommitted data is to be retained after the operation.
+|`CamelAzureStorageDataLakeClose` |`DataLakeConstants.CLOSE` |`Boolean` | Whether or not a file changed event raised indicates completion (true) or modification (false).
+|`CamelAzureStorageDataLakePosition` |`DataLakeConstants.POSITION` |`Long` | The length of the file after all data has been written.
+|`CamelAzureStorageDataLakeExpression` |`DataLakeConstants.EXPRESSION` |`String` | The query expression on the file.
+|`CamelAzureStorageDataLakeInputSerialization` |`DataLakeConstants.INPUT_SERIALIZATION` |`FileQuerySerialization` | Defines the input serialization for a file query request. either FileQueryJsonSerialization or FileQueryDelimitedSerialization
+|`CamelAzureStorageDataLakeOutputSerialization` |`DataLakeConstants.OUTPUT_SERIALIZATION` |`FileQuerySerialization` | Defines the output serialization for a file query request. either FileQueryJsonSerialization or FileQueryDelimitedSerialization
+|`CamelAzureStorageDataLakeErrorConsumer` |`DataLakeConstants.ERROR_CONSUMER` |`Consumer<FileQueryError>` | Sets error consumer for file query
+|`CamelAzureStorageDataLakeProgressConsumer` |`DataLakeConstants.PROGRESS_CONSUMER` |`Consumer<FileQueryProgress>` | Sets progress consumer for file query
+|`CamelAzureStorageDataLakeQueryOptions` |`DataLakeConstants.QUERY_OPTIONS` |`FileQueryOptions` | Optional parameters for File Query.
+|`CamelAzureStorageDataLakePermission` |`DataLakeConstants.PERMISSION` |`String` | Sets the permission for file.
+|`CamelAzureStorageDataLakeUmask` |`DataLakeConstants.UMASK` |`String` | Sets the umask for file.
+|===
+
+=== Message headers set by the component
+
+[width="100%",cols="10%,10%,10%,70%",options="header",]
+|===
+|Header |Variable Name |Type |Description
+|`CamelAzureStorageDataLakeMetadata` |`DataLakeConstants.METADATA` |`Map<String,String>` | The metadata to associate with the file.
+|`CamelAzureStorageDataLakeRawHttpHeaders` |`DataLakeConstants.RAW_HTTP_HEADERS` |`HttpHeaders` | Non parsed http headers that can be used by the user.
+|`CamelAzureStorageDataLakeAccessTier` |`DataLakeConstants.ACCESS_TIER` |`AccessTier` | Access tier of file.
+|`CamelAzureStorageDataLakeAccessTierChangeTime` |`DataLakeConstants.ACCESS_TIER_CHANGE_TIME` |`OffsetDateTime` | Datetime when the access tier of the blob last changed.
+|`CamelAzureStorageDataLakeArchiveStatus` |`DataLakeConstants.ARCHIVE_STATUS` |`ArchiveStatus` | Archive status of file.
+|`CamelAzureStorageDataLakeCacheControl` |`DataLakeConstants.CACHE_CONTROL` |`String` | Cache control specified for the file.
+|`CamelAzureStorageDataLakeContentDisposition` |`DataLakeConstants.CONTENT_DISPOSITION` |`String` | Content disposition specified for the file.
+|`CamelAzureStorageDataLakeContentEncoding` |`DataLakeConstants.CONTENT_ENCODING` |`String` | Content encoding specified for the file.
+|`CamelAzureStorageDataLakeContentLanguage` |`DataLakeConstants.CONTENT_LANGUAGE` |`String` | Content language specified for the file.
+|`CamelAzureStorageDataLakeContentType` |`DataLakeConstants.CONTENT_TYPE` |`String` | Content type specified for the file.
+|`CamelAzureStorageDataLakeCopyCompletionTime` |`DataLakeConstants.COPY_COMPLETION_TIME` |`OffsetDateTime` | Conclusion time of the last attempted Copy Blob operation where this file was the destination file.
+|`CamelAzureStorageDataLakeCopyId` |`DataLakeConstants.COPY_ID` |`String` | String identifier for this copy operation.
+|`CamelAzureStorageDataLakeCopyProgress` |`DataLakeConstants.COPY_PROGRESS` |`String` | Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this file was the destination file.
+|`CamelAzureStorageDataLakeCopySource` |`DataLakeConstants.COPY_SOURCE` |`String` | URL up to 2 KB in length that specifies the source file or file used in the last attempted Copy Blob operation where this file was the destination file.
+|`CamelAzureStorageDataLakeCopyStatus` |`DataLakeConstants.COPY_STATUS` |`CopyStatusType` | Status of the last copy operation performed on the file.
+|`CamelAzureStorageDataLakeCopyStatusDescription` |`DataLakeConstants.COPY_STATUS_DESCRIPTION` |`String` |
+|`CamelAzureStorageDataLakeCreationTime` |`DataLakeConstants.CREATION_TIME` |`OffsetDateTime` | Creation time of the file.
+|`CamelAzureStorageDataLakeEncryptionKeySha256` |`DataLakeConstants.ENCRYPTION_KEY_SHA_256` |`String` | The SHA-256 hash of the encryption key used to encrypt the file.
+|`CamelAzureStorageDataLakeServerEncrypted` |`DataLakeConstants.SERVER_ENCRYPTED` |`Boolean` | Flag indicating if the file's content is encrypted on the server.
+|`CamelAzureStorageDataLakeETag` |`DataLakeConstants.E_TAG` |`String` | The E Tag of the file.
+|`CamelAzureStorageDataLakeFileSize` |`DataLakeConstants.FILE_SIZE` |`Long` | Size of the file.
+|`CamelAzureStorageDataLakeLastModified` |`DataLakeConstants.LAST_MODIFIED` |`OffsetDateTime` | Datetime when the file was last modified.
+|`CamelAzureStorageDataLakeLeaseDuration` |`DataLakeConstants.LEASE_DURATION` |`LeaseDurationType` | Type of lease on the file.
+|`CamelAzureStorageDataLakeLeaseState` |`DataLakeConstants.LEASE_STATE` |`LeaseStateType` | State of the lease on the file.
+|`CamelAzureStorageDataLakeLeaseStatus` |`DataLakeConstants.LEASE_STATUS` |`LeaseStatusType` | Status of the lease on the file.
+|`CamelAzureStorageDataLakeDownloadLink` |`DataLakeConstants.DOWNLOAD_LINK` |`String` | The link that can be used to download the file from datalake.
+|===
+
+=== Automatic detection of service client
+
+The component is capable of automatically detecting the presence of a DataLakeServiceClient bean in the registry.
+Hence, if your registry has only one instance of type DataLakeServiceClient, it will be automatically used as the default client.
+You won't have to explicitly define it as an uri paramater.
+
+=== Azure Storage DataLake Producer Operations
+
+The various operations supported by Azure Storage DataLake are as given below:
+
+*Operations on Service level*
+
+For these operations, `accountName` option is required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`listFileSystem` | List all the file systems that are present in the given azure account.
+|===
+
+*Operations on File system level*
+
+For these operations, `accountName` and `fileSystemName` options are required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`createFileSystem` | Creates a new file System with the storage account
+|`deleteFileSystem` | Deletes the specified file system within the storage account
+|`listPaths` | Returns list of all the files within the given path in the given file system , with folder structure flattened
+|===
+
+*Operations on Directory level*
+
+For these operations, `accountName`, `fileSystemName` and `directoryName` options are required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`createFile` | Creates a new file in the specified directory within the fileSystem
+|`deleteDirectory` | Deletes the specified directory within the file system
+|===
+
+*Operations on file level*
+
+For these operations, `accountName`, `fileSystemName` and `fileName` options are required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`getFile` | Get the contents of a file
+|`downloadToFile` | Downloadd the entire file from the file system into a path specified by fileDir.
+|`downloadLink` | Generate download link for the specified file using Shared Access Signature (SAS).
+The expiration time to be set for the link can be specified otherwise 1 hour is taken as default.
+|`deleteFile` | Deletes the specified file.
+|`appendToFile` | Appends the data passed to the specified file in the file System. Flush command is
+required after append.
+|`flushToFile` | Flushes the data already appended to the specified file.
+|`openQueryInputStream` | Opens an inputstream based on the query passed to the endpoint. For this operation,
+you must first register the query acceleration feature with your subscription.
+|===
+
+Refer the examples section below for more details on how to use these operations
+
+=== Consumer Examples
+To consume a file from the storage datalake into a file using the file component, this can be done like this:
+[source,java]
+--
+from("azure-storage-datalake":cameltesting/filesystem?fileName=test.txt&accountKey=yourAccountKey").
+to("file:/filelocation");
+--
+
+You can also directly write to a file without using the file component. For this, you will need to specify the path in `fileDir` option, to save it to your machine.
+[source,java]
+--
+from("azure-storage-datalake":cameltesting/filesystem?fileName=test.txt&accountKey=yourAccountKey&fileDir=/test/directory").
+to("mock:results");
+--
+
+This component also supports batch consumer. So, you can consume multiple files from a file system by specifying the path
+from where you want to consume the files.
+[source,java]
+--
+from("azure-storage-datalake":cameltesting/filesystem?accountKey=yourAccountKey&fileDir=/test/directory&path=abc/test").
+to("mock:results");
+--
+
+
+=== Producer Examples
+- `listFileSystem`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ //required headers can be added here
+ exchange.getIn().setHeader(DataLakeConstants.LIST_FILESYSTEMS_OPTIONS, new ListFileSystemsOptions().setMaxResultsPerPage(10));
+ })
+ .to("azure-storage-datalake:cameltesting?operation=listFileSystem&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `createFileSystem`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.FILESYSTEM_NAME, "test1");
+ })
+ .to("azure-storage-datalake:cameltesting?operation=createFileSystem&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `deleteFileSystem`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.FILESYSTEM_NAME, "test1");
+ })
+ .to("azure-storage-datalake:cameltesting?operation=deleteFileSystem&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `listPaths`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.LIST_PATH_OPTIONS, new ListPathsOptions().setPath("/main"));
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=listPaths&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `getFile`
+
+This can be done in two ways, We can either set an outputstream in the exchange body
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ // set an outputstream where the file data can should be written
+ exchange.getIn().setBody(outputStream);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=getFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+Or if body is not set, the operation will give an inputstream, given that you have already registered for query acceleration
+in azure portal.
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=getFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .process(exchange -> {
+ InputStream inputStream = exchange.getMessage().getBody(InputStream.class);
+ System.out.Println(IOUtils.toString(inputStream, StandardCharcets.UTF_8.name()));
+ })
+ .to("mock:results");
+--
+
+- `deleteFile`
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=deleteFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `downloadToFile`
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=downloadToFile&fileName=test.txt&fileDir=/test/mydir&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `downloadLink`
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=downloadLink&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .process(exchange -> {
+ String link = exchange.getMessage().getBody(String.class);
+ System.out.println(link);
+ })
+ .to("mock:results");
+--
+
+- `appendToFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ final String data = "test data";
+ final InputStream inputStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
+ exchange.getIn().setBody(inputStream);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=appendToFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `flushToFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.POSITION, 0);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=flushToFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `openQueryInputStream`
+
+For this operation, you should have already registered for query acceleration on the azure portal
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.QUERY_OPTIONS, new FileQueryOptions("SELECT * from BlobStorage"));
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=openQueryInputStream&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `upload`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ final String data = "test data";
+ final InputStream inputStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
+ exchange.getIn().setBody(inputStream);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=upload&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `uploadFromFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.PATH, "test/file.txt");
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=uploadFromFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `createFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.DIRECTORY_NAME, "test/file/");
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=createFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `deleteDirectory`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.DIRECTORY_NAME, "test/file/");
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=deleteDirectory&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+=== Testing
+Please run all the unit tests and integration test while making changes to the component as changes or version upgrades can break things.
+For running all the test in the component, you will need to obtain azure accountName and accessKey. After obtaining the same, you
+can run the full test, on this component directory, by running the following maven command
+
+----
+mvn test -Dazure.storage.account.name=accountName -Dazure.storage.account.key=accountKey
+----
+
diff --git a/components/camel-azure-storage-datalake/pom.xml b/components/camel-azure-storage-datalake/pom.xml
new file mode 100644
index 0000000..b4ecd6b
--- /dev/null
+++ b/components/camel-azure-storage-datalake/pom.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>components</artifactId>
+ <version>3.8.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-azure-storage-datalake</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Camel :: Azure Datalake Gen2</name>
+ <description>Camel Azure Datalake Gen2 Component</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-support</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.azure</groupId>
+ <artifactId>azure-storage-file-datalake</artifactId>
+ <version>${azure-storage-datalake-java-sdk12-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.azure</groupId>
+ <artifactId>azure-identity</artifactId>
+ <version>${azure-identity-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>${commons-lang3-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.awaitility</groupId>
+ <artifactId>awaitility</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-infra-common</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-infra-azure-common</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-infra-azure-storage-datalake</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
+
diff --git a/components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeComponentConfigurer.java b/components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeComponentConfigurer.java
new file mode 100644
index 0000000..498cba2
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeComponentConfigurer.java
@@ -0,0 +1,229 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.azure.storage.datalake;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class DataLakeComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ private org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration getOrCreateConfiguration(DataLakeComponent target) {
+ if (target.getConfiguration() == null) {
+ target.setConfiguration(new org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration());
+ }
+ return target.getConfiguration();
+ }
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ DataLakeComponent target = (DataLakeComponent) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accountkey":
+ case "accountKey": getOrCreateConfiguration(target).setAccountKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "autowiredenabled":
+ case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
+ case "bridgeerrorhandler":
+ case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
+ case "clientid":
+ case "clientId": getOrCreateConfiguration(target).setClientId(property(camelContext, java.lang.String.class, value)); return true;
+ case "clientsecret":
+ case "clientSecret": getOrCreateConfiguration(target).setClientSecret(property(camelContext, java.lang.String.class, value)); return true;
+ case "clientsecretcredential":
+ case "clientSecretCredential": getOrCreateConfiguration(target).setClientSecretCredential(property(camelContext, com.azure.identity.ClientSecretCredential.class, value)); return true;
+ case "close": getOrCreateConfiguration(target).setClose(property(camelContext, java.lang.Boolean.class, value)); return true;
+ case "closestreamafterread":
+ case "closeStreamAfterRead": getOrCreateConfiguration(target).setCloseStreamAfterRead(property(camelContext, java.lang.Boolean.class, value)); return true;
+ case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration.class, value)); return true;
+ case "datacount":
+ case "dataCount": getOrCreateConfiguration(target).setDataCount(property(camelContext, java.lang.Long.class, value)); return true;
+ case "directoryname":
+ case "directoryName": getOrCreateConfiguration(target).setDirectoryName(property(camelContext, java.lang.String.class, value)); return true;
+ case "downloadlinkexpiration":
+ case "downloadLinkExpiration": getOrCreateConfiguration(target).setDownloadLinkExpiration(property(camelContext, java.lang.Long.class, value)); return true;
+ case "expression": getOrCreateConfiguration(target).setExpression(property(camelContext, java.lang.String.class, value)); return true;
+ case "filedir":
+ case "fileDir": getOrCreateConfiguration(target).setFileDir(property(camelContext, java.lang.String.class, value)); return true;
+ case "filename":
+ case "fileName": getOrCreateConfiguration(target).setFileName(property(camelContext, java.lang.String.class, value)); return true;
+ case "fileoffset":
+ case "fileOffset": getOrCreateConfiguration(target).setFileOffset(property(camelContext, java.lang.Long.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "maxresults":
+ case "maxResults": getOrCreateConfiguration(target).setMaxResults(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "maxretryrequests":
+ case "maxRetryRequests": getOrCreateConfiguration(target).setMaxRetryRequests(property(camelContext, int.class, value)); return true;
+ case "openoptions":
+ case "openOptions": getOrCreateConfiguration(target).setOpenOptions(property(camelContext, java.util.Set.class, value)); return true;
+ case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition.class, value)); return true;
+ case "path": getOrCreateConfiguration(target).setPath(property(camelContext, java.lang.String.class, value)); return true;
+ case "permission": getOrCreateConfiguration(target).setPermission(property(camelContext, java.lang.String.class, value)); return true;
+ case "position": getOrCreateConfiguration(target).setPosition(property(camelContext, java.lang.Long.class, value)); return true;
+ case "recursive": getOrCreateConfiguration(target).setRecursive(property(camelContext, java.lang.Boolean.class, value)); return true;
+ case "regex": getOrCreateConfiguration(target).setRegex(property(camelContext, java.lang.String.class, value)); return true;
+ case "retainuncommiteddata":
+ case "retainUncommitedData": getOrCreateConfiguration(target).setRetainUncommitedData(property(camelContext, java.lang.Boolean.class, value)); return true;
+ case "serviceclient":
+ case "serviceClient": getOrCreateConfiguration(target).setServiceClient(property(camelContext, com.azure.storage.file.datalake.DataLakeServiceClient.class, value)); return true;
+ case "sharedkeycredential":
+ case "sharedKeyCredential": getOrCreateConfiguration(target).setSharedKeyCredential(property(camelContext, com.azure.storage.common.StorageSharedKeyCredential.class, value)); return true;
+ case "tenantid":
+ case "tenantId": getOrCreateConfiguration(target).setTenantId(property(camelContext, java.lang.String.class, value)); return true;
+ case "timeout": getOrCreateConfiguration(target).setTimeout(property(camelContext, java.time.Duration.class, value)); return true;
+ case "umask": getOrCreateConfiguration(target).setUmask(property(camelContext, java.lang.String.class, value)); return true;
+ case "userprincipalnamereturned":
+ case "userPrincipalNameReturned": getOrCreateConfiguration(target).setUserPrincipalNameReturned(property(camelContext, java.lang.Boolean.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public String[] getAutowiredNames() {
+ return new String[]{"serviceClient"};
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accountkey":
+ case "accountKey": return java.lang.String.class;
+ case "autowiredenabled":
+ case "autowiredEnabled": return boolean.class;
+ case "bridgeerrorhandler":
+ case "bridgeErrorHandler": return boolean.class;
+ case "clientid":
+ case "clientId": return java.lang.String.class;
+ case "clientsecret":
+ case "clientSecret": return java.lang.String.class;
+ case "clientsecretcredential":
+ case "clientSecretCredential": return com.azure.identity.ClientSecretCredential.class;
+ case "close": return java.lang.Boolean.class;
+ case "closestreamafterread":
+ case "closeStreamAfterRead": return java.lang.Boolean.class;
+ case "configuration": return org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration.class;
+ case "datacount":
+ case "dataCount": return java.lang.Long.class;
+ case "directoryname":
+ case "directoryName": return java.lang.String.class;
+ case "downloadlinkexpiration":
+ case "downloadLinkExpiration": return java.lang.Long.class;
+ case "expression": return java.lang.String.class;
+ case "filedir":
+ case "fileDir": return java.lang.String.class;
+ case "filename":
+ case "fileName": return java.lang.String.class;
+ case "fileoffset":
+ case "fileOffset": return java.lang.Long.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "maxresults":
+ case "maxResults": return java.lang.Integer.class;
+ case "maxretryrequests":
+ case "maxRetryRequests": return int.class;
+ case "openoptions":
+ case "openOptions": return java.util.Set.class;
+ case "operation": return org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition.class;
+ case "path": return java.lang.String.class;
+ case "permission": return java.lang.String.class;
+ case "position": return java.lang.Long.class;
+ case "recursive": return java.lang.Boolean.class;
+ case "regex": return java.lang.String.class;
+ case "retainuncommiteddata":
+ case "retainUncommitedData": return java.lang.Boolean.class;
+ case "serviceclient":
+ case "serviceClient": return com.azure.storage.file.datalake.DataLakeServiceClient.class;
+ case "sharedkeycredential":
+ case "sharedKeyCredential": return com.azure.storage.common.StorageSharedKeyCredential.class;
+ case "tenantid":
+ case "tenantId": return java.lang.String.class;
+ case "timeout": return java.time.Duration.class;
+ case "umask": return java.lang.String.class;
+ case "userprincipalnamereturned":
+ case "userPrincipalNameReturned": return java.lang.Boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ DataLakeComponent target = (DataLakeComponent) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accountkey":
+ case "accountKey": return getOrCreateConfiguration(target).getAccountKey();
+ case "autowiredenabled":
+ case "autowiredEnabled": return target.isAutowiredEnabled();
+ case "bridgeerrorhandler":
+ case "bridgeErrorHandler": return target.isBridgeErrorHandler();
+ case "clientid":
+ case "clientId": return getOrCreateConfiguration(target).getClientId();
+ case "clientsecret":
+ case "clientSecret": return getOrCreateConfiguration(target).getClientSecret();
+ case "clientsecretcredential":
+ case "clientSecretCredential": return getOrCreateConfiguration(target).getClientSecretCredential();
+ case "close": return getOrCreateConfiguration(target).getClose();
+ case "closestreamafterread":
+ case "closeStreamAfterRead": return getOrCreateConfiguration(target).getCloseStreamAfterRead();
+ case "configuration": return target.getConfiguration();
+ case "datacount":
+ case "dataCount": return getOrCreateConfiguration(target).getDataCount();
+ case "directoryname":
+ case "directoryName": return getOrCreateConfiguration(target).getDirectoryName();
+ case "downloadlinkexpiration":
+ case "downloadLinkExpiration": return getOrCreateConfiguration(target).getDownloadLinkExpiration();
+ case "expression": return getOrCreateConfiguration(target).getExpression();
+ case "filedir":
+ case "fileDir": return getOrCreateConfiguration(target).getFileDir();
+ case "filename":
+ case "fileName": return getOrCreateConfiguration(target).getFileName();
+ case "fileoffset":
+ case "fileOffset": return getOrCreateConfiguration(target).getFileOffset();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "maxresults":
+ case "maxResults": return getOrCreateConfiguration(target).getMaxResults();
+ case "maxretryrequests":
+ case "maxRetryRequests": return getOrCreateConfiguration(target).getMaxRetryRequests();
+ case "openoptions":
+ case "openOptions": return getOrCreateConfiguration(target).getOpenOptions();
+ case "operation": return getOrCreateConfiguration(target).getOperation();
+ case "path": return getOrCreateConfiguration(target).getPath();
+ case "permission": return getOrCreateConfiguration(target).getPermission();
+ case "position": return getOrCreateConfiguration(target).getPosition();
+ case "recursive": return getOrCreateConfiguration(target).getRecursive();
+ case "regex": return getOrCreateConfiguration(target).getRegex();
+ case "retainuncommiteddata":
+ case "retainUncommitedData": return getOrCreateConfiguration(target).getRetainUncommitedData();
+ case "serviceclient":
+ case "serviceClient": return getOrCreateConfiguration(target).getServiceClient();
+ case "sharedkeycredential":
+ case "sharedKeyCredential": return getOrCreateConfiguration(target).getSharedKeyCredential();
+ case "tenantid":
+ case "tenantId": return getOrCreateConfiguration(target).getTenantId();
+ case "timeout": return getOrCreateConfiguration(target).getTimeout();
+ case "umask": return getOrCreateConfiguration(target).getUmask();
+ case "userprincipalnamereturned":
+ case "userPrincipalNameReturned": return getOrCreateConfiguration(target).getUserPrincipalNameReturned();
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "openoptions":
+ case "openOptions": return java.nio.file.OpenOption.class;
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpointConfigurer.java b/components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpointConfigurer.java
new file mode 100644
index 0000000..62a39fe
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpointConfigurer.java
@@ -0,0 +1,231 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.azure.storage.datalake;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class DataLakeEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ DataLakeEndpoint target = (DataLakeEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accountkey":
+ case "accountKey": target.getConfiguration().setAccountKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "bridgeerrorhandler":
+ case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
+ case "clientid":
+ case "clientId": target.getConfiguration().setClientId(property(camelContext, java.lang.String.class, value)); return true;
+ case "clientsecret":
+ case "clientSecret": target.getConfiguration().setClientSecret(property(camelContext, java.lang.String.class, value)); return true;
+ case "clientsecretcredential":
+ case "clientSecretCredential": target.getConfiguration().setClientSecretCredential(property(camelContext, com.azure.identity.ClientSecretCredential.class, value)); return true;
+ case "close": target.getConfiguration().setClose(property(camelContext, java.lang.Boolean.class, value)); return true;
+ case "closestreamafterread":
+ case "closeStreamAfterRead": target.getConfiguration().setCloseStreamAfterRead(property(camelContext, java.lang.Boolean.class, value)); return true;
+ case "datacount":
+ case "dataCount": target.getConfiguration().setDataCount(property(camelContext, java.lang.Long.class, value)); return true;
+ case "datalakeserviceclient":
+ case "dataLakeServiceClient": target.setDataLakeServiceClient(property(camelContext, com.azure.storage.file.datalake.DataLakeServiceClient.class, value)); return true;
+ case "directoryname":
+ case "directoryName": target.getConfiguration().setDirectoryName(property(camelContext, java.lang.String.class, value)); return true;
+ case "downloadlinkexpiration":
+ case "downloadLinkExpiration": target.getConfiguration().setDownloadLinkExpiration(property(camelContext, java.lang.Long.class, value)); return true;
+ case "exceptionhandler":
+ case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
+ case "exchangepattern":
+ case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
+ case "expression": target.getConfiguration().setExpression(property(camelContext, java.lang.String.class, value)); return true;
+ case "filedir":
+ case "fileDir": target.getConfiguration().setFileDir(property(camelContext, java.lang.String.class, value)); return true;
+ case "filename":
+ case "fileName": target.getConfiguration().setFileName(property(camelContext, java.lang.String.class, value)); return true;
+ case "fileoffset":
+ case "fileOffset": target.getConfiguration().setFileOffset(property(camelContext, java.lang.Long.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "maxresults":
+ case "maxResults": target.getConfiguration().setMaxResults(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "maxretryrequests":
+ case "maxRetryRequests": target.getConfiguration().setMaxRetryRequests(property(camelContext, int.class, value)); return true;
+ case "openoptions":
+ case "openOptions": target.getConfiguration().setOpenOptions(property(camelContext, java.util.Set.class, value)); return true;
+ case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition.class, value)); return true;
+ case "path": target.getConfiguration().setPath(property(camelContext, java.lang.String.class, value)); return true;
+ case "permission": target.getConfiguration().setPermission(property(camelContext, java.lang.String.class, value)); return true;
+ case "position": target.getConfiguration().setPosition(property(camelContext, java.lang.Long.class, value)); return true;
+ case "recursive": target.getConfiguration().setRecursive(property(camelContext, java.lang.Boolean.class, value)); return true;
+ case "regex": target.getConfiguration().setRegex(property(camelContext, java.lang.String.class, value)); return true;
+ case "retainuncommiteddata":
+ case "retainUncommitedData": target.getConfiguration().setRetainUncommitedData(property(camelContext, java.lang.Boolean.class, value)); return true;
+ case "serviceclient":
+ case "serviceClient": target.getConfiguration().setServiceClient(property(camelContext, com.azure.storage.file.datalake.DataLakeServiceClient.class, value)); return true;
+ case "sharedkeycredential":
+ case "sharedKeyCredential": target.getConfiguration().setSharedKeyCredential(property(camelContext, com.azure.storage.common.StorageSharedKeyCredential.class, value)); return true;
+ case "tenantid":
+ case "tenantId": target.getConfiguration().setTenantId(property(camelContext, java.lang.String.class, value)); return true;
+ case "timeout": target.getConfiguration().setTimeout(property(camelContext, java.time.Duration.class, value)); return true;
+ case "umask": target.getConfiguration().setUmask(property(camelContext, java.lang.String.class, value)); return true;
+ case "userprincipalnamereturned":
+ case "userPrincipalNameReturned": target.getConfiguration().setUserPrincipalNameReturned(property(camelContext, java.lang.Boolean.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public String[] getAutowiredNames() {
+ return new String[]{"serviceClient"};
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accountkey":
+ case "accountKey": return java.lang.String.class;
+ case "bridgeerrorhandler":
+ case "bridgeErrorHandler": return boolean.class;
+ case "clientid":
+ case "clientId": return java.lang.String.class;
+ case "clientsecret":
+ case "clientSecret": return java.lang.String.class;
+ case "clientsecretcredential":
+ case "clientSecretCredential": return com.azure.identity.ClientSecretCredential.class;
+ case "close": return java.lang.Boolean.class;
+ case "closestreamafterread":
+ case "closeStreamAfterRead": return java.lang.Boolean.class;
+ case "datacount":
+ case "dataCount": return java.lang.Long.class;
+ case "datalakeserviceclient":
+ case "dataLakeServiceClient": return com.azure.storage.file.datalake.DataLakeServiceClient.class;
+ case "directoryname":
+ case "directoryName": return java.lang.String.class;
+ case "downloadlinkexpiration":
+ case "downloadLinkExpiration": return java.lang.Long.class;
+ case "exceptionhandler":
+ case "exceptionHandler": return org.apache.camel.spi.ExceptionHandler.class;
+ case "exchangepattern":
+ case "exchangePattern": return org.apache.camel.ExchangePattern.class;
+ case "expression": return java.lang.String.class;
+ case "filedir":
+ case "fileDir": return java.lang.String.class;
+ case "filename":
+ case "fileName": return java.lang.String.class;
+ case "fileoffset":
+ case "fileOffset": return java.lang.Long.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "maxresults":
+ case "maxResults": return java.lang.Integer.class;
+ case "maxretryrequests":
+ case "maxRetryRequests": return int.class;
+ case "openoptions":
+ case "openOptions": return java.util.Set.class;
+ case "operation": return org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition.class;
+ case "path": return java.lang.String.class;
+ case "permission": return java.lang.String.class;
+ case "position": return java.lang.Long.class;
+ case "recursive": return java.lang.Boolean.class;
+ case "regex": return java.lang.String.class;
+ case "retainuncommiteddata":
+ case "retainUncommitedData": return java.lang.Boolean.class;
+ case "serviceclient":
+ case "serviceClient": return com.azure.storage.file.datalake.DataLakeServiceClient.class;
+ case "sharedkeycredential":
+ case "sharedKeyCredential": return com.azure.storage.common.StorageSharedKeyCredential.class;
+ case "tenantid":
+ case "tenantId": return java.lang.String.class;
+ case "timeout": return java.time.Duration.class;
+ case "umask": return java.lang.String.class;
+ case "userprincipalnamereturned":
+ case "userPrincipalNameReturned": return java.lang.Boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ DataLakeEndpoint target = (DataLakeEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accountkey":
+ case "accountKey": return target.getConfiguration().getAccountKey();
+ case "bridgeerrorhandler":
+ case "bridgeErrorHandler": return target.isBridgeErrorHandler();
+ case "clientid":
+ case "clientId": return target.getConfiguration().getClientId();
+ case "clientsecret":
+ case "clientSecret": return target.getConfiguration().getClientSecret();
+ case "clientsecretcredential":
+ case "clientSecretCredential": return target.getConfiguration().getClientSecretCredential();
+ case "close": return target.getConfiguration().getClose();
+ case "closestreamafterread":
+ case "closeStreamAfterRead": return target.getConfiguration().getCloseStreamAfterRead();
+ case "datacount":
+ case "dataCount": return target.getConfiguration().getDataCount();
+ case "datalakeserviceclient":
+ case "dataLakeServiceClient": return target.getDataLakeServiceClient();
+ case "directoryname":
+ case "directoryName": return target.getConfiguration().getDirectoryName();
+ case "downloadlinkexpiration":
+ case "downloadLinkExpiration": return target.getConfiguration().getDownloadLinkExpiration();
+ case "exceptionhandler":
+ case "exceptionHandler": return target.getExceptionHandler();
+ case "exchangepattern":
+ case "exchangePattern": return target.getExchangePattern();
+ case "expression": return target.getConfiguration().getExpression();
+ case "filedir":
+ case "fileDir": return target.getConfiguration().getFileDir();
+ case "filename":
+ case "fileName": return target.getConfiguration().getFileName();
+ case "fileoffset":
+ case "fileOffset": return target.getConfiguration().getFileOffset();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "maxresults":
+ case "maxResults": return target.getConfiguration().getMaxResults();
+ case "maxretryrequests":
+ case "maxRetryRequests": return target.getConfiguration().getMaxRetryRequests();
+ case "openoptions":
+ case "openOptions": return target.getConfiguration().getOpenOptions();
+ case "operation": return target.getConfiguration().getOperation();
+ case "path": return target.getConfiguration().getPath();
+ case "permission": return target.getConfiguration().getPermission();
+ case "position": return target.getConfiguration().getPosition();
+ case "recursive": return target.getConfiguration().getRecursive();
+ case "regex": return target.getConfiguration().getRegex();
+ case "retainuncommiteddata":
+ case "retainUncommitedData": return target.getConfiguration().getRetainUncommitedData();
+ case "serviceclient":
+ case "serviceClient": return target.getConfiguration().getServiceClient();
+ case "sharedkeycredential":
+ case "sharedKeyCredential": return target.getConfiguration().getSharedKeyCredential();
+ case "tenantid":
+ case "tenantId": return target.getConfiguration().getTenantId();
+ case "timeout": return target.getConfiguration().getTimeout();
+ case "umask": return target.getConfiguration().getUmask();
+ case "userprincipalnamereturned":
+ case "userPrincipalNameReturned": return target.getConfiguration().getUserPrincipalNameReturned();
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "openoptions":
+ case "openOptions": return java.nio.file.OpenOption.class;
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpointUriFactory.java b/components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpointUriFactory.java
new file mode 100644
index 0000000..bb9dd23
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/generated/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpointUriFactory.java
@@ -0,0 +1,97 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.azure.storage.datalake;
+
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.spi.EndpointUriFactory;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+public class DataLakeEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
+
+ private static final String BASE = ":accountName/fileSystemName";
+
+ private static final Set<String> PROPERTY_NAMES;
+ private static final Set<String> SECRET_PROPERTY_NAMES;
+ static {
+ Set<String> props = new HashSet<>(36);
+ props.add("fileName");
+ props.add("umask");
+ props.add("accountName");
+ props.add("sharedKeyCredential");
+ props.add("recursive");
+ props.add("timeout");
+ props.add("dataCount");
+ props.add("path");
+ props.add("maxRetryRequests");
+ props.add("bridgeErrorHandler");
+ props.add("clientSecretCredential");
+ props.add("maxResults");
+ props.add("closeStreamAfterRead");
+ props.add("clientSecret");
+ props.add("close");
+ props.add("fileSystemName");
+ props.add("directoryName");
+ props.add("retainUncommitedData");
+ props.add("clientId");
+ props.add("expression");
+ props.add("downloadLinkExpiration");
+ props.add("exchangePattern");
+ props.add("fileOffset");
+ props.add("permission");
+ props.add("dataLakeServiceClient");
+ props.add("accountKey");
+ props.add("regex");
+ props.add("lazyStartProducer");
+ props.add("serviceClient");
+ props.add("fileDir");
+ props.add("tenantId");
+ props.add("position");
+ props.add("exceptionHandler");
+ props.add("operation");
+ props.add("userPrincipalNameReturned");
+ props.add("openOptions");
+ PROPERTY_NAMES = Collections.unmodifiableSet(props);
+ SECRET_PROPERTY_NAMES = Collections.emptySet();
+ }
+
+ @Override
+ public boolean isEnabled(String scheme) {
+ return "azure-storage-datalake".equals(scheme);
+ }
+
+ @Override
+ public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException {
+ String syntax = scheme + BASE;
+ String uri = syntax;
+
+ Map<String, Object> copy = new HashMap<>(properties);
+
+ uri = buildPathParameter(syntax, uri, "accountName", null, false, copy);
+ uri = buildPathParameter(syntax, uri, "fileSystemName", null, false, copy);
+ uri = buildQueryParameters(uri, copy, encode);
+ return uri;
+ }
+
+ @Override
+ public Set<String> propertyNames() {
+ return PROPERTY_NAMES;
+ }
+
+ @Override
+ public Set<String> secretPropertyNames() {
+ return SECRET_PROPERTY_NAMES;
+ }
+
+ @Override
+ public boolean isLenientProperties() {
+ return false;
+ }
+}
+
diff --git a/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/component.properties
new file mode 100644
index 0000000..10b8e59
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+components=azure-storage-datalake
+groupId=org.apache.camel
+artifactId=camel-azure-storage-datalake
+version=3.8.0-SNAPSHOT
+projectName=Camel :: Azure Datalake Gen2
+projectDescription=Camel Azure Datalake Gen2 Component
diff --git a/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/component/azure-storage-datalake b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/component/azure-storage-datalake
new file mode 100644
index 0000000..ecfcb7b
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/component/azure-storage-datalake
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.azure.storage.datalake.DataLakeComponent
diff --git a/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/configurer/azure-storage-datalake-component b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/configurer/azure-storage-datalake-component
new file mode 100644
index 0000000..3a3e20c
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/configurer/azure-storage-datalake-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.azure.storage.datalake.DataLakeComponentConfigurer
diff --git a/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/configurer/azure-storage-datalake-endpoint b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/configurer/azure-storage-datalake-endpoint
new file mode 100644
index 0000000..fedd283
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/configurer/azure-storage-datalake-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.azure.storage.datalake.DataLakeEndpointConfigurer
diff --git a/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/urifactory/azure-storage-datalake-endpoint b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/urifactory/azure-storage-datalake-endpoint
new file mode 100644
index 0000000..e0ba9ba5
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/generated/resources/META-INF/services/org/apache/camel/urifactory/azure-storage-datalake-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.azure.storage.datalake.DataLakeEndpointUriFactory
diff --git a/components/camel-azure-storage-datalake/src/generated/resources/org/apache/camel/component/azure/storage/datalake/azure-storage-datalake.json b/components/camel-azure-storage-datalake/src/generated/resources/org/apache/camel/component/azure/storage/datalake/azure-storage-datalake.json
new file mode 100644
index 0000000..344bc7b
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/generated/resources/org/apache/camel/component/azure/storage/datalake/azure-storage-datalake.json
@@ -0,0 +1,97 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "azure-storage-datalake",
+ "title": "Azure storage datalake service",
+ "description": "Camel Azure Datalake Gen2 Component",
+ "deprecated": false,
+ "firstVersion": "3.8.0",
+ "label": "cloud,file",
+ "javaType": "org.apache.camel.component.azure.storage.datalake.DataLakeComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-azure-storage-datalake",
+ "version": "3.8.0-SNAPSHOT",
+ "scheme": "azure-storage-datalake",
+ "extendsScheme": "",
+ "syntax": "azure-storage-datalake:accountName\/fileSystemName",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": false,
+ "lenientProperties": false
+ },
+ "componentProperties": {
+ "accountKey": { "kind": "property", "displayName": "Account Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "account key for authentication" },
+ "clientId": { "kind": "property", "displayName": "Client Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client id for azure account" },
+ "clientSecret": { "kind": "property", "displayName": "Client Secret", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client secret for azure account" },
+ "clientSecretCredential": { "kind": "property", "displayName": "Client Secret Credential", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.identity.ClientSecretCredential", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client secret credential for authentication" },
+ "close": { "kind": "property", "displayName": "Close", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Whether or not a file changed event raised indicates completion (true) or modification (false)" },
+ "closeStreamAfterRead": { "kind": "property", "displayName": "Close Stream After Read", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "check for closing stream after read" },
+ "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "configuration object for datalake" },
+ "dataCount": { "kind": "property", "displayName": "Data Count", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "count number of bytes to download" },
+ "directoryName": { "kind": "property", "displayName": "Directory Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "directory of the file to be handled in component" },
+ "downloadLinkExpiration": { "kind": "property", "displayName": "Download Link Expiration", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "download link expiration time" },
+ "expression": { "kind": "property", "displayName": "Expression", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "expression for queryInputStream" },
+ "fileDir": { "kind": "property", "displayName": "File Dir", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "directory of file to do operations in the local system" },
+ "fileName": { "kind": "property", "displayName": "File Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "name of file to be handled in component" },
+ "fileOffset": { "kind": "property", "displayName": "File Offset", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "offset position in file for different operations" },
+ "maxResults": { "kind": "property", "displayName": "Max Results", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "maximum number of results to show at a time" },
+ "maxRetryRequests": { "kind": "property", "displayName": "Max Retry Requests", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "no of retries to a given request" },
+ "openOptions": { "kind": "property", "displayName": "Open Options", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Set<java.nio.file.OpenOption>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "set open options for creating file" },
+ "path": { "kind": "property", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "path in azure datalake for operations" },
+ "permission": { "kind": "property", "displayName": "Permission", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "permission string for the file" },
+ "position": { "kind": "property", "displayName": "Position", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file." },
+ "recursive": { "kind": "property", "displayName": "Recursive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "recursively include all paths" },
+ "regex": { "kind": "property", "displayName": "Regex", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "regular expression for matching file names" },
+ "retainUncommitedData": { "kind": "property", "displayName": "Retain Uncommited Data", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Whether or not uncommitted data is to be retained after the operation" },
+ "serviceClient": { "kind": "property", "displayName": "Service Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.file.datalake.DataLakeServiceClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "datalake service client for azure storage data [...]
+ "sharedKeyCredential": { "kind": "property", "displayName": "Shared Key Credential", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.common.StorageSharedKeyCredential", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "shared key credential for azure datalake gen2" },
+ "tenantId": { "kind": "property", "displayName": "Tenant Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "tenant id for azure account" },
+ "timeout": { "kind": "property", "displayName": "Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Timeout for operation" },
+ "umask": { "kind": "property", "displayName": "Umask", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "umask permission for file" },
+ "userPrincipalNameReturned": { "kind": "property", "displayName": "User Principal Name Returned", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "whether or not to use upn" },
+ "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a me [...]
+ "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
+ "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition", "enum": [ "listFileSystem", "listFiles" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "listFileSystem", "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField" [...]
+ "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
+ },
+ "properties": {
+ "accountName": { "kind": "path", "displayName": "Account Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "name of the azure account" },
+ "fileSystemName": { "kind": "path", "displayName": "File System Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "name of filesystem to be used" },
+ "accountKey": { "kind": "parameter", "displayName": "Account Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "account key for authentication" },
+ "clientId": { "kind": "parameter", "displayName": "Client Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client id for azure account" },
+ "clientSecret": { "kind": "parameter", "displayName": "Client Secret", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client secret for azure account" },
+ "clientSecretCredential": { "kind": "parameter", "displayName": "Client Secret Credential", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.identity.ClientSecretCredential", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "client secret credential for authentication" },
+ "close": { "kind": "parameter", "displayName": "Close", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Whether or not a file changed event raised indicates completion (true) or modification (false)" },
+ "closeStreamAfterRead": { "kind": "parameter", "displayName": "Close Stream After Read", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "check for closing stream after read" },
+ "dataCount": { "kind": "parameter", "displayName": "Data Count", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "count number of bytes to download" },
+ "dataLakeServiceClient": { "kind": "parameter", "displayName": "Data Lake Service Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.file.datalake.DataLakeServiceClient", "deprecated": false, "autowired": false, "secret": false, "description": "service client of datalake" },
+ "directoryName": { "kind": "parameter", "displayName": "Directory Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "directory of the file to be handled in component" },
+ "downloadLinkExpiration": { "kind": "parameter", "displayName": "Download Link Expiration", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "download link expiration time" },
+ "expression": { "kind": "parameter", "displayName": "Expression", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "expression for queryInputStream" },
+ "fileDir": { "kind": "parameter", "displayName": "File Dir", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "directory of file to do operations in the local system" },
+ "fileName": { "kind": "parameter", "displayName": "File Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "name of file to be handled in component" },
+ "fileOffset": { "kind": "parameter", "displayName": "File Offset", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "offset position in file for different operations" },
+ "maxResults": { "kind": "parameter", "displayName": "Max Results", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "maximum number of results to show at a time" },
+ "maxRetryRequests": { "kind": "parameter", "displayName": "Max Retry Requests", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "no of retries to a given request" },
+ "openOptions": { "kind": "parameter", "displayName": "Open Options", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Set<java.nio.file.OpenOption>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "set open options for creating file" },
+ "path": { "kind": "parameter", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "path in azure datalake for operations" },
+ "permission": { "kind": "parameter", "displayName": "Permission", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "permission string for the file" },
+ "position": { "kind": "parameter", "displayName": "Position", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file." },
+ "recursive": { "kind": "parameter", "displayName": "Recursive", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "recursively include all paths" },
+ "regex": { "kind": "parameter", "displayName": "Regex", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "regular expression for matching file names" },
+ "retainUncommitedData": { "kind": "parameter", "displayName": "Retain Uncommited Data", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Whether or not uncommitted data is to be retained after the operation" },
+ "serviceClient": { "kind": "parameter", "displayName": "Service Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.file.datalake.DataLakeServiceClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "datalake service client for azure storage dat [...]
+ "sharedKeyCredential": { "kind": "parameter", "displayName": "Shared Key Credential", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.storage.common.StorageSharedKeyCredential", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "shared key credential for azure datalake gen2" },
+ "tenantId": { "kind": "parameter", "displayName": "Tenant Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "tenant id for azure account" },
+ "timeout": { "kind": "parameter", "displayName": "Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "Timeout for operation" },
+ "umask": { "kind": "parameter", "displayName": "Umask", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "umask permission for file" },
+ "userPrincipalNameReturned": { "kind": "parameter", "displayName": "User Principal Name Returned", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField": "configuration", "description": "whether or not to use upn" },
+ "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
+ "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the con [...]
+ "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
+ "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during sta [...]
+ "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition", "enum": [ "listFileSystem", "listFiles" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "listFileSystem", "configurationClass": "org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration", "configurationField [...]
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc b/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
new file mode 100644
index 0000000..e6fcd5e
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
@@ -0,0 +1,546 @@
+[[azure-storage-datalake-component]]
+= Azure storage datalake service Component
+:docTitle: Azure storage datalake service
+:artifactId: camel-azure-storage-datalake
+:description: Camel Azure Datalake Gen2 Component
+:since: 3.8
+:supportLevel: Preview
+:component-header: Both producer and consumer are supported
+include::{cq-version}@camel-quarkus:ROOT:partial$reference/components/azure-storage-datalake.adoc[opts=optional]
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The Azure storage datalake component is used for storing and retrieving file from Azure Storage Datalake Sevice using the *Azure APIs v12*.
+
+Prerequisites
+
+You need to have a valid Azure account with Azure storage set up. More information can be found at https://docs.microsoft.com/azure/[Azure Documentation Portal].
+
+Maven users will need to add the following dependency to their `pom.xml` for this component.
+
+[source,xml]
+---------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-azure-storage-datalake</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your camel core version -->
+</dependency>
+---------------
+
+== Uri Format
+
+[source,text]
+--
+azure-storage-datalake:accountName[/fileSystemName][?options]
+--
+
+In case of a consumer, both accountName and fileSystemName are required. In case of the producer, it depends on the operation
+being requested.
+
+You can append query options to the URI in the following format, ?option1=value&option2=value&...
+
+For example, in order to download content from file `test.txt` located on the `filesystem` in `camelTesting` storage account, use the following snippet:
+
+[source,java]
+--
+from("azure-storage-datalake:camelTesting/filesystem?fileName=test.txt&accountKey=key").
+to("file://fileDirectory");
+--
+
+== Uri Options
+
+// component options: START
+The Azure storage datalake service component supports 33 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accountKey* (common) | account key for authentication | | String
+| *clientId* (common) | client id for azure account | | String
+| *clientSecret* (common) | client secret for azure account | | String
+| *clientSecretCredential* (common) | client secret credential for authentication | | ClientSecretCredential
+| *close* (common) | Whether or not a file changed event raised indicates completion (true) or modification (false) | | Boolean
+| *closeStreamAfterRead* (common) | check for closing stream after read | | Boolean
+| *configuration* (common) | configuration object for datalake | | DataLakeConfiguration
+| *dataCount* (common) | count number of bytes to download | | Long
+| *directoryName* (common) | directory of the file to be handled in component | | String
+| *downloadLinkExpiration* (common) | download link expiration time | | Long
+| *expression* (common) | expression for queryInputStream | | String
+| *fileDir* (common) | directory of file to do operations in the local system | | String
+| *fileName* (common) | name of file to be handled in component | | String
+| *fileOffset* (common) | offset position in file for different operations | | Long
+| *maxResults* (common) | maximum number of results to show at a time | | Integer
+| *maxRetryRequests* (common) | no of retries to a given request | | int
+| *openOptions* (common) | set open options for creating file | | Set
+| *path* (common) | path in azure datalake for operations | | String
+| *permission* (common) | permission string for the file | | String
+| *position* (common) | This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. | | Long
+| *recursive* (common) | recursively include all paths | | Boolean
+| *regex* (common) | regular expression for matching file names | | String
+| *retainUncommitedData* (common) | Whether or not uncommitted data is to be retained after the operation | | Boolean
+| *serviceClient* (common) | *Autowired* datalake service client for azure storage datalake | | DataLakeServiceClient
+| *sharedKeyCredential* (common) | shared key credential for azure datalake gen2 | | StorageSharedKeyCredential
+| *tenantId* (common) | tenant id for azure account | | String
+| *timeout* (common) | Timeout for operation | | Duration
+| *umask* (common) | umask permission for file | | String
+| *userPrincipalNameReturned* (common) | whether or not to use upn | | Boolean
+| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
+| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
+| *operation* (producer) | operation to be performed. There are 2 enums and the value can be one of: listFileSystem, listFiles | listFileSystem | DataLakeOperationsDefinition
+| *autowiredEnabled* (advanced) | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
+|===
+// component options: END
+
+// endpoint options: START
+The Azure storage datalake service endpoint is configured using URI syntax:
+
+----
+azure-storage-datalake:accountName/fileSystemName
+----
+
+with the following path and query parameters:
+
+=== Path Parameters (2 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accountName* | name of the azure account | | String
+| *fileSystemName* | name of filesystem to be used | | String
+|===
+
+
+=== Query Parameters (34 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accountKey* (common) | account key for authentication | | String
+| *clientId* (common) | client id for azure account | | String
+| *clientSecret* (common) | client secret for azure account | | String
+| *clientSecretCredential* (common) | client secret credential for authentication | | ClientSecretCredential
+| *close* (common) | Whether or not a file changed event raised indicates completion (true) or modification (false) | | Boolean
+| *closeStreamAfterRead* (common) | check for closing stream after read | | Boolean
+| *dataCount* (common) | count number of bytes to download | | Long
+| *dataLakeServiceClient* (common) | service client of datalake | | DataLakeServiceClient
+| *directoryName* (common) | directory of the file to be handled in component | | String
+| *downloadLinkExpiration* (common) | download link expiration time | | Long
+| *expression* (common) | expression for queryInputStream | | String
+| *fileDir* (common) | directory of file to do operations in the local system | | String
+| *fileName* (common) | name of file to be handled in component | | String
+| *fileOffset* (common) | offset position in file for different operations | | Long
+| *maxResults* (common) | maximum number of results to show at a time | | Integer
+| *maxRetryRequests* (common) | no of retries to a given request | | int
+| *openOptions* (common) | set open options for creating file | | Set
+| *path* (common) | path in azure datalake for operations | | String
+| *permission* (common) | permission string for the file | | String
+| *position* (common) | This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. | | Long
+| *recursive* (common) | recursively include all paths | | Boolean
+| *regex* (common) | regular expression for matching file names | | String
+| *retainUncommitedData* (common) | Whether or not uncommitted data is to be retained after the operation | | Boolean
+| *serviceClient* (common) | *Autowired* datalake service client for azure storage datalake | | DataLakeServiceClient
+| *sharedKeyCredential* (common) | shared key credential for azure datalake gen2 | | StorageSharedKeyCredential
+| *tenantId* (common) | tenant id for azure account | | String
+| *timeout* (common) | Timeout for operation | | Duration
+| *umask* (common) | umask permission for file | | String
+| *userPrincipalNameReturned* (common) | whether or not to use upn | | Boolean
+| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
+| *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler
+| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. There are 3 enums and the value can be one of: InOnly, InOut, InOptionalOut | | ExchangePattern
+| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
+| *operation* (producer) | operation to be performed. There are 2 enums and the value can be one of: listFileSystem, listFiles | listFileSystem | DataLakeOperationsDefinition
+|===
+// endpoint options: END
+
+=== Methods of authentication
+In order to use this component, you will have to provide at least one of the below given points for authentication purposes.
+
+- Provide `accountName` and `accessKey` for your azure account.
+- Provide StorageSharedKeyCredential instance which can be provided into `sharedKeyCredential` option.
+- Provide ClientSecretCredential instance which can be provided into `clientSecretCredential` option.
+- Provide `accountName`, `clientId`, `clientSecret` and `tenantId` for authentication with Azure Active Directory.
+- Provide a DataLakeServiceClient instance which can be provided into `serviceClient` option.
+
+=== Batch Consumer
+
+This component implements the Batch Consumer.
+
+This allows you to know how many messages exists in this batch and let the Aggregator aggregate this number of messages.
+
+== Usage
+
+=== Message Headers specified by user
+
+[width="100%",cols="10%,10%,10%,70%",options="header",]
+|===
+|Header |Variable Name |Type |Description
+|`CamelAzureStorageDataLakeListFileSystemsOptions` |`DataLakeConstants.LIST_FILESYSTEMS_OPTIONS` | `ListFileSystemsOptions` | Defines options available to configure the behavior of a call to listFileSystemsSegment on a DataLakeServiceAsyncClient object. Null may be passed.
+|`CamelAzureStorageDataLakeTimeout` |`DataLakeConstants.TIMEOUT` |`Duration` | An optional timeout value beyond which a RuntimeException will be raised.
+|`CamelAzureStorageDataLakeOperation` |`DataLakeConstants.DATALAKE_OPERATION` |`DataLakeOperationsDefinition` | Specify the producer operation to execute. Different operations allowed are shown below.
+|`CamelAzureStorageDataLakeFileSystemName` |`DataLakeConstants.FILESYSTEM_NAME` |`String` | Name of the file system in azure datalake on which operation is to be performed. Please make sure that filesystem name is all lowercase.
+|`CamelAzureStorageDataLakeDirectoryName` |`DataLakeConstants.DIRECTORY_NAME` |`String` | Name of the directory in azure datalake on which operation is to be performed.
+|`CamelAzureStorageDataLakeFileName` |`DataLakeConstants.FILE_NAME` |`String` | Name of the file in azure datalake on which operation is to be performed.
+|`CamelAzureStorageDataLakeMetadata` |`DataLakeConstants.METADATA` |`Map<String,String>` | The metadata to associate with the file.
+|`CamelAzureStorageDataLakePublicAccessType` |`DataLakeConstants.PUBLIC_ACCESS_TYPE` |`PublicAccessType` |
+|`CamelAzureStorageDataLakeRequestCondition` |`DataLakeConstants.DATALAKE_REQUEST_CONDITION` |`DataLakeRequestConditions` | This contains values which will restrict the successful operation of a variety of requests to the conditions present. These conditions are entirely optional.
+|`CamelAzureStorageDataLakeListPathOptions` |`DataLakeConstants.LIST_PATH_OPTIONS` |`ListPathOptions` | Defines options available to configure the behavior of a call to listContainersSegment on a DataLakeFileSystemClient object. Null may be passed.
+|`CamelAzureStorageDataLakePath` |`DataLakeConstants.PATH` |`String` | Path of the file to be used for upload operations.
+|`CamelAzureStorageDataLakeRecursive` |`DataLakeConstants.RECURSIVE` |`Boolean` | Specifies if the call to listContainersSegment should recursively include all paths.
+|`CamelAzureStorageDataLakeMaxResults` |`DataLakeConstants.MAX_RESULTS` |`Integer` | Specifies the maximum number of blobs to return, including all BlobPrefix elements.
+|`CamelAzureStorageDataLakeUserPrincipalNameReturned` |`DataLakeConstants.USER_PRINCIPAL_NAME_RETURNED` |`Boolean` |
+|`CamelAzureStorageDataLakeRegex` |`DataLakeConstants.REGEX` |`String` | Filter the results to return only those files with match the specified regular expression.
+|`CamelAzureStorageDataLakeFileDir` |`DataLakeConstants.FILE_DIR` |`String` | Directory in which the file is to be downloaded.
+|`CamelAzureStorageDataLakeContentMD5` |`DataLakeConstants.CONTENT_MD5` |`byte[]` | An MD5 hash of the content. The hash is used to verify the intergity of the file during transport.
+|`CamelAzureStorageDataLakeFileRange` |`DataLakeConstants.FILE_RANGE` |`FileRange` | This is a representation of a range of bytes on a file, typically used during a download operation. Passing null as a FileRange value will default to the entire range of the file.
+|`CamelAzureStorageDataLakeParallelTransferOptions` |`DataLakeConstants.PARALLEL_TRANSFER_OPTIONS` | `ParallelTransferOptions` |
+|`CamelAzureStorageDataLakeOpenOptions` |`DataLakeConstants.OPEN_OPTIONS` |`Set<OpenOption>` | Set of OpenOption used to configure how to open or create a file.
+|`CamelAzureStorageDataLakeIncrementalCopy` |`DataLakeConstants.INCREMENTAL_COPY` |`Boolean` | Flag indicating if the file was incrementally copied.
+|`CamelAzureStorageDataLakeDownloadLinkExpiration` |`DataLakeConstants.DOWNLOAD_LINK_EXPIRATION` |`Long` | Set the Expiration time of the download link.
+|`CamelAzureStorageDataLakeFileOffset` |`DataLakeConstants.FILE_OFFSET` |`Long` | The position where the data is to be appended.
+|`CamelAzureStorageDataLakeLeaseId` |`DataLakeConstants.LEASE_ID` |`String` | By setting lease id, requests will fail if the provided lease does not match the active lease on the file.
+|`CamelAzureStorageDataLakePathHttpHeaders` |`DataLakeConstants.PATH_HTTP_HEADERS` |`PathHttpHeaders` | Additional parameters for a set of operations.
+|`CamelAzureStorageDataLakeRetainCommitedData` |`DataLakeConstants.RETAIN_UNCOMMITED_DATA` |`Boolean` | Determines Whether or not uncommitted data is to be retained after the operation.
+|`CamelAzureStorageDataLakeClose` |`DataLakeConstants.CLOSE` |`Boolean` | Whether or not a file changed event raised indicates completion (true) or modification (false).
+|`CamelAzureStorageDataLakePosition` |`DataLakeConstants.POSITION` |`Long` | The length of the file after all data has been written.
+|`CamelAzureStorageDataLakeExpression` |`DataLakeConstants.EXPRESSION` |`String` | The query expression on the file.
+|`CamelAzureStorageDataLakeInputSerialization` |`DataLakeConstants.INPUT_SERIALIZATION` |`FileQuerySerialization` | Defines the input serialization for a file query request. either FileQueryJsonSerialization or FileQueryDelimitedSerialization
+|`CamelAzureStorageDataLakeOutputSerialization` |`DataLakeConstants.OUTPUT_SERIALIZATION` |`FileQuerySerialization` | Defines the output serialization for a file query request. either FileQueryJsonSerialization or FileQueryDelimitedSerialization
+|`CamelAzureStorageDataLakeErrorConsumer` |`DataLakeConstants.ERROR_CONSUMER` |`Consumer<FileQueryError>` | Sets error consumer for file query
+|`CamelAzureStorageDataLakeProgressConsumer` |`DataLakeConstants.PROGRESS_CONSUMER` |`Consumer<FileQueryProgress>` | Sets progress consumer for file query
+|`CamelAzureStorageDataLakeQueryOptions` |`DataLakeConstants.QUERY_OPTIONS` |`FileQueryOptions` | Optional parameters for File Query.
+|`CamelAzureStorageDataLakePermission` |`DataLakeConstants.PERMISSION` |`String` | Sets the permission for file.
+|`CamelAzureStorageDataLakeUmask` |`DataLakeConstants.UMASK` |`String` | Sets the umask for file.
+|===
+
+=== Message headers set by the component
+
+[width="100%",cols="10%,10%,10%,70%",options="header",]
+|===
+|Header |Variable Name |Type |Description
+|`CamelAzureStorageDataLakeMetadata` |`DataLakeConstants.METADATA` |`Map<String,String>` | The metadata to associate with the file.
+|`CamelAzureStorageDataLakeRawHttpHeaders` |`DataLakeConstants.RAW_HTTP_HEADERS` |`HttpHeaders` | Non parsed http headers that can be used by the user.
+|`CamelAzureStorageDataLakeAccessTier` |`DataLakeConstants.ACCESS_TIER` |`AccessTier` | Access tier of file.
+|`CamelAzureStorageDataLakeAccessTierChangeTime` |`DataLakeConstants.ACCESS_TIER_CHANGE_TIME` |`OffsetDateTime` | Datetime when the access tier of the blob last changed.
+|`CamelAzureStorageDataLakeArchiveStatus` |`DataLakeConstants.ARCHIVE_STATUS` |`ArchiveStatus` | Archive status of file.
+|`CamelAzureStorageDataLakeCacheControl` |`DataLakeConstants.CACHE_CONTROL` |`String` | Cache control specified for the file.
+|`CamelAzureStorageDataLakeContentDisposition` |`DataLakeConstants.CONTENT_DISPOSITION` |`String` | Content disposition specified for the file.
+|`CamelAzureStorageDataLakeContentEncoding` |`DataLakeConstants.CONTENT_ENCODING` |`String` | Content encoding specified for the file.
+|`CamelAzureStorageDataLakeContentLanguage` |`DataLakeConstants.CONTENT_LANGUAGE` |`String` | Content language specified for the file.
+|`CamelAzureStorageDataLakeContentType` |`DataLakeConstants.CONTENT_TYPE` |`String` | Content type specified for the file.
+|`CamelAzureStorageDataLakeCopyCompletionTime` |`DataLakeConstants.COPY_COMPLETION_TIME` |`OffsetDateTime` | Conclusion time of the last attempted Copy Blob operation where this file was the destination file.
+|`CamelAzureStorageDataLakeCopyId` |`DataLakeConstants.COPY_ID` |`String` | String identifier for this copy operation.
+|`CamelAzureStorageDataLakeCopyProgress` |`DataLakeConstants.COPY_PROGRESS` |`String` | Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this file was the destination file.
+|`CamelAzureStorageDataLakeCopySource` |`DataLakeConstants.COPY_SOURCE` |`String` | URL up to 2 KB in length that specifies the source file or file used in the last attempted Copy Blob operation where this file was the destination file.
+|`CamelAzureStorageDataLakeCopyStatus` |`DataLakeConstants.COPY_STATUS` |`CopyStatusType` | Status of the last copy operation performed on the file.
+|`CamelAzureStorageDataLakeCopyStatusDescription` |`DataLakeConstants.COPY_STATUS_DESCRIPTION` |`String` |
+|`CamelAzureStorageDataLakeCreationTime` |`DataLakeConstants.CREATION_TIME` |`OffsetDateTime` | Creation time of the file.
+|`CamelAzureStorageDataLakeEncryptionKeySha256` |`DataLakeConstants.ENCRYPTION_KEY_SHA_256` |`String` | The SHA-256 hash of the encryption key used to encrypt the file.
+|`CamelAzureStorageDataLakeServerEncrypted` |`DataLakeConstants.SERVER_ENCRYPTED` |`Boolean` | Flag indicating if the file's content is encrypted on the server.
+|`CamelAzureStorageDataLakeETag` |`DataLakeConstants.E_TAG` |`String` | The E Tag of the file.
+|`CamelAzureStorageDataLakeFileSize` |`DataLakeConstants.FILE_SIZE` |`Long` | Size of the file.
+|`CamelAzureStorageDataLakeLastModified` |`DataLakeConstants.LAST_MODIFIED` |`OffsetDateTime` | Datetime when the file was last modified.
+|`CamelAzureStorageDataLakeLeaseDuration` |`DataLakeConstants.LEASE_DURATION` |`LeaseDurationType` | Type of lease on the file.
+|`CamelAzureStorageDataLakeLeaseState` |`DataLakeConstants.LEASE_STATE` |`LeaseStateType` | State of the lease on the file.
+|`CamelAzureStorageDataLakeLeaseStatus` |`DataLakeConstants.LEASE_STATUS` |`LeaseStatusType` | Status of the lease on the file.
+|`CamelAzureStorageDataLakeDownloadLink` |`DataLakeConstants.DOWNLOAD_LINK` |`String` | The link that can be used to download the file from datalake.
+|===
+
+=== Automatic detection of service client
+
+The component is capable of automatically detecting the presence of a DataLakeServiceClient bean in the registry.
+Hence, if your registry has only one instance of type DataLakeServiceClient, it will be automatically used as the default client.
+You won't have to explicitly define it as an uri paramater.
+
+=== Azure Storage DataLake Producer Operations
+
+The various operations supported by Azure Storage DataLake are as given below:
+
+*Operations on Service level*
+
+For these operations, `accountName` option is required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`listFileSystem` | List all the file systems that are present in the given azure account.
+|===
+
+*Operations on File system level*
+
+For these operations, `accountName` and `fileSystemName` options are required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`createFileSystem` | Creates a new file System with the storage account
+|`deleteFileSystem` | Deletes the specified file system within the storage account
+|`listPaths` | Returns list of all the files within the given path in the given file system , with folder structure flattened
+|===
+
+*Operations on Directory level*
+
+For these operations, `accountName`, `fileSystemName` and `directoryName` options are required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`createFile` | Creates a new file in the specified directory within the fileSystem
+|`deleteDirectory` | Deletes the specified directory within the file system
+|===
+
+*Operations on file level*
+
+For these operations, `accountName`, `fileSystemName` and `fileName` options are required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`getFile` | Get the contents of a file
+|`downloadToFile` | Downloadd the entire file from the file system into a path specified by fileDir.
+|`downloadLink` | Generate download link for the specified file using Shared Access Signature (SAS).
+The expiration time to be set for the link can be specified otherwise 1 hour is taken as default.
+|`deleteFile` | Deletes the specified file.
+|`appendToFile` | Appends the data passed to the specified file in the file System. Flush command is
+required after append.
+|`flushToFile` | Flushes the data already appended to the specified file.
+|`openQueryInputStream` | Opens an inputstream based on the query passed to the endpoint. For this operation,
+you must first register the query acceleration feature with your subscription.
+|===
+
+Refer the examples section below for more details on how to use these operations
+
+=== Consumer Examples
+To consume a file from the storage datalake into a file using the file component, this can be done like this:
+[source,java]
+--
+from("azure-storage-datalake":cameltesting/filesystem?fileName=test.txt&accountKey=yourAccountKey").
+to("file:/filelocation");
+--
+
+You can also directly write to a file without using the file component. For this, you will need to specify the path in `fileDir` option, to save it to your machine.
+[source,java]
+--
+from("azure-storage-datalake":cameltesting/filesystem?fileName=test.txt&accountKey=yourAccountKey&fileDir=/test/directory").
+to("mock:results");
+--
+
+This component also supports batch consumer. So, you can consume multiple files from a file system by specifying the path
+from where you want to consume the files.
+[source,java]
+--
+from("azure-storage-datalake":cameltesting/filesystem?accountKey=yourAccountKey&fileDir=/test/directory&path=abc/test").
+to("mock:results");
+--
+
+
+=== Producer Examples
+- `listFileSystem`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ //required headers can be added here
+ exchange.getIn().setHeader(DataLakeConstants.LIST_FILESYSTEMS_OPTIONS, new ListFileSystemsOptions().setMaxResultsPerPage(10));
+ })
+ .to("azure-storage-datalake:cameltesting?operation=listFileSystem&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `createFileSystem`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.FILESYSTEM_NAME, "test1");
+ })
+ .to("azure-storage-datalake:cameltesting?operation=createFileSystem&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `deleteFileSystem`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.FILESYSTEM_NAME, "test1");
+ })
+ .to("azure-storage-datalake:cameltesting?operation=deleteFileSystem&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `listPaths`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.LIST_PATH_OPTIONS, new ListPathsOptions().setPath("/main"));
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=listPaths&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `getFile`
+
+This can be done in two ways, We can either set an outputstream in the exchange body
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ // set an outputstream where the file data can should be written
+ exchange.getIn().setBody(outputStream);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=getFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+Or if body is not set, the operation will give an inputstream, given that you have already registered for query acceleration
+in azure portal.
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=getFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .process(exchange -> {
+ InputStream inputStream = exchange.getMessage().getBody(InputStream.class);
+ System.out.Println(IOUtils.toString(inputStream, StandardCharcets.UTF_8.name()));
+ })
+ .to("mock:results");
+--
+
+- `deleteFile`
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=deleteFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `downloadToFile`
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=downloadToFile&fileName=test.txt&fileDir=/test/mydir&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `downloadLink`
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=downloadLink&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .process(exchange -> {
+ String link = exchange.getMessage().getBody(String.class);
+ System.out.println(link);
+ })
+ .to("mock:results");
+--
+
+- `appendToFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ final String data = "test data";
+ final InputStream inputStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
+ exchange.getIn().setBody(inputStream);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=appendToFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `flushToFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.POSITION, 0);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=flushToFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `openQueryInputStream`
+
+For this operation, you should have already registered for query acceleration on the azure portal
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.QUERY_OPTIONS, new FileQueryOptions("SELECT * from BlobStorage"));
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=openQueryInputStream&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `upload`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ final String data = "test data";
+ final InputStream inputStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
+ exchange.getIn().setBody(inputStream);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=upload&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `uploadFromFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.PATH, "test/file.txt");
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=uploadFromFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `createFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.DIRECTORY_NAME, "test/file/");
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=createFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `deleteDirectory`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.DIRECTORY_NAME, "test/file/");
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=deleteDirectory&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+=== Testing
+Please run all the unit tests and integration test while making changes to the component as changes or version upgrades can break things.
+For running all the test in the component, you will need to obtain azure accountName and accessKey. After obtaining the same, you
+can run the full test, on this component directory, by running the following maven command
+
+----
+mvn test -Dazure.storage.account.name=accountName -Dazure.storage.account.key=accountKey
+----
+
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeComponent.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeComponent.java
new file mode 100644
index 0000000..737619e
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeComponent.java
@@ -0,0 +1,112 @@
+/*
+ * 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.azure.storage.datalake;
+
+import java.util.Map;
+import java.util.Set;
+
+import com.azure.identity.ClientSecretCredential;
+import com.azure.storage.common.StorageSharedKeyCredential;
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.DefaultComponent;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Component("azure-storage-datalake")
+public class DataLakeComponent extends DefaultComponent {
+
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeComponent.class);
+
+ @Metadata(description = "configuration object for datalake")
+ private DataLakeConfiguration configuration = new DataLakeConfiguration();
+
+ public DataLakeComponent() {
+ }
+
+ public DataLakeComponent(final CamelContext camelContext) {
+ super(camelContext);
+ }
+
+ @Override
+ protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+
+ if (remaining == null || remaining.trim().isEmpty()) {
+ throw new IllegalArgumentException("At least the account name must be specified");
+ }
+
+ final DataLakeConfiguration configuration;
+ if (this.configuration != null) {
+ configuration = this.configuration.copy();
+ } else {
+ configuration = new DataLakeConfiguration();
+ }
+
+ final String[] details = remaining.split("/");
+
+ configuration.setAccountName(details[0]);
+
+ if (details.length > 1) {
+ configuration.setFileSystemName(details[1]);
+ }
+
+ final DataLakeEndpoint endpoint = new DataLakeEndpoint(uri, this, configuration);
+ setProperties(endpoint, parameters);
+
+ setCredentialsFromRegistry(configuration);
+ validateConfiguration(configuration);
+
+ return endpoint;
+ }
+
+ public DataLakeConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(DataLakeConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
+ private void setCredentialsFromRegistry(final DataLakeConfiguration configuration) {
+ if (ObjectHelper.isEmpty(configuration.getServiceClient())) {
+ final Set<StorageSharedKeyCredential> storageSharedKeyCredentials
+ = getCamelContext().getRegistry().findByType(StorageSharedKeyCredential.class);
+ final Set<ClientSecretCredential> clientSecretCredentials
+ = getCamelContext().getRegistry().findByType(ClientSecretCredential.class);
+
+ if (storageSharedKeyCredentials.size() == 1) {
+ configuration.setSharedKeyCredential(storageSharedKeyCredentials.stream().findFirst().get());
+ }
+
+ if (clientSecretCredentials.size() == 1) {
+ configuration.setClientSecretCredential(clientSecretCredentials.stream().findFirst().get());
+ }
+
+ }
+ }
+
+ private void validateConfiguration(final DataLakeConfiguration config) {
+ if (config.getServiceClient() == null && config.getClientSecretCredential() == null
+ && config.getSharedKeyCredential() == null) {
+ throw new IllegalArgumentException("client or credentials must be specified");
+ }
+ }
+
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConfiguration.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConfiguration.java
new file mode 100644
index 0000000..b38a36d
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConfiguration.java
@@ -0,0 +1,356 @@
+/*
+ * 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.azure.storage.datalake;
+
+import java.nio.file.OpenOption;
+import java.time.Duration;
+import java.util.Set;
+
+import com.azure.identity.ClientSecretCredential;
+import com.azure.storage.common.StorageSharedKeyCredential;
+import com.azure.storage.file.datalake.DataLakeServiceClient;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
+
+@UriParams
+public class DataLakeConfiguration implements Cloneable {
+
+ @UriPath(description = "name of the azure account")
+ private String accountName;
+ @UriPath(description = "name of filesystem to be used")
+ private String fileSystemName;
+ @UriParam(description = "shared key credential for azure datalake gen2")
+ private StorageSharedKeyCredential sharedKeyCredential;
+ @UriParam(description = "directory of the file to be handled in component")
+ private String directoryName;
+ @UriParam(description = "name of file to be handled in component")
+ private String fileName;
+ @UriParam(description = "client secret credential for authentication")
+ private ClientSecretCredential clientSecretCredential;
+ @UriParam(description = "datalake service client for azure storage datalake")
+ @Metadata(autowired = true)
+ private DataLakeServiceClient serviceClient;
+ @UriParam(description = "account key for authentication")
+ private String accountKey;
+ @UriParam(description = "client id for azure account")
+ private String clientId;
+ @UriParam(description = "client secret for azure account")
+ private String clientSecret;
+ @UriParam(description = "tenant id for azure account")
+ private String tenantId;
+ @UriParam(description = "Timeout for operation")
+ private Duration timeout;
+ @UriParam(description = "path in azure datalake for operations")
+ private String path = "/";
+ @UriParam(description = "recursively include all paths")
+ private Boolean recursive = false;
+ @UriParam(description = "maximum number of results to show at a time")
+ private Integer maxResults = 1000;
+ @UriParam(description = "whether or not to use upn")
+ private Boolean userPrincipalNameReturned = false;
+ @UriParam(description = "regular expression for matching file names")
+ private String regex;
+ @UriParam(description = "directory of file to do operations in the local system")
+ private String fileDir;
+ @UriParam(description = "offset position in file for different operations")
+ private Long fileOffset;
+ @UriParam(description = "count number of bytes to download")
+ private Long dataCount;
+ @UriParam(description = "no of retries to a given request")
+ private int maxRetryRequests;
+ @UriParam(description = "check for closing stream after read")
+ private Boolean closeStreamAfterRead = true;
+ @UriParam(description = "download link expiration time")
+ private Long downloadLinkExpiration;
+ @UriParam(description = "Whether or not uncommitted data is to be retained after the operation")
+ private Boolean retainUncommitedData = false;
+ @UriParam(description = "Whether or not a file changed event raised indicates completion (true) or modification (false)")
+ private Boolean close = false;
+ @UriParam(description = "This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file.")
+ private Long position;
+ @UriParam(description = "expression for queryInputStream")
+ private String expression;
+ @UriParam(description = "permission string for the file")
+ private String permission;
+ @UriParam(description = "umask permission for file")
+ private String umask;
+ @UriParam(description = "set open options for creating file")
+ private Set<OpenOption> openOptions;
+
+ @UriParam(label = "producer", enums = "listFileSystem, listFiles", defaultValue = "listFileSystem",
+ description = "operation to be performed")
+ private DataLakeOperationsDefinition operation = DataLakeOperationsDefinition.listFileSystem;
+
+ public DataLakeOperationsDefinition getOperation() {
+ return operation;
+ }
+
+ public void setOperation(DataLakeOperationsDefinition operation) {
+ this.operation = operation;
+ }
+
+ public String getUmask() {
+ return umask;
+ }
+
+ public void setUmask(String umask) {
+ this.umask = umask;
+ }
+
+ public String getPermission() {
+ return permission;
+ }
+
+ public void setPermission(String permission) {
+ this.permission = permission;
+ }
+
+ public String getExpression() {
+ return expression;
+ }
+
+ public void setExpression(String expression) {
+ this.expression = expression;
+ }
+
+ public Long getPosition() {
+ return position;
+ }
+
+ public void setPosition(Long position) {
+ this.position = position;
+ }
+
+ public Boolean getClose() {
+ return close;
+ }
+
+ public void setClose(Boolean close) {
+ this.close = close;
+ }
+
+ public Boolean getRetainUncommitedData() {
+ return retainUncommitedData;
+ }
+
+ public void setRetainUncommitedData(Boolean retainUncommitedData) {
+ this.retainUncommitedData = retainUncommitedData;
+ }
+
+ public Long getDownloadLinkExpiration() {
+ return downloadLinkExpiration;
+ }
+
+ public void setDownloadLinkExpiration(Long downloadLinkExpiration) {
+ this.downloadLinkExpiration = downloadLinkExpiration;
+ }
+
+ public Boolean getCloseStreamAfterRead() {
+ return closeStreamAfterRead;
+ }
+
+ public void setCloseStreamAfterRead(Boolean closeStreamAfterRead) {
+ this.closeStreamAfterRead = closeStreamAfterRead;
+ }
+
+ public int getMaxRetryRequests() {
+ return maxRetryRequests;
+ }
+
+ public void setMaxRetryRequests(int maxRetryRequests) {
+ this.maxRetryRequests = maxRetryRequests;
+ }
+
+ public Long getFileOffset() {
+ return fileOffset;
+ }
+
+ public void setFileOffset(Long fileOffset) {
+ this.fileOffset = fileOffset;
+ }
+
+ public Long getDataCount() {
+ return dataCount;
+ }
+
+ public void setDataCount(Long dataCount) {
+ this.dataCount = dataCount;
+ }
+
+ public String getFileDir() {
+ return fileDir;
+ }
+
+ public void setFileDir(String fileDir) {
+ this.fileDir = fileDir;
+ }
+
+ public String getRegex() {
+ return regex;
+ }
+
+ public void setRegex(String regex) {
+ this.regex = regex;
+ }
+
+ public Boolean getUserPrincipalNameReturned() {
+ return userPrincipalNameReturned;
+ }
+
+ public void setUserPrincipalNameReturned(Boolean userPrincipalNameReturned) {
+ this.userPrincipalNameReturned = userPrincipalNameReturned;
+ }
+
+ public Integer getMaxResults() {
+ return maxResults;
+ }
+
+ public void setMaxResults(Integer maxResults) {
+ this.maxResults = maxResults;
+ }
+
+ public Boolean getRecursive() {
+ return recursive;
+ }
+
+ public void setRecursive(Boolean recursive) {
+ this.recursive = recursive;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public Duration getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(Duration timeout) {
+ this.timeout = timeout;
+ }
+
+ public String getAccountName() {
+ return accountName;
+ }
+
+ public void setAccountName(String accountName) {
+ this.accountName = accountName;
+ }
+
+ public String getFileSystemName() {
+ return fileSystemName;
+ }
+
+ public void setFileSystemName(String fileSystemName) {
+ this.fileSystemName = fileSystemName;
+ }
+
+ public StorageSharedKeyCredential getSharedKeyCredential() {
+ return sharedKeyCredential;
+ }
+
+ public void setSharedKeyCredential(StorageSharedKeyCredential sharedKeyCredential) {
+ this.sharedKeyCredential = sharedKeyCredential;
+ }
+
+ public String getDirectoryName() {
+ return directoryName;
+ }
+
+ public void setDirectoryName(String directoryName) {
+ this.directoryName = directoryName;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public ClientSecretCredential getClientSecretCredential() {
+ return clientSecretCredential;
+ }
+
+ public void setClientSecretCredential(ClientSecretCredential clientSecretCredential) {
+ this.clientSecretCredential = clientSecretCredential;
+ }
+
+ public DataLakeServiceClient getServiceClient() {
+ return serviceClient;
+ }
+
+ public void setServiceClient(DataLakeServiceClient serviceClient) {
+ this.serviceClient = serviceClient;
+ }
+
+ public String getAccountKey() {
+ return accountKey;
+ }
+
+ public void setAccountKey(String accountKey) {
+ this.accountKey = accountKey;
+ }
+
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ public String getClientSecret() {
+ return clientSecret;
+ }
+
+ public void setClientSecret(String clientSecret) {
+ this.clientSecret = clientSecret;
+ }
+
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ public Set<OpenOption> getOpenOptions() {
+ return openOptions;
+ }
+
+ public void setOpenOptions(Set<OpenOption> openOptions) {
+ this.openOptions = openOptions;
+ }
+
+ public DataLakeConfiguration copy() {
+ try {
+ return (DataLakeConfiguration) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new RuntimeCamelException(e);
+ }
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConfigurationOptionsProxy.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConfigurationOptionsProxy.java
new file mode 100644
index 0000000..abdc93c
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConfigurationOptionsProxy.java
@@ -0,0 +1,267 @@
+/*
+ * 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.azure.storage.datalake;
+
+import java.nio.file.OpenOption;
+import java.time.Duration;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+import com.azure.storage.common.ParallelTransferOptions;
+import com.azure.storage.file.datalake.models.AccessTier;
+import com.azure.storage.file.datalake.models.DataLakeRequestConditions;
+import com.azure.storage.file.datalake.models.FileQueryError;
+import com.azure.storage.file.datalake.models.FileQueryProgress;
+import com.azure.storage.file.datalake.models.FileQuerySerialization;
+import com.azure.storage.file.datalake.models.FileRange;
+import com.azure.storage.file.datalake.models.ListFileSystemsOptions;
+import com.azure.storage.file.datalake.models.ListPathsOptions;
+import com.azure.storage.file.datalake.models.PathHttpHeaders;
+import com.azure.storage.file.datalake.models.PublicAccessType;
+import com.azure.storage.file.datalake.options.FileQueryOptions;
+import org.apache.camel.Exchange;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataLakeConfigurationOptionsProxy {
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeConfigurationOptionsProxy.class);
+
+ private final DataLakeConfiguration configuration;
+
+ public DataLakeConfigurationOptionsProxy(final DataLakeConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
+ public ListFileSystemsOptions getListFileSystemOptions(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getListFileSystemOptionsFromHeaders, () -> null, exchange);
+ }
+
+ public Duration getTimeout(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getTimoutFromHeaders, configuration::getTimeout, exchange);
+ }
+
+ public DataLakeOperationsDefinition getOperation(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getDataLakeOperationsDefinitionFromHeader, configuration::getOperation,
+ exchange);
+ }
+
+ public String getFileSystemName(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getFileSystemNameFromHeaders, configuration::getFileSystemName, exchange);
+ }
+
+ public String getDirectoryName(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getDirectoryNameFromHeaders, configuration::getDirectoryName, exchange);
+ }
+
+ public String getFileName(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getFileNameFromHeaders, configuration::getFileName, exchange);
+ }
+
+ public ListPathsOptions getListPathsOptions(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getListPathsOptionsFromHeaders, () -> null, exchange);
+ }
+
+ public String getPath(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getPathFromHeaders, configuration::getPath, exchange);
+ }
+
+ public Boolean isRecursive(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getRecursiveFromHeaders, configuration::getRecursive, exchange);
+ }
+
+ public Integer getMaxResults(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getMaxResultsFromHeaders, configuration::getMaxResults, exchange);
+ }
+
+ public Boolean isUserPrincipalNameReturned(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getUserPrincipalNameReturnedFromHeaders,
+ configuration::getUserPrincipalNameReturned, exchange);
+ }
+
+ public String getRegex(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getRegexFromHeaders, configuration::getRegex, exchange);
+ }
+
+ public String getFileDir(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getFileDirFromHeaders, configuration::getFileDir, exchange);
+ }
+
+ public Long getDownloadLinkExpiration(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getDownloadLinkExpirationFromHeaders,
+ configuration::getDownloadLinkExpiration, exchange);
+ }
+
+ public Long getFileOffset(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getFileOffsetFromHeaders, configuration::getFileOffset, exchange);
+ }
+
+ public String getLeaseId(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getLeaseIdFromHeaders, () -> null, exchange);
+ }
+
+ public Boolean retainUnCommitedData(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getRetainUncommittedDataFromHeaders, configuration::getRetainUncommitedData,
+ exchange);
+ }
+
+ public Boolean getClose(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getCloseFromHeaders, configuration::getClose, exchange);
+ }
+
+ public Long getPosition(final Exchange exchange) {
+ LOG.info(String.valueOf(configuration.getPosition()));
+ return getOption(DataLakeExchangeHeaders::getPositionFromHeaders, configuration::getPosition, exchange);
+ }
+
+ public ListPathsOptions getListPathOptions(final Exchange exchange) {
+ ListPathsOptions pathsOptions = getListPathsOptions(exchange);
+
+ if (ObjectHelper.isNotEmpty(pathsOptions)) {
+ return pathsOptions;
+ }
+
+ pathsOptions = new ListPathsOptions();
+
+ final String path = getPath(exchange);
+ final Boolean recursive = isRecursive(exchange);
+ final Integer maxResults = getMaxResults(exchange);
+ final Boolean userPrincipalNameReturned = isUserPrincipalNameReturned(exchange);
+
+ pathsOptions = pathsOptions.setPath(path).setMaxResults(maxResults).setRecursive(recursive)
+ .setUserPrincipalNameReturned(userPrincipalNameReturned);
+ return pathsOptions;
+ }
+
+ public String getExpression(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getExpressionFromHeaders, configuration::getExpression, exchange);
+ }
+
+ public FileQuerySerialization getInputSerialization(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getInputSerializationFromHeaders, () -> null, exchange);
+ }
+
+ public FileQuerySerialization getOutputSerialization(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getOutputSerializationFromHeaders, () -> null, exchange);
+ }
+
+ public Consumer<FileQueryError> getErrorConsuer(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getErrorConsumerFromHeaders, () -> null, exchange);
+ }
+
+ public Consumer<FileQueryProgress> getProgressConsuer(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getProgressConsumerFromHeaders, () -> null, exchange);
+ }
+
+ public FileQueryOptions getFileQueryOption(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getQueryOptionsFromHeaders, () -> null, exchange);
+ }
+
+ public String getPermission(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getPermissionFromHeaders, configuration::getPermission, exchange);
+ }
+
+ public String getUmask(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getUmaskFromHeaders, configuration::getUmask, exchange);
+ }
+
+ public Set<OpenOption> getOpenOptions(final Exchange exchange) {
+ return getOption(DataLakeExchangeHeaders::getOpenOptionsFromHeaders, configuration::getOpenOptions, exchange);
+ }
+
+ public FileQueryOptions getFileQueryOptions(final Exchange exchange) {
+ FileQueryOptions queryOptions = getFileQueryOption(exchange);
+
+ if (ObjectHelper.isNotEmpty(queryOptions)) {
+ return queryOptions;
+ }
+ final String expression = getExpression(exchange);
+ final FileQuerySerialization inputSerialization = getInputSerialization(exchange);
+ final FileQuerySerialization outputSerialization = getOutputSerialization(exchange);
+ final Consumer<FileQueryError> errorConsumer = getErrorConsuer(exchange);
+ final Consumer<FileQueryProgress> progressConsumer = getProgressConsuer(exchange);
+ queryOptions = new FileQueryOptions(expression)
+ .setInputSerialization(inputSerialization)
+ .setOutputSerialization(outputSerialization)
+ .setErrorConsumer(errorConsumer)
+ .setProgressConsumer(progressConsumer);
+
+ return queryOptions;
+
+ }
+
+ public Map<String, String> getMetadata(final Exchange exchange) {
+ return DataLakeExchangeHeaders.getMedataFromHeaders(exchange);
+ }
+
+ public PublicAccessType getPublicAccessType(final Exchange exchange) {
+ return DataLakeExchangeHeaders.getPublicAccessTypeFromHeaders(exchange);
+ }
+
+ public DataLakeRequestConditions getDataLakeRequestConditions(final Exchange exchange) {
+ return DataLakeExchangeHeaders.getDataLakeRequestConditionsFromHeaders(exchange);
+ }
+
+ public AccessTier getAccessTier(final Exchange exchange) {
+ return DataLakeExchangeHeaders.getAccessTierFromHeaders(exchange);
+ }
+
+ public byte[] getContentMd5(final Exchange exchange) {
+ return DataLakeExchangeHeaders.getContendMd5FromHeaders(exchange);
+ }
+
+ public ParallelTransferOptions getParallelTransferOptions(final Exchange exchange) {
+ return DataLakeExchangeHeaders.getParallelTransferOptionsFromHeaders(exchange);
+ }
+
+ public PathHttpHeaders getPathHttpHeaders(final Exchange exchange) {
+ return DataLakeExchangeHeaders.getPathHttpHeadersFromHeaders(exchange);
+ }
+
+ public int getMaxRetryRequests() {
+ return configuration.getMaxRetryRequests();
+ }
+
+ public FileRange getFileRange(final Exchange exchange) {
+ final FileRange fileRange = DataLakeExchangeHeaders.getFileRangeFromHeaders(exchange);
+ final Long fileOffset = configuration.getFileOffset();
+ final Long dataCount = configuration.getDataCount();
+ if (fileRange != null) {
+ return fileRange;
+ } else if (fileOffset != null && dataCount != null) {
+ return new FileRange(configuration.getFileOffset(), configuration.getDataCount());
+ } else {
+ return null;
+ }
+ }
+
+ public DataLakeConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ private <R> R getOption(
+ final Function<Exchange, R> exchangeFn, final Supplier<R> fallbackFn, final Exchange exchange) {
+ if (ObjectHelper.isEmpty(exchange) || ObjectHelper.isEmpty(exchangeFn.apply(exchange))) {
+ return fallbackFn.get();
+ } else {
+ return exchangeFn.apply(exchange);
+ }
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConstants.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConstants.java
new file mode 100644
index 0000000..31b8cf7
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConstants.java
@@ -0,0 +1,86 @@
+/*
+ * 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.azure.storage.datalake;
+
+public final class DataLakeConstants {
+ private static final String HEADER_PREFIX = "CamelAzureStorageDataLake";
+
+ public static final String LIST_FILESYSTEMS_OPTIONS = HEADER_PREFIX + "ListFileSystemsOptions";
+ public static final String TIMEOUT = HEADER_PREFIX + "Timeout";
+ public static final String DATALAKE_OPERATION = HEADER_PREFIX + "Operation";
+ public static final String FILESYSTEM_NAME = HEADER_PREFIX + "FileSystemName";
+ public static final String DIRECTORY_NAME = HEADER_PREFIX + "DirectoryName";
+ public static final String FILE_NAME = HEADER_PREFIX + "FileName";
+ public static final String METADATA = HEADER_PREFIX + "Metadata";
+ public static final String PUBLIC_ACCESS_TYPE = HEADER_PREFIX + "PublicAccessType";
+ public static final String RAW_HTTP_HEADERS = HEADER_PREFIX + "RawHttpHeaders";
+ public static final String DATALAKE_REQUEST_CONDITION = HEADER_PREFIX + "RequestCondition";
+ public static final String LIST_PATH_OPTIONS = HEADER_PREFIX + "ListPathOptions";
+ public static final String PATH = HEADER_PREFIX + "Path";
+ public static final String RECURSIVE = HEADER_PREFIX + "Recursive";
+ public static final String MAX_RESULTS = HEADER_PREFIX + "MaxResults";
+ public static final String USER_PRINCIPAL_NAME_RETURNED = HEADER_PREFIX + "UserPrincipalNameReturned";
+ public static final String REGEX = HEADER_PREFIX + "Regex";
+ public static final String FILE_DIR = HEADER_PREFIX + "FileDir";
+ public static final String ACCESS_TIER = HEADER_PREFIX + "AccessTier";
+ public static final String CONTENT_MD5 = HEADER_PREFIX + "ContentMD5";
+ public static final String FILE_RANGE = HEADER_PREFIX + "FileRange";
+ public static final String PARALLEL_TRANSFER_OPTIONS = HEADER_PREFIX + "ParallelTransferOptions";
+ public static final String OPEN_OPTIONS = HEADER_PREFIX + "OpenOptions";
+ public static final String ACCESS_TIER_CHANGE_TIME = HEADER_PREFIX + "AccessTierChangeTime";
+ public static final String ARCHIVE_STATUS = HEADER_PREFIX + "ArchiveStatus";
+ public static final String CACHE_CONTROL = HEADER_PREFIX + "CacheControl";
+ public static final String CONTENT_DISPOSITION = HEADER_PREFIX + "ContentDisposition";
+ public static final String CONTENT_ENCODING = HEADER_PREFIX + "ContentEncoding";
+ public static final String CONTENT_LANGUAGE = HEADER_PREFIX + "ContentLanguage";
+ public static final String CONTENT_TYPE = HEADER_PREFIX + "ContentType";
+ public static final String COPY_COMPLETION_TIME = HEADER_PREFIX + "CopyCompletionTime";
+ public static final String COPY_ID = HEADER_PREFIX + "CopyId";
+ public static final String COPY_PROGRESS = HEADER_PREFIX + "CopyProgress";
+ public static final String COPY_SOURCE = HEADER_PREFIX + "CopySource";
+ public static final String COPY_STATUS = HEADER_PREFIX + "CopyStatus";
+ public static final String COPY_STATUS_DESCRIPTION = HEADER_PREFIX + "CopyStatusDescription";
+ public static final String CREATION_TIME = HEADER_PREFIX + "CreationTime";
+ public static final String ENCRYPTION_KEY_SHA_256 = HEADER_PREFIX + "EncryptionKeySha256";
+ public static final String E_TAG = HEADER_PREFIX + "ETag";
+ public static final String FILE_SIZE = HEADER_PREFIX + "FileSize";
+ public static final String LAST_MODIFIED = HEADER_PREFIX + "LastModified";
+ public static final String LEASE_DURATION = HEADER_PREFIX + "LeaseDuration";
+ public static final String LEASE_STATE = HEADER_PREFIX + "LeaseState";
+ public static final String LEASE_STATUS = HEADER_PREFIX + "LeaseStatus";
+ public static final String INCREMENTAL_COPY = HEADER_PREFIX + "IncrementalCopy";
+ public static final String SERVER_ENCRYPTED = HEADER_PREFIX + "ServerEncrypted";
+ public static final String DOWNLOAD_LINK_EXPIRATION = HEADER_PREFIX + "DownloadLinkExpiration";
+ public static final String DOWNLOAD_LINK = HEADER_PREFIX + "DownloadLink";
+ public static final String FILE_OFFSET = HEADER_PREFIX + "FileOffset";
+ public static final String LEASE_ID = HEADER_PREFIX + "LeaseId";
+ public static final String PATH_HTTP_HEADERS = HEADER_PREFIX + "PathHttpHeaders";
+ public static final String RETAIN_UNCOMMITED_DATA = HEADER_PREFIX + "RetainCommitedData";
+ public static final String CLOSE = HEADER_PREFIX + "Close";
+ public static final String POSITION = HEADER_PREFIX + "Position";
+ public static final String EXPRESSION = HEADER_PREFIX + "Expression";
+ public static final String INPUT_SERIALIZATION = HEADER_PREFIX + "InputSerialization";
+ public static final String OUTPUT_SERIALIZATION = HEADER_PREFIX + "OutputSerialization";
+ public static final String ERROR_CONSUMER = HEADER_PREFIX + "ErrorConsumer";
+ public static final String PROGRESS_CONSUMER = HEADER_PREFIX + "ProgressConsumer";
+ public static final String QUERY_OPTIONS = HEADER_PREFIX + "QueryOptions";
+ public static final String PERMISSION = HEADER_PREFIX + "Permission";
+ public static final String UMASK = HEADER_PREFIX + "Umask";
+
+ private DataLakeConstants() {
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConsumer.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConsumer.java
new file mode 100644
index 0000000..3785ed5
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeConsumer.java
@@ -0,0 +1,165 @@
+/*
+ * 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.azure.storage.datalake;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+
+import com.azure.storage.file.datalake.DataLakeFileSystemClient;
+import com.azure.storage.file.datalake.models.DataLakeStorageException;
+import com.azure.storage.file.datalake.models.PathItem;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.ExtendedExchange;
+import org.apache.camel.Processor;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileSystemClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeFileOperations;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeFileSystemOperations;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeOperationResponse;
+import org.apache.camel.spi.Synchronization;
+import org.apache.camel.support.ScheduledBatchPollingConsumer;
+import org.apache.camel.util.CastUtils;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class DataLakeConsumer extends ScheduledBatchPollingConsumer {
+
+ public static final int NOT_FOUND = 404;
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumer.class);
+
+ public DataLakeConsumer(Endpoint endpoint, Processor processor) {
+ super(endpoint, processor);
+ }
+
+ @Override
+ protected int poll() throws Exception {
+ final String fileSystemName = getEndpoint().getConfiguration().getFileSystemName();
+ final String fileName = getEndpoint().getConfiguration().getFileName();
+ final DataLakeFileSystemClient dataLakeFileSystemClient
+ = getEndpoint().getDataLakeServiceClient().getFileSystemClient(fileSystemName);
+ int result;
+
+ try {
+ Queue<Exchange> exchanges;
+ if (ObjectHelper.isNotEmpty(fileName)) {
+ final Exchange exchange = createExchangeFromFile(fileName, dataLakeFileSystemClient);
+ exchanges = new LinkedList<>();
+ exchanges.add(exchange);
+ } else {
+ exchanges = createBatchExchangesFromPath(dataLakeFileSystemClient);
+ }
+ result = processBatch(CastUtils.cast(exchanges));
+ } catch (DataLakeStorageException e) {
+ if (NOT_FOUND == e.getStatusCode()) {
+ result = 0;
+ } else {
+ throw e;
+ }
+ }
+ return result;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Queue<Exchange> createBatchExchangesFromPath(final DataLakeFileSystemClient dataLakeFileSystemClient)
+ throws IOException {
+ final DataLakeFileSystemClientWrapper fileSystemClientWrapper
+ = new DataLakeFileSystemClientWrapper(dataLakeFileSystemClient);
+ final DataLakeFileSystemOperations fileSystemOperations
+ = new DataLakeFileSystemOperations(getEndpoint().getConfiguration(), fileSystemClientWrapper);
+
+ final List<PathItem> items = (List<PathItem>) fileSystemOperations.listPaths(null).getBody();
+ final Queue<Exchange> exchanges = new LinkedList<>();
+
+ for (PathItem pathItem : items) {
+ if (!pathItem.isDirectory()) {
+ exchanges.add(createExchangeFromFile(pathItem.getName(), dataLakeFileSystemClient));
+ }
+ }
+ return exchanges;
+
+ }
+
+ private Exchange createExchangeFromFile(final String fileName, final DataLakeFileSystemClient dataLakeFileSystemClient)
+ throws IOException {
+ final DataLakeFileClientWrapper clientWrapper
+ = new DataLakeFileClientWrapper(dataLakeFileSystemClient.getFileClient(fileName));
+ final DataLakeFileOperations operations = new DataLakeFileOperations(getEndpoint().getConfiguration(), clientWrapper);
+ final Exchange exchange = getEndpoint().createExchange();
+
+ DataLakeOperationResponse response;
+
+ if (ObjectHelper.isNotEmpty(getEndpoint().getConfiguration().getFileDir())) {
+ response = operations.downloadToFile(exchange);
+ } else {
+ response = operations.getFile(exchange);
+ }
+
+ getEndpoint().setResponseOnExchange(response, exchange);
+
+ exchange.getIn().setHeader(DataLakeConstants.FILE_NAME, fileName);
+ return exchange;
+ }
+
+ @Override
+ public DataLakeEndpoint getEndpoint() {
+ return (DataLakeEndpoint) super.getEndpoint();
+ }
+
+ @Override
+ public int processBatch(Queue<Object> exchanges) {
+ final int total = exchanges.size();
+
+ for (int i = 0; i < total && isBatchAllowed(); i++) {
+ final Exchange exchange = ObjectHelper.cast(Exchange.class, exchanges.poll());
+
+ exchange.setProperty(Exchange.BATCH_INDEX, i);
+ exchange.setProperty(Exchange.BATCH_SIZE, total);
+ exchange.setProperty(Exchange.BATCH_COMPLETE, i == total - 1);
+
+ pendingExchanges = total - i - 1;
+
+ exchange.adapt(ExtendedExchange.class).addOnCompletion(new Synchronization() {
+ @Override
+ public void onComplete(Exchange exchange) {
+ LOG.trace("Processing all exchanges completed");
+
+ }
+
+ @Override
+ public void onFailure(Exchange exchange) {
+ processRollback(exchange);
+ }
+ });
+ getAsyncProcessor().process(exchange, doneSync -> LOG.trace("Processing exchange [{}] done.", exchange));
+ }
+
+ return total;
+ }
+
+ protected void processRollback(Exchange exchange) {
+ Exception exception = exchange.getException();
+ if (exception != null) {
+ LOG.warn("Exchange failed, rollback processed. Status: {}", exchange, exception);
+ } else {
+ LOG.warn("Exchange failed, rollback processed. Status: {}", exchange);
+ }
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpoint.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpoint.java
new file mode 100644
index 0000000..b8f1ba0
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeEndpoint.java
@@ -0,0 +1,97 @@
+/*
+ * 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.azure.storage.datalake;
+
+import com.azure.storage.file.datalake.DataLakeServiceClient;
+import org.apache.camel.Category;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeClientFactory;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeOperationResponse;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.support.DefaultEndpoint;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@UriEndpoint(firstVersion = "3.8.0", scheme = "azure-storage-datalake", title = "Azure storage datalake service",
+ syntax = "azure-storage-datalake:accountName/fileSystemName", category = { Category.CLOUD, Category.FILE })
+public class DataLakeEndpoint extends DefaultEndpoint {
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeEndpoint.class);
+
+ @UriParam(description = "service client of datalake")
+ private DataLakeServiceClient dataLakeServiceClient;
+
+ @UriParam(description = "configuration object of azure datalake")
+ private DataLakeConfiguration configuration;
+
+ public DataLakeEndpoint() {
+ }
+
+ public DataLakeEndpoint(final String uri, final Component component, final DataLakeConfiguration configuration) {
+ super(uri, component);
+ this.configuration = configuration;
+ }
+
+ @Override
+ public Producer createProducer() throws Exception {
+ return new DataLakeProducer(this);
+ }
+
+ @Override
+ public Consumer createConsumer(Processor processor) throws Exception {
+ return new DataLakeConsumer(this, processor);
+ }
+
+ public DataLakeConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(DataLakeConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
+ public DataLakeServiceClient getDataLakeServiceClient() {
+ return dataLakeServiceClient;
+ }
+
+ public void setDataLakeServiceClient(DataLakeServiceClient dataLakeServiceClient) {
+ this.dataLakeServiceClient = dataLakeServiceClient;
+ }
+
+ public void setResponseOnExchange(final DataLakeOperationResponse response, final Exchange exchange) {
+ final Message message = exchange.getIn();
+ message.setBody(response.getBody());
+ message.setHeaders(response.getHeaders());
+ }
+
+ @Override
+ protected void doStart() throws Exception {
+ super.doStart();
+
+ if (configuration.getServiceClient() != null) {
+ dataLakeServiceClient = configuration.getServiceClient();
+ } else {
+ dataLakeServiceClient = DataLakeClientFactory.createDataLakeServiceClient(configuration);
+ }
+ }
+
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeExchangeHeaders.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeExchangeHeaders.java
new file mode 100644
index 0000000..32bbde3
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeExchangeHeaders.java
@@ -0,0 +1,414 @@
+/*
+ * 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.azure.storage.datalake;
+
+import java.nio.file.OpenOption;
+import java.time.Duration;
+import java.time.OffsetDateTime;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Consumer;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.storage.common.ParallelTransferOptions;
+import com.azure.storage.file.datalake.models.AccessTier;
+import com.azure.storage.file.datalake.models.ArchiveStatus;
+import com.azure.storage.file.datalake.models.CopyStatusType;
+import com.azure.storage.file.datalake.models.DataLakeRequestConditions;
+import com.azure.storage.file.datalake.models.FileQueryError;
+import com.azure.storage.file.datalake.models.FileQueryProgress;
+import com.azure.storage.file.datalake.models.FileQuerySerialization;
+import com.azure.storage.file.datalake.models.FileRange;
+import com.azure.storage.file.datalake.models.FileReadHeaders;
+import com.azure.storage.file.datalake.models.LeaseDurationType;
+import com.azure.storage.file.datalake.models.LeaseStateType;
+import com.azure.storage.file.datalake.models.LeaseStatusType;
+import com.azure.storage.file.datalake.models.ListFileSystemsOptions;
+import com.azure.storage.file.datalake.models.ListPathsOptions;
+import com.azure.storage.file.datalake.models.PathHttpHeaders;
+import com.azure.storage.file.datalake.models.PathInfo;
+import com.azure.storage.file.datalake.models.PathProperties;
+import com.azure.storage.file.datalake.models.PublicAccessType;
+import com.azure.storage.file.datalake.options.FileQueryOptions;
+import org.apache.camel.Exchange;
+import org.apache.camel.util.ObjectHelper;
+
+public class DataLakeExchangeHeaders {
+ private final Map<String, Object> headers = new HashMap<>();
+
+ public static DataLakeExchangeHeaders createDataLakeExchangeHeadersFromPathProperties(final PathProperties properties) {
+ return new DataLakeExchangeHeaders()
+ .accessTier(properties.getAccessTier())
+ .accessTierChangrTime(properties.getAccessTierChangeTime())
+ .archiveStatus(properties.getArchiveStatus())
+ .cacheControl(properties.getCacheControl())
+ .contentDisposition(properties.getContentDisposition())
+ .contentEncoding(properties.getContentEncoding())
+ .contentLanguage(properties.getContentLanguage())
+ .contentMd5(properties.getContentMd5())
+ .contentType(properties.getContentType())
+ .copyCompletionTime(properties.getCopyCompletionTime())
+ .copyId(properties.getCopyId())
+ .copyProgress(properties.getCopyProgress())
+ .copySource(properties.getCopySource())
+ .copyStatus(properties.getCopyStatus())
+ .copyStatusDescription(properties.getCopyStatusDescription())
+ .creationTime(properties.getCreationTime())
+ .encryptionKeySha256(properties.getEncryptionKeySha256())
+ .eTag(properties.getETag())
+ .fileSize(properties.getFileSize())
+ .lastModified(properties.getLastModified())
+ .leaseDuration(properties.getLeaseDuration())
+ .leaseState(properties.getLeaseState())
+ .leaseStatus(properties.getLeaseStatus())
+ .metadata(properties.getMetadata())
+ .incrementalCopy(properties.isIncrementalCopy())
+ .serverEncrypted(properties.isServerEncrypted());
+ }
+
+ public static DataLakeExchangeHeaders createDataLakeExchangeHeadersFromPathInfo(final PathInfo pathInfo) {
+ return new DataLakeExchangeHeaders()
+ .eTag(pathInfo.getETag())
+ .lastModified(pathInfo.getLastModified());
+ }
+
+ public static DataLakeExchangeHeaders createDataLakeExchangeHeadersFromFileReadHeaders(
+ final FileReadHeaders fileReadHeaders) {
+ return createDataLakeExchangeHeadersFromPathProperties(buildPathProperties(fileReadHeaders));
+ }
+
+ private static PathProperties buildPathProperties(final FileReadHeaders rh) {
+ Long contentLength;
+ if (rh.getContentLength() == null) {
+ contentLength = 0L;
+ } else {
+ contentLength = rh.getContentLength();
+ }
+ return new PathProperties(
+ null, rh.getLastModified(), rh.getETag(), contentLength, rh.getContentType(),
+ null, rh.getContentEncoding(), rh.getContentDisposition(), rh.getContentLanguage(),
+ rh.getCacheControl(), rh.getLeaseStatus(), rh.getLeaseState(), rh.getLeaseDuration(), rh.getCopyId(),
+ rh.getCopyStatus(), rh.getCopySource(), rh.getCopyProgress(), rh.getCopyCompletionTime(),
+ rh.getCopyStatusDescription(),
+ rh.isServerEncrypted(), null, null, null, rh.getEncryptionKeySha256(),
+ null, rh.getMetadata());
+ }
+
+ public static ListFileSystemsOptions getListFileSystemOptionsFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.LIST_FILESYSTEMS_OPTIONS, ListFileSystemsOptions.class);
+ }
+
+ public static DataLakeExchangeHeaders create() {
+ return new DataLakeExchangeHeaders();
+ }
+
+ public static Duration getTimoutFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.TIMEOUT, Duration.class);
+ }
+
+ public static DataLakeOperationsDefinition getDataLakeOperationsDefinitionFromHeader(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.DATALAKE_OPERATION, DataLakeOperationsDefinition.class);
+ }
+
+ public static String getFileSystemNameFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.FILESYSTEM_NAME, String.class);
+ }
+
+ public static String getDirectoryNameFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.DIRECTORY_NAME, String.class);
+ }
+
+ public static String getFileNameFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.FILE_NAME, String.class);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static Map<String, String> getMedataFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.METADATA, Map.class);
+ }
+
+ public static PublicAccessType getPublicAccessTypeFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.PUBLIC_ACCESS_TYPE, PublicAccessType.class);
+ }
+
+ public static DataLakeRequestConditions getDataLakeRequestConditionsFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.DATALAKE_REQUEST_CONDITION, DataLakeRequestConditions.class);
+ }
+
+ public static ListPathsOptions getListPathsOptionsFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.LIST_PATH_OPTIONS, ListPathsOptions.class);
+ }
+
+ public static String getPathFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.PATH, String.class);
+ }
+
+ public static Boolean getRecursiveFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.RECURSIVE, Boolean.class);
+ }
+
+ public static Integer getMaxResultsFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.MAX_RESULTS, Integer.class);
+ }
+
+ public static Boolean getUserPrincipalNameReturnedFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.USER_PRINCIPAL_NAME_RETURNED, Boolean.class);
+ }
+
+ public static String getRegexFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.REGEX, String.class);
+ }
+
+ public static String getFileDirFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.FILE_DIR, String.class);
+ }
+
+ public static AccessTier getAccessTierFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.ACCESS_TIER, AccessTier.class);
+ }
+
+ public static byte[] getContendMd5FromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.CONTENT_MD5, byte[].class);
+ }
+
+ public static FileRange getFileRangeFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.FILE_RANGE, FileRange.class);
+ }
+
+ public static ParallelTransferOptions getParallelTransferOptionsFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.PARALLEL_TRANSFER_OPTIONS, ParallelTransferOptions.class);
+ }
+
+ public static Set<OpenOption> getOpenOptionsFromHeaders(final Exchange exchange) {
+ return (Set<OpenOption>) getObjectFromHeaders(exchange, DataLakeConstants.OPEN_OPTIONS, Set.class);
+ }
+
+ public static Long getDownloadLinkExpirationFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.DOWNLOAD_LINK_EXPIRATION, Long.class);
+ }
+
+ public static Long getFileOffsetFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.FILE_OFFSET, Long.class);
+ }
+
+ public static String getLeaseIdFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.LEASE_ID, String.class);
+ }
+
+ public static PathHttpHeaders getPathHttpHeadersFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.PATH_HTTP_HEADERS, PathHttpHeaders.class);
+ }
+
+ public static Boolean getRetainUncommittedDataFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.RETAIN_UNCOMMITED_DATA, Boolean.class);
+ }
+
+ public static Boolean getCloseFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.CLOSE, Boolean.class);
+ }
+
+ public static Long getPositionFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.POSITION, Long.class);
+ }
+
+ public static String getExpressionFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.EXPRESSION, String.class);
+ }
+
+ public static FileQuerySerialization getInputSerializationFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.INPUT_SERIALIZATION, FileQuerySerialization.class);
+ }
+
+ public static FileQuerySerialization getOutputSerializationFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.OUTPUT_SERIALIZATION, FileQuerySerialization.class);
+ }
+
+ public static Consumer<FileQueryError> getErrorConsumerFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.ERROR_CONSUMER, Consumer.class);
+ }
+
+ public static Consumer<FileQueryProgress> getProgressConsumerFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.PROGRESS_CONSUMER, Consumer.class);
+ }
+
+ public static FileQueryOptions getQueryOptionsFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.QUERY_OPTIONS, FileQueryOptions.class);
+ }
+
+ public static String getPermissionFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.PERMISSION, String.class);
+ }
+
+ public static String getUmaskFromHeaders(final Exchange exchange) {
+ return getObjectFromHeaders(exchange, DataLakeConstants.UMASK, String.class);
+ }
+
+ private static <T> T getObjectFromHeaders(final Exchange exchange, final String headerName, final Class<T> classType) {
+ return ObjectHelper.isEmpty(exchange) ? null : exchange.getIn().getHeader(headerName, classType);
+ }
+
+ public Map<String, Object> toMap() {
+ return headers;
+ }
+
+ public DataLakeExchangeHeaders httpHeaders(final HttpHeaders httpHeaders) {
+ headers.put(DataLakeConstants.RAW_HTTP_HEADERS, httpHeaders);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders accessTier(final AccessTier accessTier) {
+ headers.put(DataLakeConstants.ACCESS_TIER, accessTier);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders accessTierChangrTime(final OffsetDateTime accessTierChangeTime) {
+ headers.put(DataLakeConstants.ACCESS_TIER_CHANGE_TIME, accessTierChangeTime);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders archiveStatus(final ArchiveStatus archiveStatus) {
+ headers.put(DataLakeConstants.ARCHIVE_STATUS, archiveStatus);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders cacheControl(final String cacheControl) {
+ headers.put(DataLakeConstants.CACHE_CONTROL, cacheControl);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders contentDisposition(final String contentDisposition) {
+ headers.put(DataLakeConstants.CONTENT_DISPOSITION, contentDisposition);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders contentEncoding(final String contentEncoding) {
+ headers.put(DataLakeConstants.CONTENT_ENCODING, contentEncoding);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders contentLanguage(final String contentLanguage) {
+ headers.put(DataLakeConstants.CONTENT_LANGUAGE, contentLanguage);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders contentMd5(final byte[] contentMd5) {
+ headers.put(DataLakeConstants.CONTENT_MD5, contentMd5);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders contentType(final String contentType) {
+ headers.put(DataLakeConstants.CONTENT_TYPE, contentType);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders copyCompletionTime(final OffsetDateTime copyCompletionTime) {
+ headers.put(DataLakeConstants.COPY_COMPLETION_TIME, copyCompletionTime);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders copyId(final String copyId) {
+ headers.put(DataLakeConstants.COPY_ID, copyId);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders copyProgress(final String copyProgress) {
+ headers.put(DataLakeConstants.COPY_PROGRESS, copyProgress);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders copySource(final String copySource) {
+ headers.put(DataLakeConstants.COPY_SOURCE, copySource);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders copyStatus(final CopyStatusType copyStatus) {
+ headers.put(DataLakeConstants.COPY_STATUS, copyStatus);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders copyStatusDescription(final String copyStatusDescription) {
+ headers.put(DataLakeConstants.COPY_STATUS_DESCRIPTION, copyStatusDescription);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders creationTime(final OffsetDateTime creationTime) {
+ headers.put(DataLakeConstants.CREATION_TIME, creationTime);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders encryptionKeySha256(final String key) {
+ headers.put(DataLakeConstants.ENCRYPTION_KEY_SHA_256, key);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders eTag(final String eTag) {
+ headers.put(DataLakeConstants.E_TAG, eTag);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders fileSize(final Long fileSize) {
+ headers.put(DataLakeConstants.FILE_SIZE, fileSize);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders lastModified(final OffsetDateTime lastModified) {
+ headers.put(DataLakeConstants.LAST_MODIFIED, lastModified);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders leaseDuration(final LeaseDurationType leaseDuration) {
+ headers.put(DataLakeConstants.LEASE_DURATION, leaseDuration);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders leaseState(final LeaseStateType leaseState) {
+ headers.put(DataLakeConstants.LEASE_STATE, leaseState);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders leaseStatus(final LeaseStatusType leaseStatus) {
+ headers.put(DataLakeConstants.LEASE_STATUS, leaseStatus);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders metadata(final Map<String, String> metadata) {
+ headers.put(DataLakeConstants.METADATA, metadata);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders incrementalCopy(final Boolean incrementalCopy) {
+ headers.put(DataLakeConstants.INCREMENTAL_COPY, incrementalCopy);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders serverEncrypted(final Boolean serverEncrypted) {
+ headers.put(DataLakeConstants.SERVER_ENCRYPTED, serverEncrypted);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders fileName(final String fileName) {
+ headers.put(DataLakeConstants.FILE_NAME, fileName);
+ return this;
+ }
+
+ public DataLakeExchangeHeaders downloadLink(final String downloadLink) {
+ headers.put(DataLakeConstants.DOWNLOAD_LINK, downloadLink);
+ return this;
+ }
+
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeOperationsDefinition.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeOperationsDefinition.java
new file mode 100644
index 0000000..c7bb21b
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeOperationsDefinition.java
@@ -0,0 +1,35 @@
+/*
+ * 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.azure.storage.datalake;
+
+public enum DataLakeOperationsDefinition {
+ listFileSystem,
+ createFileSystem,
+ deleteFileSystem,
+ listPaths,
+ getFile,
+ downloadToFile,
+ downloadLink,
+ deleteFile,
+ appendToFile,
+ flushToFile,
+ uploadFromFile,
+ upload,
+ openQueryInputStream,
+ createFile,
+ deleteDirectory
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeProducer.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeProducer.java
new file mode 100644
index 0000000..1f463ce
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeProducer.java
@@ -0,0 +1,172 @@
+/*
+ * 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.azure.storage.datalake;
+
+import java.io.IOException;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeDirectoryClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileSystemClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeServiceClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeDirectoryOperations;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeFileOperations;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeFileSystemOperations;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeOperationResponse;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeServiceOperations;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataLakeProducer extends DefaultProducer {
+
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeProducer.class);
+ private final DataLakeConfiguration configuration;
+ private final DataLakeConfigurationOptionsProxy configurationProxy;
+ private final DataLakeServiceClientWrapper dataLakeServiceClientWrapper;
+
+ public DataLakeProducer(final Endpoint endpoint) {
+ super(endpoint);
+ // this.configuration = getEndpoint().getConfiguration();
+ configuration = getEndpoint().getConfiguration();
+ configurationProxy = new DataLakeConfigurationOptionsProxy(configuration);
+ dataLakeServiceClientWrapper = new DataLakeServiceClientWrapper(getEndpoint().getDataLakeServiceClient());
+ }
+
+ @Override
+ public DataLakeEndpoint getEndpoint() {
+ return (DataLakeEndpoint) super.getEndpoint();
+ }
+
+ @Override
+ public void process(Exchange exchange) throws IllegalArgumentException, IOException {
+ DataLakeOperationsDefinition operation = determineOperation(exchange);
+ switch (operation) {
+ case listFileSystem:
+ setResponse(exchange, getServiceOperations(exchange).listFileSystems(exchange));
+ break;
+ case createFileSystem:
+ setResponse(exchange, getFileSystemOperations(exchange).createFileSystem(exchange));
+ break;
+ case deleteFileSystem:
+ setResponse(exchange, getFileSystemOperations(exchange).deleteFileSystem(exchange));
+ break;
+ case listPaths:
+ setResponse(exchange, getFileSystemOperations(exchange).listPaths(exchange));
+ break;
+ case getFile:
+ setResponse(exchange, getFileOperations(exchange).getFile(exchange));
+ break;
+ case downloadToFile:
+ setResponse(exchange, getFileOperations(exchange).downloadToFile(exchange));
+ break;
+ case downloadLink:
+ setResponse(exchange, getFileOperations(exchange).downloadLink(exchange));
+ break;
+ case deleteFile:
+ setResponse(exchange, getFileOperations(exchange).deleteFile(exchange));
+ break;
+ case appendToFile:
+ setResponse(exchange, getFileOperations(exchange).appendToFile(exchange));
+ break;
+ case flushToFile:
+ setResponse(exchange, getFileOperations(exchange).flushToFile(exchange));
+ break;
+ case uploadFromFile:
+ setResponse(exchange, getFileOperations(exchange).uploadFromFile(exchange));
+ break;
+ case openQueryInputStream:
+ setResponse(exchange, getFileOperations(exchange).openQueryInputStream(exchange));
+ break;
+ case upload:
+ setResponse(exchange, getFileOperations(exchange).upload(exchange));
+ break;
+ case createFile:
+ setResponse(exchange, getDirectoryOperations(exchange).createFile(exchange));
+ break;
+ case deleteDirectory:
+ setResponse(exchange, getDirectoryOperations(exchange).deleteDirectory(exchange));
+ break;
+ default:
+ throw new IllegalArgumentException("Unsupported operation");
+ }
+ }
+
+ private void setResponse(final Exchange exchange, final DataLakeOperationResponse dataLakeOperationResponse) {
+ exchange.getMessage().setBody(dataLakeOperationResponse.getBody());
+ exchange.getMessage().setHeaders(dataLakeOperationResponse.getHeaders());
+ }
+
+ private DataLakeOperationsDefinition determineOperation(final Exchange exchange) {
+ return configurationProxy.getOperation(exchange);
+ }
+
+ private DataLakeServiceOperations getServiceOperations(final Exchange exchange) {
+ return new DataLakeServiceOperations(configuration, dataLakeServiceClientWrapper);
+ }
+
+ private DataLakeFileSystemOperations getFileSystemOperations(final Exchange exchange) {
+ final DataLakeFileSystemClientWrapper clientWrapper
+ = dataLakeServiceClientWrapper.getDataLakeFileSystemClientWrapper(determineFileSystemName(exchange));
+
+ return new DataLakeFileSystemOperations(configuration, clientWrapper);
+ }
+
+ private DataLakeDirectoryOperations getDirectoryOperations(final Exchange exchange) {
+ final DataLakeDirectoryClientWrapper clientWrapper
+ = dataLakeServiceClientWrapper.getDataLakeFileSystemClientWrapper(determineFileSystemName(exchange))
+ .getDataLakeDirectoryClientWrapper(determineDirectoryName(exchange));
+
+ return new DataLakeDirectoryOperations(configuration, clientWrapper);
+ }
+
+ private DataLakeFileOperations getFileOperations(final Exchange exchange) {
+ final DataLakeFileClientWrapper clientWrapper
+ = dataLakeServiceClientWrapper.getDataLakeFileSystemClientWrapper(determineFileSystemName(exchange))
+ .getDataLakeFileClientWrapper(determineFileName(exchange));
+
+ return new DataLakeFileOperations(configuration, clientWrapper);
+ }
+
+ private String determineFileSystemName(final Exchange exchange) {
+ final String fileSystemName = configurationProxy.getFileSystemName(exchange);
+ if (ObjectHelper.isEmpty(fileSystemName)) {
+ throw new IllegalArgumentException("File system name must be specified.");
+ }
+ return fileSystemName;
+ }
+
+ private String determineDirectoryName(final Exchange exchange) {
+ final String directoryName = configurationProxy.getDirectoryName(exchange);
+
+ if (ObjectHelper.isEmpty(directoryName)) {
+ throw new IllegalArgumentException("Directory name must be specified");
+ }
+ return directoryName;
+ }
+
+ private String determineFileName(final Exchange exchange) {
+ final String fileName = configurationProxy.getFileName(exchange);
+ if (ObjectHelper.isEmpty(fileName)) {
+ throw new IllegalArgumentException("File name must be specified");
+ }
+ return fileName;
+ }
+
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeUtils.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeUtils.java
new file mode 100644
index 0000000..e0e289f
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/DataLakeUtils.java
@@ -0,0 +1,48 @@
+/*
+ * 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.azure.storage.datalake;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.commons.io.IOUtils;
+
+public final class DataLakeUtils {
+ private DataLakeUtils() {
+ }
+
+ public static Message getInMessage(final Exchange exchange) {
+ if (ObjectHelper.isEmpty(exchange)) {
+ return null;
+ }
+ return exchange.getIn();
+ }
+
+ public static Long getInputStreamLength(final InputStream inputStream) throws IOException {
+ if (!inputStream.markSupported()) {
+ throw new IllegalArgumentException("Inputstream with mark reset support required");
+ }
+
+ final long length = IOUtils.toByteArray(inputStream).length;
+ inputStream.reset();
+
+ return length;
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/FileCommonRequestOptions.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/FileCommonRequestOptions.java
new file mode 100644
index 0000000..ffd3eac
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/FileCommonRequestOptions.java
@@ -0,0 +1,78 @@
+/*
+ * 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.azure.storage.datalake;
+
+import java.time.Duration;
+import java.util.Map;
+
+import com.azure.storage.file.datalake.models.AccessTier;
+import com.azure.storage.file.datalake.models.DataLakeRequestConditions;
+import com.azure.storage.file.datalake.models.PathHttpHeaders;
+
+public class FileCommonRequestOptions {
+ private final PathHttpHeaders pathHttpHeaders;
+ private final Map<String, String> metadata;
+ private final AccessTier accessTier;
+ private final DataLakeRequestConditions requestConditions;
+ private final byte[] contentMD5;
+ private final Duration timeout;
+
+ public FileCommonRequestOptions(PathHttpHeaders pathHttpHeaders, Map<String, String> metadata, AccessTier accessTier,
+ DataLakeRequestConditions requestConditions, byte[] contentMD5, Duration timeout) {
+ this.pathHttpHeaders = pathHttpHeaders;
+ this.metadata = metadata;
+ this.accessTier = accessTier;
+ this.requestConditions = requestConditions;
+ this.contentMD5 = contentMD5;
+ this.timeout = timeout;
+ }
+
+ public Map<String, String> getMetadata() {
+ return metadata;
+ }
+
+ public AccessTier getAccessTier() {
+ return accessTier;
+ }
+
+ public <T extends DataLakeRequestConditions> T getRequestConditions() {
+ if (requestConditions == null) {
+ return null;
+ }
+ return (T) requestConditions;
+ }
+
+ public PathHttpHeaders getPathHttpHeaders() {
+ return pathHttpHeaders;
+ }
+
+ public byte[] getContentMD5() {
+ return contentMD5;
+ }
+
+ public Duration getTimeout() {
+ return timeout;
+ }
+
+ public String getLeaseId() {
+ if (requestConditions == null) {
+ return null;
+ } else {
+ return requestConditions.getLeaseId();
+ }
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/FileStreamAndLength.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/FileStreamAndLength.java
new file mode 100644
index 0000000..44abf44
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/FileStreamAndLength.java
@@ -0,0 +1,78 @@
+/*
+ * 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.azure.storage.datalake;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.WrappedFile;
+
+public final class FileStreamAndLength {
+ private final InputStream inputStream;
+ private final long streamLength;
+
+ private FileStreamAndLength(InputStream inputStream, long streamLength) {
+ this.inputStream = inputStream;
+ this.streamLength = streamLength;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public static FileStreamAndLength createFileStreamAndLengthFromExchangeBody(final Exchange exchange) throws IOException {
+ Object body = exchange.getIn().getBody();
+
+ if (body instanceof WrappedFile) {
+ body = ((WrappedFile) body).getFile();
+ }
+
+ if (body instanceof InputStream) {
+ if (!((InputStream) body).markSupported()) {
+ throw new IllegalArgumentException("Inputstream does not support mark rest operations");
+ }
+ return new FileStreamAndLength((InputStream) body, DataLakeUtils.getInputStreamLength((InputStream) body));
+ }
+
+ if (body instanceof File) {
+ return new FileStreamAndLength(new BufferedInputStream(new FileInputStream((File) body)), ((File) body).length());
+ }
+
+ if (body instanceof byte[]) {
+ return new FileStreamAndLength(new ByteArrayInputStream((byte[]) body), ((byte[]) body).length);
+ }
+
+ final InputStream inputStream
+ = exchange.getContext().getTypeConverter().tryConvertTo(InputStream.class, exchange, body);
+
+ if (inputStream == null) {
+ throw new IllegalArgumentException("Unsupported file type");
+ }
+
+ return new FileStreamAndLength(inputStream, DataLakeUtils.getInputStreamLength(inputStream));
+ }
+
+ public InputStream getInputStream() {
+ return inputStream;
+ }
+
+ public long getStreamLength() {
+ return streamLength;
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeClientFactory.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeClientFactory.java
new file mode 100644
index 0000000..4240d2b
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeClientFactory.java
@@ -0,0 +1,94 @@
+/*
+ * 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.azure.storage.datalake.client;
+
+import java.util.Locale;
+
+import com.azure.identity.ClientSecretCredential;
+import com.azure.identity.ClientSecretCredentialBuilder;
+import com.azure.storage.common.StorageSharedKeyCredential;
+import com.azure.storage.file.datalake.DataLakeServiceClient;
+import com.azure.storage.file.datalake.DataLakeServiceClientBuilder;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class DataLakeClientFactory {
+
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeClientFactory.class);
+ private static final String SERVICE_URI_SEGMENT = ".dfs.core.windows.net";
+
+ private DataLakeClientFactory() {
+ }
+
+ public static DataLakeServiceClient createDataLakeServiceClient(final DataLakeConfiguration configuration) {
+ final DataLakeServiceClient client;
+ if (configuration.getServiceClient() != null) {
+ client = configuration.getServiceClient();
+ } else if (configuration.getAccountKey() != null || configuration.getSharedKeyCredential() != null) {
+ client = createDataLakeServiceClientWithSharedKey(configuration);
+ } else {
+ client = createDataLakeServiceClientWithClientSecret(configuration);
+ }
+ return client;
+ }
+
+ private static DataLakeServiceClient createDataLakeServiceClientWithSharedKey(final DataLakeConfiguration configuration) {
+ StorageSharedKeyCredential sharedKeyCredential = configuration.getSharedKeyCredential();
+ if (sharedKeyCredential == null) {
+ sharedKeyCredential = new StorageSharedKeyCredential(configuration.getAccountName(), configuration.getAccountKey());
+ }
+
+ return new DataLakeServiceClientBuilder()
+ .credential(sharedKeyCredential)
+ .endpoint(buildAzureUri(configuration))
+ .buildClient();
+ }
+
+ private static DataLakeServiceClient createDataLakeServiceClientWithClientSecret(
+ final DataLakeConfiguration configuration) {
+ ClientSecretCredential clientSecretCredential = configuration.getClientSecretCredential();
+
+ if (clientSecretCredential == null) {
+ clientSecretCredential = new ClientSecretCredentialBuilder()
+ .clientId(configuration.getClientId())
+ .clientSecret(configuration.getClientSecret())
+ .tenantId(configuration.getTenantId())
+ .build();
+ }
+
+ return new DataLakeServiceClientBuilder()
+ .credential(clientSecretCredential)
+ .endpoint(buildAzureUri(configuration))
+ .buildClient();
+ }
+
+ private static String buildAzureUri(final DataLakeConfiguration configuration) {
+ return String.format(Locale.ROOT, "https://%s" + SERVICE_URI_SEGMENT, getAccountName(configuration));
+ }
+
+ private static String getAccountName(final DataLakeConfiguration configuration) {
+ String accountName;
+ if (ObjectHelper.isNotEmpty(configuration.getSharedKeyCredential())) {
+ accountName = configuration.getSharedKeyCredential().getAccountName();
+ } else {
+ accountName = configuration.getAccountName();
+ }
+ return accountName;
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeDirectoryClientWrapper.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeDirectoryClientWrapper.java
new file mode 100644
index 0000000..eb047ca
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeDirectoryClientWrapper.java
@@ -0,0 +1,56 @@
+/*
+ * 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.azure.storage.datalake.client;
+
+import java.time.Duration;
+import java.util.Map;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.storage.file.datalake.DataLakeDirectoryClient;
+import com.azure.storage.file.datalake.DataLakeFileClient;
+import com.azure.storage.file.datalake.models.DataLakeRequestConditions;
+import com.azure.storage.file.datalake.models.PathHttpHeaders;
+import org.apache.camel.util.ObjectHelper;
+
+public class DataLakeDirectoryClientWrapper {
+ private final DataLakeDirectoryClient client;
+
+ public DataLakeDirectoryClientWrapper(final DataLakeDirectoryClient directoryClient) {
+ ObjectHelper.notNull(directoryClient, "directory client cant be null");
+ client = directoryClient;
+ }
+
+ public Response<DataLakeFileClient> createFileWithResponse(
+ final String fileName, final String permission, final String umask, final PathHttpHeaders headers,
+ final Map<String, String> metadata, final DataLakeRequestConditions requestConditions, final Duration timeout) {
+ return client.createFileWithResponse(fileName, permission, umask, headers, metadata, requestConditions, timeout,
+ Context.NONE);
+ }
+
+ public Response<Void> deleteWithResponse(
+ final Boolean recursive, final DataLakeRequestConditions requestConditions, final Duration timeout) {
+ return client.deleteWithResponse(recursive, requestConditions, timeout, Context.NONE);
+ }
+
+ public DataLakeFileClientWrapper getDataLakeFileClientWrapper(final String fileName) {
+ if (!ObjectHelper.isEmpty(fileName)) {
+ return new DataLakeFileClientWrapper(client.getFileClient(fileName));
+ }
+ throw new IllegalArgumentException("Cannot initialize a file since no file name was provided.");
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileClientWrapper.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileClientWrapper.java
new file mode 100644
index 0000000..3d9f7bd
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileClientWrapper.java
@@ -0,0 +1,130 @@
+/*
+ * 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.azure.storage.datalake.client;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.file.OpenOption;
+import java.time.Duration;
+import java.util.Map;
+import java.util.Set;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.storage.common.ParallelTransferOptions;
+import com.azure.storage.file.datalake.DataLakeFileClient;
+import com.azure.storage.file.datalake.models.DataLakeRequestConditions;
+import com.azure.storage.file.datalake.models.DownloadRetryOptions;
+import com.azure.storage.file.datalake.models.FileRange;
+import com.azure.storage.file.datalake.models.FileReadResponse;
+import com.azure.storage.file.datalake.models.PathHttpHeaders;
+import com.azure.storage.file.datalake.models.PathInfo;
+import com.azure.storage.file.datalake.models.PathProperties;
+import com.azure.storage.file.datalake.options.FileParallelUploadOptions;
+import com.azure.storage.file.datalake.options.FileQueryOptions;
+import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues;
+
+public class DataLakeFileClientWrapper {
+ private final DataLakeFileClient client;
+
+ public DataLakeFileClientWrapper(DataLakeFileClient client) {
+ this.client = client;
+ }
+
+ public String getFileName() {
+ return client.getFileName();
+ }
+
+ public String getFileUrl() {
+ return client.getFileUrl();
+ }
+
+ public Long getFileSize() {
+ return client.getProperties().getFileSize();
+ }
+
+ public Response<Void> delete(DataLakeRequestConditions accessConditions, Duration timeout) {
+ return client.deleteWithResponse(accessConditions, timeout, Context.NONE);
+ }
+
+ public InputStream openInputStream() {
+ String query = "SELECT * from BlobStorage";
+ return client.openQueryInputStream(query);
+ }
+
+ public Response<InputStream> openQueryInputStreamWithResponse(final FileQueryOptions queryOptions) {
+ return client.openQueryInputStreamWithResponse(queryOptions);
+ }
+
+ public FileReadResponse downloadWithResponse(
+ final OutputStream outputStream, final FileRange fileRange, final DownloadRetryOptions downloadRetryOptions,
+ final DataLakeRequestConditions requestConditions, final boolean rangeGetContentMd5, final Duration timeout) {
+ return client.readWithResponse(outputStream, fileRange, downloadRetryOptions, requestConditions, rangeGetContentMd5,
+ timeout, Context.NONE);
+ }
+
+ public Response<PathProperties> downloadToFileWithResponse(
+ final String filePath, final FileRange fileRange, final ParallelTransferOptions parallelTransferOptions,
+ final DownloadRetryOptions downloadRetryOptions, final DataLakeRequestConditions requestConditions,
+ final boolean rangeGetContentMd5, final Set<OpenOption> openOptions, final Duration timeout) {
+ return client.readToFileWithResponse(filePath, fileRange, parallelTransferOptions, downloadRetryOptions,
+ requestConditions,
+ rangeGetContentMd5, openOptions, timeout, Context.NONE);
+ }
+
+ public Response<PathInfo> createWithResponse(
+ final String permissions, final String umask, final PathHttpHeaders headers, final Map<String, String> metadata,
+ final DataLakeRequestConditions requestConditions, final Duration timeout) {
+ return client.createWithResponse(permissions, umask, headers, metadata, requestConditions, timeout, Context.NONE);
+ }
+
+ public Response<PathInfo> flushWithResponse(
+ final long position, final Boolean retainUncommitedData, final Boolean close, final PathHttpHeaders headers,
+ final DataLakeRequestConditions requestConditions, final Duration timeout) {
+ return client.flushWithResponse(position, retainUncommitedData, close, headers, requestConditions, timeout,
+ Context.NONE);
+ }
+
+ public Response<Void> appendWithResponse(
+ final InputStream stream, final Long fileOffset, final Long length,
+ final byte[] contentMd5, final String leaseId, final Duration timeout) {
+ return client.appendWithResponse(stream, fileOffset, length, contentMd5, leaseId, timeout, Context.NONE);
+ }
+
+ public Response<PathInfo> uploadWithResponse(final FileParallelUploadOptions uploadOptions, final Duration timeout) {
+ return client.uploadWithResponse(uploadOptions, timeout, Context.NONE);
+ }
+
+ public Response<DataLakeFileClient> renameWithResponse(
+ final String destFileSystem, final String destPath, final DataLakeRequestConditions sourceAccessConditions,
+ final DataLakeRequestConditions destAccessConditions, final Duration timeout) {
+ return client.renameWithResponse(destFileSystem, destPath, sourceAccessConditions, destAccessConditions, timeout,
+ Context.NONE);
+ }
+
+ public void uploadFromFile(
+ final String filePath, final ParallelTransferOptions parallelTransferOptions, final PathHttpHeaders headers,
+ final Map<String, String> metadata, final DataLakeRequestConditions requestConditions,
+ final Duration timeout) {
+ client.uploadFromFile(filePath, parallelTransferOptions, headers, metadata, requestConditions, timeout);
+ }
+
+ public String generateSas(final DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues) {
+ return client.generateSas(dataLakeServiceSasSignatureValues);
+ }
+
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileSystemClientWrapper.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileSystemClientWrapper.java
new file mode 100644
index 0000000..f4fd99a
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeFileSystemClientWrapper.java
@@ -0,0 +1,70 @@
+/*
+ * 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.azure.storage.datalake.client;
+
+import java.time.Duration;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.util.Context;
+import com.azure.storage.file.datalake.DataLakeFileSystemClient;
+import com.azure.storage.file.datalake.models.DataLakeRequestConditions;
+import com.azure.storage.file.datalake.models.ListPathsOptions;
+import com.azure.storage.file.datalake.models.PathItem;
+import com.azure.storage.file.datalake.models.PublicAccessType;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataLakeFileSystemClientWrapper {
+
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeFileSystemClientWrapper.class);
+ private final DataLakeFileSystemClient client;
+
+ public DataLakeFileSystemClientWrapper(final DataLakeFileSystemClient client) {
+ this.client = client;
+ }
+
+ public HttpHeaders createFileSystem(
+ final Map<String, String> metadata, final PublicAccessType publicAccessType, final Duration timeout) {
+ return client.createWithResponse(metadata, publicAccessType, timeout, Context.NONE).getHeaders();
+ }
+
+ public HttpHeaders deleteFileSystem(final DataLakeRequestConditions dataLakeRequestConditions, final Duration timeout) {
+ return client.deleteWithResponse(dataLakeRequestConditions, timeout, Context.NONE).getHeaders();
+ }
+
+ public List<PathItem> listPaths(final ListPathsOptions listPathsOptions, final Duration timeout) {
+ return client.listPaths(listPathsOptions, timeout).stream().collect(Collectors.toList());
+ }
+
+ public DataLakeDirectoryClientWrapper getDataLakeDirectoryClientWrapper(final String directoryName) {
+ if (!ObjectHelper.isEmpty(directoryName)) {
+ return new DataLakeDirectoryClientWrapper(client.getDirectoryClient(directoryName));
+ }
+ throw new IllegalArgumentException("Cannot initialize a directory since no directory name was provided.");
+ }
+
+ public DataLakeFileClientWrapper getDataLakeFileClientWrapper(final String fileName) {
+ if (!ObjectHelper.isEmpty(fileName)) {
+ return new DataLakeFileClientWrapper(client.getFileClient(fileName));
+ }
+ throw new IllegalArgumentException("Cannot initialize a directory since no directory name was provided.");
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeServiceClientWrapper.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeServiceClientWrapper.java
new file mode 100644
index 0000000..339ef36
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/client/DataLakeServiceClientWrapper.java
@@ -0,0 +1,47 @@
+/*
+ * 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.azure.storage.datalake.client;
+
+import java.time.Duration;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import com.azure.storage.file.datalake.DataLakeServiceClient;
+import com.azure.storage.file.datalake.models.FileSystemItem;
+import com.azure.storage.file.datalake.models.ListFileSystemsOptions;
+import org.apache.camel.util.ObjectHelper;
+
+public class DataLakeServiceClientWrapper {
+ private final DataLakeServiceClient client;
+
+ public DataLakeServiceClientWrapper(final DataLakeServiceClient client) {
+ ObjectHelper.notNull(client, "client cannot be null");
+
+ this.client = client;
+ }
+
+ public List<FileSystemItem> listFileSystems(final ListFileSystemsOptions options, final Duration timeout) {
+ return client.listFileSystems(options, timeout).stream().collect(Collectors.toList());
+ }
+
+ public DataLakeFileSystemClientWrapper getDataLakeFileSystemClientWrapper(final String fileSystemName) {
+ if (!ObjectHelper.isEmpty(fileSystemName)) {
+ return new DataLakeFileSystemClientWrapper(client.getFileSystemClient(fileSystemName));
+ }
+ throw new IllegalArgumentException("cannot inititialize a fileSystem since no file system name was provided");
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeDirectoryOperations.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeDirectoryOperations.java
new file mode 100644
index 0000000..c344ace
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeDirectoryOperations.java
@@ -0,0 +1,69 @@
+/*
+ * 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.azure.storage.datalake.operations;
+
+import java.time.Duration;
+import java.util.Map;
+
+import com.azure.core.http.rest.Response;
+import com.azure.storage.file.datalake.DataLakeFileClient;
+import com.azure.storage.file.datalake.models.DataLakeRequestConditions;
+import com.azure.storage.file.datalake.models.PathHttpHeaders;
+import org.apache.camel.Exchange;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfigurationOptionsProxy;
+import org.apache.camel.component.azure.storage.datalake.DataLakeExchangeHeaders;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeDirectoryClientWrapper;
+import org.apache.camel.util.ObjectHelper;
+
+public class DataLakeDirectoryOperations {
+ private final DataLakeDirectoryClientWrapper client;
+ private final DataLakeConfigurationOptionsProxy configurationProxy;
+
+ public DataLakeDirectoryOperations(final DataLakeConfiguration configuration, final DataLakeDirectoryClientWrapper client) {
+ ObjectHelper.notNull(client, "client cannot be null");
+ this.client = client;
+ configurationProxy = new DataLakeConfigurationOptionsProxy(configuration);
+ }
+
+ public DataLakeOperationResponse createFile(final Exchange exchange) {
+ final String fileName = configurationProxy.getFileName(exchange);
+ final String permission = configurationProxy.getPermission(exchange);
+ final String umask = configurationProxy.getUmask(exchange);
+ final PathHttpHeaders httpHeaders = configurationProxy.getPathHttpHeaders(exchange);
+ final Map<String, String> metadata = configurationProxy.getMetadata(exchange);
+ final DataLakeRequestConditions requestConditions = configurationProxy.getDataLakeRequestConditions(exchange);
+ final Duration timeout = configurationProxy.getTimeout(exchange);
+
+ final Response<DataLakeFileClient> response = client.createFileWithResponse(fileName, permission, umask,
+ httpHeaders, metadata, requestConditions, timeout);
+ DataLakeExchangeHeaders exchangeHeaders = DataLakeExchangeHeaders.create().httpHeaders(response.getHeaders());
+ return new DataLakeOperationResponse(response.getValue(), exchangeHeaders.toMap());
+ }
+
+ public DataLakeOperationResponse deleteDirectory(final Exchange exchange) {
+ final Boolean recursive = configurationProxy.isRecursive(exchange);
+ final DataLakeRequestConditions requestConditions = configurationProxy.getDataLakeRequestConditions(exchange);
+ final Duration timeout = configurationProxy.getTimeout(exchange);
+
+ final Response<Void> response = client.deleteWithResponse(recursive, requestConditions, timeout);
+
+ DataLakeExchangeHeaders exchangeHeaders = DataLakeExchangeHeaders.create().httpHeaders(response.getHeaders());
+
+ return new DataLakeOperationResponse(true, exchangeHeaders.toMap());
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileOperations.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileOperations.java
new file mode 100644
index 0000000..dce074c
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileOperations.java
@@ -0,0 +1,240 @@
+/*
+ * 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.azure.storage.datalake.operations;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.file.OpenOption;
+import java.time.Duration;
+import java.time.OffsetDateTime;
+import java.util.Map;
+import java.util.Set;
+
+import com.azure.core.http.rest.Response;
+import com.azure.storage.common.ParallelTransferOptions;
+import com.azure.storage.file.datalake.models.AccessTier;
+import com.azure.storage.file.datalake.models.DataLakeRequestConditions;
+import com.azure.storage.file.datalake.models.DownloadRetryOptions;
+import com.azure.storage.file.datalake.models.FileRange;
+import com.azure.storage.file.datalake.models.FileReadResponse;
+import com.azure.storage.file.datalake.models.PathHttpHeaders;
+import com.azure.storage.file.datalake.models.PathInfo;
+import com.azure.storage.file.datalake.models.PathProperties;
+import com.azure.storage.file.datalake.options.FileParallelUploadOptions;
+import com.azure.storage.file.datalake.options.FileQueryOptions;
+import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues;
+import com.azure.storage.file.datalake.sas.PathSasPermission;
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfigurationOptionsProxy;
+import org.apache.camel.component.azure.storage.datalake.DataLakeExchangeHeaders;
+import org.apache.camel.component.azure.storage.datalake.DataLakeUtils;
+import org.apache.camel.component.azure.storage.datalake.FileCommonRequestOptions;
+import org.apache.camel.component.azure.storage.datalake.FileStreamAndLength;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileClientWrapper;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataLakeFileOperations {
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeFileOperations.class);
+ private final DataLakeFileClientWrapper client;
+ private final DataLakeConfigurationOptionsProxy configurationProxy;
+
+ public DataLakeFileOperations(final DataLakeConfiguration configuration, final DataLakeFileClientWrapper client) {
+ this.client = client;
+ configurationProxy = new DataLakeConfigurationOptionsProxy(configuration);
+ }
+
+ public DataLakeOperationResponse getFile(final Exchange exchange) throws IOException {
+ final Message message = DataLakeUtils.getInMessage(exchange);
+ final OutputStream outputStream;
+ if (ObjectHelper.isEmpty(message)) {
+ outputStream = null;
+ } else {
+ outputStream = message.getBody(OutputStream.class);
+ }
+
+ if (outputStream == null) {
+ InputStream fileInputStream = client.openInputStream();
+ return new DataLakeOperationResponse(fileInputStream);
+ }
+
+ final FileRange fileRange = configurationProxy.getFileRange(exchange);
+ final FileCommonRequestOptions fileCommonRequestOptions = getCommonRequestOptions(exchange);
+
+ final DownloadRetryOptions downloadRetryOptions = getDownloadRetryOptions(configurationProxy);
+
+ try {
+ final FileReadResponse readResponse = client.downloadWithResponse(outputStream, fileRange, downloadRetryOptions,
+ fileCommonRequestOptions.getRequestConditions(), fileCommonRequestOptions.getContentMD5() != null,
+ fileCommonRequestOptions.getTimeout());
+
+ final DataLakeExchangeHeaders dataLakeExchangeHeaders = DataLakeExchangeHeaders
+ .createDataLakeExchangeHeadersFromFileReadHeaders(readResponse.getDeserializedHeaders())
+ .httpHeaders(readResponse.getHeaders());
+
+ return new DataLakeOperationResponse(outputStream, dataLakeExchangeHeaders.toMap());
+ } finally {
+ if (configurationProxy.getConfiguration().getCloseStreamAfterRead()) {
+ outputStream.close();
+ }
+ }
+ }
+
+ public DataLakeOperationResponse downloadToFile(final Exchange exchange) {
+ final String fileDir = configurationProxy.getFileDir(exchange);
+ if (ObjectHelper.isEmpty(fileDir)) {
+ throw new IllegalArgumentException("to download a file, you need to specify the fileDir in the URI");
+ }
+
+ final File recieverFile = new File(fileDir, client.getFileName());
+ final FileCommonRequestOptions commonRequestOptions = getCommonRequestOptions(exchange);
+ final FileRange fileRange = configurationProxy.getFileRange(exchange);
+ final ParallelTransferOptions parallelTransferOptions = configurationProxy.getParallelTransferOptions(exchange);
+ final DownloadRetryOptions downloadRetryOptions = getDownloadRetryOptions(configurationProxy);
+ final Set<OpenOption> openOptions = configurationProxy.getOpenOptions(exchange);
+
+ final Response<PathProperties> response = client.downloadToFileWithResponse(recieverFile.toString(), fileRange,
+ parallelTransferOptions, downloadRetryOptions, commonRequestOptions.getRequestConditions(),
+ commonRequestOptions.getContentMD5() != null, openOptions, commonRequestOptions.getTimeout());
+ final DataLakeExchangeHeaders exchangeHeaders
+ = DataLakeExchangeHeaders.createDataLakeExchangeHeadersFromPathProperties(response.getValue())
+ .httpHeaders(response.getHeaders())
+ .fileName(recieverFile.toString());
+
+ return new DataLakeOperationResponse(recieverFile, exchangeHeaders.toMap());
+ }
+
+ public DataLakeOperationResponse downloadLink(final Exchange exchange) {
+ final OffsetDateTime offsetDateTime = OffsetDateTime.now();
+ final PathSasPermission sasPermission = new PathSasPermission().setReadPermission(true);
+ final Long expirationMillis = configurationProxy.getDownloadLinkExpiration(exchange);
+
+ OffsetDateTime offsetDateTimeToSet;
+ if (expirationMillis != null) {
+ offsetDateTimeToSet = offsetDateTime.plusSeconds(expirationMillis / 1000);
+ } else {
+ final long defaultExpirationTime = 60L * 60L;
+ offsetDateTimeToSet = offsetDateTime.plusSeconds(defaultExpirationTime);
+ }
+
+ final DataLakeServiceSasSignatureValues serviceSasSignatureValues
+ = new DataLakeServiceSasSignatureValues(offsetDateTimeToSet, sasPermission);
+ final String url = client.getFileUrl() + "?" + client.generateSas(serviceSasSignatureValues);
+ final DataLakeExchangeHeaders headers = DataLakeExchangeHeaders.create().downloadLink(url);
+ return new DataLakeOperationResponse(url, headers.toMap());
+ }
+
+ public DataLakeOperationResponse deleteFile(final Exchange exchange) {
+ final FileCommonRequestOptions commonRequestOptions = getCommonRequestOptions(exchange);
+ Response<Void> response = client.delete(commonRequestOptions.getRequestConditions(), commonRequestOptions.getTimeout());
+ DataLakeExchangeHeaders exchangeHeaders = DataLakeExchangeHeaders.create();
+ exchangeHeaders.httpHeaders(response.getHeaders());
+ return new DataLakeOperationResponse(true, exchangeHeaders.toMap());
+ }
+
+ public DataLakeOperationResponse appendToFile(final Exchange exchange) throws IOException {
+ final FileCommonRequestOptions commonRequestOptions = getCommonRequestOptions(exchange);
+ final FileStreamAndLength fileStreamAndLength = FileStreamAndLength.createFileStreamAndLengthFromExchangeBody(exchange);
+ final Long fileOffset;
+ if (configurationProxy.getFileOffset(exchange) == null) {
+ fileOffset = client.getFileSize();
+ } else {
+ fileOffset = configurationProxy.getFileOffset(exchange);
+ }
+ final Response<Void> response = client.appendWithResponse(fileStreamAndLength.getInputStream(), fileOffset,
+ fileStreamAndLength.getStreamLength(), commonRequestOptions.getContentMD5(), commonRequestOptions.getLeaseId(),
+ commonRequestOptions.getTimeout());
+ DataLakeExchangeHeaders exchangeHeaders = DataLakeExchangeHeaders.create();
+ exchangeHeaders.httpHeaders(response.getHeaders());
+ return new DataLakeOperationResponse(true, exchangeHeaders.toMap());
+ }
+
+ public DataLakeOperationResponse flushToFile(final Exchange exchange) {
+ final FileCommonRequestOptions commonRequestOptions = getCommonRequestOptions(exchange);
+ final Long position = configurationProxy.getPosition(exchange);
+ final Boolean retainUncommitedData = configurationProxy.retainUnCommitedData(exchange);
+ final Boolean close = configurationProxy.getClose(exchange);
+
+ final Response<PathInfo> response
+ = client.flushWithResponse(position + client.getFileSize(), retainUncommitedData, close,
+ commonRequestOptions.getPathHttpHeaders(), commonRequestOptions.getRequestConditions(),
+ commonRequestOptions.getTimeout());
+ DataLakeExchangeHeaders exchangeHeaders
+ = DataLakeExchangeHeaders.createDataLakeExchangeHeadersFromPathInfo(response.getValue())
+ .httpHeaders(response.getHeaders());
+ return new DataLakeOperationResponse(response.getValue(), exchangeHeaders.toMap());
+ }
+
+ public DataLakeOperationResponse uploadFromFile(final Exchange exchange) {
+ final String path = configurationProxy.getPath(exchange);
+ final ParallelTransferOptions transferOptions = configurationProxy.getParallelTransferOptions(exchange);
+ final FileCommonRequestOptions commonRequestOptions = getCommonRequestOptions(exchange);
+ client.uploadFromFile(path, transferOptions, commonRequestOptions.getPathHttpHeaders(),
+ commonRequestOptions.getMetadata(), commonRequestOptions.getRequestConditions(),
+ commonRequestOptions.getTimeout());
+ return new DataLakeOperationResponse(true);
+ }
+
+ public DataLakeOperationResponse upload(final Exchange exchange) throws IOException {
+ final FileCommonRequestOptions commonRequestOptions = getCommonRequestOptions(exchange);
+ final ParallelTransferOptions transferOptions = configurationProxy.getParallelTransferOptions(exchange);
+ final FileStreamAndLength fileStreamAndLength = FileStreamAndLength.createFileStreamAndLengthFromExchangeBody(exchange);
+ final String permission = configurationProxy.getPermission(exchange);
+ final String umask = configurationProxy.getUmask(exchange);
+
+ final FileParallelUploadOptions uploadOptions
+ = new FileParallelUploadOptions(fileStreamAndLength.getInputStream(), fileStreamAndLength.getStreamLength())
+ .setHeaders(commonRequestOptions.getPathHttpHeaders()).setParallelTransferOptions(transferOptions)
+ .setMetadata(commonRequestOptions.getMetadata()).setPermissions(permission)
+ .setRequestConditions(commonRequestOptions.getRequestConditions())
+ .setRequestConditions(commonRequestOptions.getRequestConditions()).setUmask(umask);
+
+ final Response<PathInfo> response = client.uploadWithResponse(uploadOptions, commonRequestOptions.getTimeout());
+ DataLakeExchangeHeaders exchangeHeaders
+ = DataLakeExchangeHeaders.createDataLakeExchangeHeadersFromPathInfo(response.getValue())
+ .httpHeaders(response.getHeaders());
+ return new DataLakeOperationResponse(true, exchangeHeaders.toMap());
+ }
+
+ public DataLakeOperationResponse openQueryInputStream(final Exchange exchange) {
+ FileQueryOptions queryOptions = configurationProxy.getFileQueryOptions(exchange);
+ final Response<InputStream> response = client.openQueryInputStreamWithResponse(queryOptions);
+ DataLakeExchangeHeaders exchangeHeaders = DataLakeExchangeHeaders.create();
+ exchangeHeaders.httpHeaders(response.getHeaders());
+ return new DataLakeOperationResponse(response.getValue(), exchangeHeaders.toMap());
+ }
+
+ private FileCommonRequestOptions getCommonRequestOptions(final Exchange exchange) {
+ final PathHttpHeaders httpHeaders = configurationProxy.getPathHttpHeaders(exchange);
+ final Map<String, String> metadata = configurationProxy.getMetadata(exchange);
+ final AccessTier accessTier = configurationProxy.getAccessTier(exchange);
+ final DataLakeRequestConditions dataLakeRequestConditions = configurationProxy.getDataLakeRequestConditions(exchange);
+ final Duration timeout = configurationProxy.getTimeout(exchange);
+ final byte[] contentMD5 = configurationProxy.getContentMd5(exchange);
+
+ return new FileCommonRequestOptions(httpHeaders, metadata, accessTier, dataLakeRequestConditions, contentMD5, timeout);
+ }
+
+ private DownloadRetryOptions getDownloadRetryOptions(final DataLakeConfigurationOptionsProxy proxy) {
+ return new DownloadRetryOptions().setMaxRetryRequests(proxy.getMaxRetryRequests());
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileSystemOperations.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileSystemOperations.java
new file mode 100644
index 0000000..bb24a13
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileSystemOperations.java
@@ -0,0 +1,85 @@
+/*
+ * 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.azure.storage.datalake.operations;
+
+import java.time.Duration;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import com.azure.storage.file.datalake.models.DataLakeRequestConditions;
+import com.azure.storage.file.datalake.models.ListPathsOptions;
+import com.azure.storage.file.datalake.models.PathItem;
+import com.azure.storage.file.datalake.models.PublicAccessType;
+import org.apache.camel.Exchange;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfigurationOptionsProxy;
+import org.apache.camel.component.azure.storage.datalake.DataLakeExchangeHeaders;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileSystemClientWrapper;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataLakeFileSystemOperations {
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeFileSystemOperations.class);
+ private final DataLakeFileSystemClientWrapper client;
+ private final DataLakeConfigurationOptionsProxy configurationProxy;
+
+ public DataLakeFileSystemOperations(final DataLakeConfiguration configuration,
+ final DataLakeFileSystemClientWrapper client) {
+ ObjectHelper.notNull(client, "client cannot be null");
+ this.client = client;
+ configurationProxy = new DataLakeConfigurationOptionsProxy(configuration);
+ }
+
+ public DataLakeOperationResponse createFileSystem(final Exchange exchange) {
+ LOG.info("inside create file system in operation");
+ final Map<String, String> metadata = configurationProxy.getMetadata(exchange);
+ final PublicAccessType publicAccessType = configurationProxy.getPublicAccessType(exchange);
+ final Duration timeout = configurationProxy.getTimeout(exchange);
+ final DataLakeExchangeHeaders dataLakeExchangeHeaders
+ = new DataLakeExchangeHeaders().httpHeaders(client.createFileSystem(metadata, publicAccessType, timeout));
+ LOG.info(dataLakeExchangeHeaders.toString());
+ return new DataLakeOperationResponse(true, dataLakeExchangeHeaders.toMap());
+ }
+
+ public DataLakeOperationResponse deleteFileSystem(final Exchange exchange) {
+ final DataLakeRequestConditions dataLakeRequestConditions = configurationProxy.getDataLakeRequestConditions(exchange);
+ final Duration timeout = configurationProxy.getTimeout(exchange);
+ final DataLakeExchangeHeaders dataLakeExchangeHeaders
+ = new DataLakeExchangeHeaders().httpHeaders(client.deleteFileSystem(dataLakeRequestConditions, timeout));
+ return new DataLakeOperationResponse(true, dataLakeExchangeHeaders.toMap());
+ }
+
+ public DataLakeOperationResponse listPaths(final Exchange exchange) {
+ final ListPathsOptions listPathsOptions = configurationProxy.getListPathOptions(exchange);
+ final Duration timeout = configurationProxy.getTimeout(exchange);
+ final String regex = configurationProxy.getRegex(exchange);
+ List<PathItem> paths = client.listPaths(listPathsOptions, timeout);
+
+ if (ObjectHelper.isEmpty(regex)) {
+ return new DataLakeOperationResponse(paths);
+ } else {
+ List<PathItem> filteredPaths = paths.stream()
+ .filter(x -> x.getName().matches(regex))
+ .collect(Collectors.toCollection(LinkedList<PathItem>::new));
+ return new DataLakeOperationResponse(filteredPaths);
+ }
+ }
+
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeOperationResponse.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeOperationResponse.java
new file mode 100644
index 0000000..bc144ae
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeOperationResponse.java
@@ -0,0 +1,53 @@
+/*
+ * 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.azure.storage.datalake.operations;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class DataLakeOperationResponse {
+ private Object body;
+ private Map<String, Object> headers = new HashMap<>();
+
+ public DataLakeOperationResponse() {
+ }
+
+ public DataLakeOperationResponse(final Object body, final Map<String, Object> headers) {
+ this.body = body;
+ this.headers = headers;
+ }
+
+ public DataLakeOperationResponse(final Object body) {
+ this.body = body;
+ }
+
+ public Object getBody() {
+ return body;
+ }
+
+ public void setBody(Object body) {
+ this.body = body;
+ }
+
+ public Map<String, Object> getHeaders() {
+ return headers;
+ }
+
+ public void setHeaders(final Map<String, Object> headers) {
+ this.headers = headers;
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeServiceOperations.java b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeServiceOperations.java
new file mode 100644
index 0000000..0feb056
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeServiceOperations.java
@@ -0,0 +1,42 @@
+/*
+ * 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.azure.storage.datalake.operations;
+
+import java.time.Duration;
+
+import com.azure.storage.file.datalake.models.ListFileSystemsOptions;
+import org.apache.camel.Exchange;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfigurationOptionsProxy;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeServiceClientWrapper;
+
+public class DataLakeServiceOperations {
+ private final DataLakeServiceClientWrapper client;
+ private final DataLakeConfigurationOptionsProxy configurationProxy;
+
+ public DataLakeServiceOperations(final DataLakeConfiguration configuration, final DataLakeServiceClientWrapper client) {
+ this.client = client;
+ configurationProxy = new DataLakeConfigurationOptionsProxy(configuration);
+ }
+
+ public DataLakeOperationResponse listFileSystems(final Exchange exchange) {
+ final ListFileSystemsOptions listFileSystemsOptions = configurationProxy.getListFileSystemOptions(exchange);
+ final Duration timeout = configurationProxy.getTimeout(exchange);
+
+ return new DataLakeOperationResponse(client.listFileSystems(listFileSystemsOptions, timeout));
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/component/DataLakeComponentTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/component/DataLakeComponentTest.java
new file mode 100644
index 0000000..364b658
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/component/DataLakeComponentTest.java
@@ -0,0 +1,86 @@
+/*
+ * 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.azure.storage.datalake.component;
+
+import com.azure.storage.common.StorageSharedKeyCredential;
+import com.azure.storage.file.datalake.DataLakeServiceClient;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.component.azure.storage.datalake.DataLakeEndpoint;
+import org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeClientFactory;
+import org.apache.camel.support.DefaultExchange;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+class DataLakeComponentTest extends CamelTestSupport {
+
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeComponentTest.class);
+
+ @Test
+ public void testWithServiceClient() {
+ final DataLakeConfiguration configuration = new DataLakeConfiguration();
+ configuration.setSharedKeyCredential(storageSharedKeyCredentials());
+ final DataLakeServiceClient serviceClient = DataLakeClientFactory.createDataLakeServiceClient(configuration);
+ context.getRegistry().bind("azureDataLakeClient", serviceClient);
+ final DataLakeEndpoint endpoint = (DataLakeEndpoint) context
+ .getEndpoint(
+ "azure-storage-datalake:cameltesting/abc?serviceClient=#azureDataLakeClient&operation=listPaths");
+ assertEquals("cameltesting", endpoint.getConfiguration().getAccountName());
+ assertEquals("abc", endpoint.getConfiguration().getFileSystemName());
+ assertNotNull(endpoint.getConfiguration().getServiceClient());
+ assertEquals(DataLakeOperationsDefinition.listPaths, endpoint.getConfiguration().getOperation());
+ assertNull(endpoint.getConfiguration().getDirectoryName());
+ }
+
+ @Test
+ public void testWithSharedKeyCredentials() {
+ context.getRegistry().bind("credentials", storageSharedKeyCredentials());
+
+ final DataLakeEndpoint endpoint = (DataLakeEndpoint) context
+ .getEndpoint(
+ "azure-storage-datalake:cameltesting/abc?sharedKeyCredential=#credentials&operation=upload&fileName=test.txt");
+
+ assertEquals("cameltesting", endpoint.getConfiguration().getAccountName());
+ assertEquals("abc", endpoint.getConfiguration().getFileSystemName());
+ assertNotNull(endpoint.getConfiguration().getSharedKeyCredential());
+ assertNull(endpoint.getConfiguration().getServiceClient());
+ assertEquals(DataLakeOperationsDefinition.upload, endpoint.getConfiguration().getOperation());
+ assertEquals("test.txt", endpoint.getConfiguration().getFileName());
+ }
+
+ @Test
+ public void testProducerWithoutFileName() {
+ context.getRegistry().bind("credentials", storageSharedKeyCredentials());
+ final DataLakeEndpoint endpoint = (DataLakeEndpoint) context
+ .getEndpoint("azure-storage-datalake:cameltesting/abc?sharedKeyCredential=#credentials&operation=deleteFile");
+
+ DefaultExchange exchange = new DefaultExchange(context);
+ assertThrows(IllegalArgumentException.class, () -> endpoint.createProducer().process(exchange));
+ }
+
+ private StorageSharedKeyCredential storageSharedKeyCredentials() {
+ final String accountKey = "";
+ return new StorageSharedKeyCredential("cameltesting", accountKey);
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/BaseIT.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/BaseIT.java
new file mode 100644
index 0000000..dea734f
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/BaseIT.java
@@ -0,0 +1,92 @@
+/*
+ * 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.azure.storage.datalake.integration;
+
+import java.nio.file.OpenOption;
+import java.nio.file.StandardOpenOption;
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Set;
+
+import com.azure.storage.common.StorageSharedKeyCredential;
+import com.azure.storage.file.datalake.DataLakeServiceClient;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.test.infra.azure.common.AzureConfigs;
+import org.apache.camel.test.infra.azure.common.services.AzureService;
+import org.apache.camel.test.infra.azure.storage.datalake.clients.AzureStorageDataLakeClientUtils;
+import org.apache.camel.test.infra.azure.storage.datalake.services.AzureStorageDataLakeServiceFactory;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+public class BaseIT extends CamelTestSupport {
+
+ @RegisterExtension
+ public static AzureService service;
+
+ protected DataLakeServiceClient serviceClient;
+ protected DataLakeConfiguration configuration;
+ protected String fileSystemName;
+
+ static {
+ initCredentials();
+ service = AzureStorageDataLakeServiceFactory.createAzureService();
+ }
+
+ @Override
+ protected CamelContext createCamelContext() throws Exception {
+ CamelContext context = super.createCamelContext();
+ context.getRegistry().bind("serviceClient", serviceClient);
+ return context;
+ }
+
+ static void initCredentials() {
+ String accountName = System.getProperty("accountName");
+ String accessKey = System.getProperty("accountKey");
+
+ if (StringUtils.isNotEmpty(accountName) && StringUtils.isNotEmpty(accessKey)) {
+ System.setProperty(AzureConfigs.ACCOUNT_NAME, accountName);
+ System.setProperty(AzureConfigs.ACCOUNT_KEY, accessKey);
+ System.setProperty("azure.instance.type", "remote");
+ }
+ }
+
+ @BeforeAll
+ void initProperties() {
+ fileSystemName = RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT);
+
+ configuration = new DataLakeConfiguration();
+ configuration.setSharedKeyCredential(new StorageSharedKeyCredential(
+ service.azureCredentials().accountName(),
+ service.azureCredentials().accountKey()));
+ configuration.setFileSystemName(fileSystemName);
+
+ final Set<OpenOption> openOptions = new HashSet<OpenOption>();
+ openOptions.add(StandardOpenOption.WRITE);
+ openOptions.add(StandardOpenOption.CREATE);
+ openOptions.add(StandardOpenOption.TRUNCATE_EXISTING);
+
+ configuration.setOpenOptions(openOptions);
+
+ serviceClient = AzureStorageDataLakeClientUtils.getClient();
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerTest.java
new file mode 100644
index 0000000..53bb232
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerTest.java
@@ -0,0 +1,224 @@
+/*
+ * 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.azure.storage.datalake.integration;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.io.UncheckedIOException;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
+import java.util.regex.Pattern;
+
+import com.azure.storage.file.datalake.DataLakeFileSystemClient;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConstants;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.support.processor.idempotent.MemoryIdempotentRepository;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class DataLakeConsumerTest extends BaseIT {
+
+ @TempDir
+ static Path testDir;
+ private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumerTest.class);
+
+ @EndpointInject("direct:createFile")
+ private ProducerTemplate templateStart;
+ private String batchFileSystemName;
+ private String batchFileSystemName1;
+ private String batchFileSystemName2;
+ private String fileName;
+ private final String baseURI = String.format("azure-storage-datalake:%s/", service.azureCredentials().accountName());
+ private final String regex = ".*\\.pdf";
+
+ private DataLakeFileSystemClient fileSystemClient;
+ private DataLakeFileSystemClient batchFileSystemClient;
+ private DataLakeFileSystemClient batchFileSystemClient1;
+ private DataLakeFileSystemClient batchFileSystemClient2;
+
+ @BeforeAll
+ public void setup() {
+ batchFileSystemName = RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT);
+ batchFileSystemName1 = RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT);
+ batchFileSystemName2 = RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT);
+ fileName = RandomStringUtils.randomAlphabetic(5);
+ fileSystemClient = serviceClient.getFileSystemClient(fileSystemName);
+ batchFileSystemClient = serviceClient.getFileSystemClient(batchFileSystemName);
+ batchFileSystemClient1 = serviceClient.getFileSystemClient(batchFileSystemName1);
+ batchFileSystemClient2 = serviceClient.getFileSystemClient(batchFileSystemName2);
+
+ configuration.setFileSystemName(batchFileSystemName);
+
+ fileSystemClient.create();
+ batchFileSystemClient.create();
+ batchFileSystemClient1.create();
+ batchFileSystemClient2.create();
+
+ try {
+ fileSystemClient.getFileClient(fileName).upload(new ByteArrayInputStream("file data".getBytes()), 9L);
+ batchFileSystemClient.getFileClient("batch_file_1").upload(new ByteArrayInputStream("Batch file 1".getBytes()),
+ 12L);
+ batchFileSystemClient.getFileClient("batch_file_2").upload(new ByteArrayInputStream("Batch file 2".getBytes()),
+ 12L);
+ batchFileSystemClient1.getFileClient("batch_file_A").upload(new ByteArrayInputStream("Batch file A".getBytes()),
+ 12L);
+ batchFileSystemClient1.getFileClient("batch_file_B").upload(new ByteArrayInputStream("Batch file B".getBytes()),
+ 12L);
+ for (int i = 0; i < 3; i++) {
+ final int index = i;
+ batchFileSystemClient2.getFileClient(generateRandomFileName("pdf")).upload(
+ new ByteArrayInputStream(("PDF with regex :" + Integer.toString(index)).getBytes()),
+ 17L);
+ }
+
+ for (int i = 0; i < 3; i++) {
+ final int index = i;
+ batchFileSystemClient2.getFileClient(generateRandomFileName("docx")).upload(
+ new ByteArrayInputStream(("DOCX with regex :" + Integer.toString(index)).getBytes()),
+ 18L);
+ }
+
+ } catch (UncheckedIOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ void testPollingToFile() throws Exception {
+ Files.deleteIfExists(new File(testDir + "/" + fileName).toPath());
+
+ final MockEndpoint mockEndpoint = getMockEndpoint("mock:result");
+ mockEndpoint.expectedMessageCount(1);
+ mockEndpoint.assertIsSatisfied();
+
+ final File file = mockEndpoint.getExchanges().get(0).getIn().getBody(File.class);
+ assertNotNull(file, "File must be set");
+ assertEquals("file data", FileUtils.readFileToString(file, Charset.defaultCharset()));
+ }
+
+ @Test
+ void testBatchPolling() throws Exception {
+ final MockEndpoint mockEndpointForStreams = getMockEndpoint("mock:resultBatch");
+
+ mockEndpointForStreams.expectedMessageCount(2);
+ mockEndpointForStreams.assertIsSatisfied();
+
+ final InputStream fileStream1
+ = mockEndpointForStreams.getExchanges().get(0).getIn().getBody(InputStream.class);
+ final InputStream fileStream2
+ = mockEndpointForStreams.getExchanges().get(1).getIn().getBody(InputStream.class);
+
+ final String text1 = context().getTypeConverter().convertTo(String.class, fileStream1).trim();
+ final String text2 = context().getTypeConverter().convertTo(String.class, fileStream2).trim();
+
+ final List<String> expectedList = Arrays.asList(text1, text2);
+ final List<String> actualList = Arrays.asList("Batch file 1", "Batch file 2");
+ assertTrue(expectedList.size() == actualList.size()
+ && expectedList.containsAll(actualList) && actualList.containsAll(expectedList));
+ }
+
+ @Test
+ void testBatchPollingFile() throws Exception {
+ final MockEndpoint mockEndpointForFiles = getMockEndpoint("mock:resultBatchFile");
+ mockEndpointForFiles.expectedMessageCount(2);
+ mockEndpointForFiles.assertIsSatisfied();
+
+ final File file1 = new File(testDir + "/batch_file_A");
+ final File file2 = new File(testDir + "/batch_file_B");
+
+ assertTrue(file1.exists(), "File was not created in local filesystem: batch_file_A");
+ assertTrue(file2.exists(), "File was not created in local filesystem: batch_file_B");
+
+ assertEquals("Batch file A", context().getTypeConverter().convertTo(String.class, file1).trim());
+ assertEquals("Batch file B", context().getTypeConverter().convertTo(String.class, file2).trim());
+
+ }
+
+ @Test
+ void testPollingWithRegex() throws Exception {
+ final MockEndpoint endpoint = getMockEndpoint("mock:resultRegex");
+ endpoint.expectedMessageCount(3);
+
+ endpoint.assertIsSatisfied();
+
+ Pattern pattern = Pattern.compile(regex);
+
+ for (Exchange exchange : endpoint.getExchanges()) {
+ String fileName = exchange.getIn().getHeader(DataLakeConstants.FILE_NAME, String.class);
+ assertTrue(pattern.matcher(fileName).matches());
+ }
+ }
+
+ @Override
+ protected RoutesBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+
+ context.getRegistry().bind("openOptions", configuration.getOpenOptions());
+
+ from(baseURI + fileSystemName + "?fileName=" + fileName
+ + "&dataLakeServiceClient=#serviceClient&fileDir=" + testDir + "&openOptions=#openOptions")
+ .to("mock:result");
+
+ from(baseURI + batchFileSystemName + "?dataLakeServiceClient=#serviceClient&openOptions=#openOptions")
+ .to("mock:resultBatch");
+
+ from(baseURI + batchFileSystemName1 + "?dataLakeServiceClient=#serviceClient&fileDir="
+ + testDir + "&openOptions=#openOptions").to("mock:resultBatchFile");
+
+ from(baseURI + batchFileSystemName2 + "?dataLakeServiceClient=#serviceClient®ex=" + regex
+ + "&openOptions=#openOptions")
+ .idempotentConsumer(body(), new MemoryIdempotentRepository())
+ .to("mock:resultRegex");
+ }
+ };
+ }
+
+ @AfterAll
+ public void delete() {
+ fileSystemClient.delete();
+ batchFileSystemClient.delete();
+ batchFileSystemClient1.delete();
+ batchFileSystemClient2.delete();
+ }
+
+ private String generateRandomFileName(String extension) {
+ return RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT) + "." + extension;
+ }
+
+}
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationTest.java
new file mode 100644
index 0000000..3cda6eb
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationTest.java
@@ -0,0 +1,133 @@
+/*
+ * 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.azure.storage.datalake.integration;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+import java.nio.file.Path;
+
+import com.azure.storage.file.datalake.options.FileParallelUploadOptions;
+import org.apache.camel.Exchange;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConstants;
+import org.apache.camel.component.azure.storage.datalake.DataLakeUtils;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileSystemClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeServiceClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeFileOperations;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeOperationResponse;
+import org.apache.camel.support.DefaultExchange;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class DataLakeFileOperationTest extends BaseIT {
+ private DataLakeFileSystemClientWrapper fileSystemClientWrapper;
+ private String randomFileName;
+
+ @BeforeAll
+ public void setup() throws Exception {
+ randomFileName = RandomStringUtils.randomAlphabetic(10);
+
+ fileSystemClientWrapper = new DataLakeServiceClientWrapper(serviceClient)
+ .getDataLakeFileSystemClientWrapper(configuration.getFileSystemName());
+ fileSystemClientWrapper.createFileSystem(null, null, null);
+
+ final InputStream inputStream = new ByteArrayInputStream("testing".getBytes(Charset.defaultCharset()));
+ final FileParallelUploadOptions options
+ = new FileParallelUploadOptions(inputStream, DataLakeUtils.getInputStreamLength(inputStream));
+ fileSystemClientWrapper.getDataLakeFileClientWrapper(randomFileName).uploadWithResponse(options, null);
+ }
+
+ @AfterAll
+ public void delete() {
+ fileSystemClientWrapper.deleteFileSystem(null, null);
+ }
+
+ @Test
+ void testGetFile(@TempDir Path testDir) throws Exception {
+ final DataLakeFileClientWrapper fileClientWrapper
+ = fileSystemClientWrapper.getDataLakeFileClientWrapper(randomFileName);
+ final DataLakeFileOperations operations = new DataLakeFileOperations(configuration, fileClientWrapper);
+
+ final Exchange exchange = new DefaultExchange(context);
+ final DataLakeOperationResponse response = operations.getFile(exchange);
+
+ assertNotNull(response);
+ assertNotNull(response.getBody());
+ assertNotNull(response.getHeaders());
+
+ final InputStream inputStream = (InputStream) response.getBody();
+ final String bufferedText = new BufferedReader(new InputStreamReader(inputStream, Charset.defaultCharset())).readLine();
+
+ assertEquals("testing", bufferedText);
+
+ final File testFile = new File(testDir.toFile(), "test_file.txt");
+ exchange.getIn().setBody(new FileOutputStream(testFile));
+
+ final DataLakeOperationResponse responseWithFile = operations.getFile(exchange);
+ final String fileContent = FileUtils.readFileToString(testFile, Charset.defaultCharset());
+
+ assertNotNull(responseWithFile);
+ assertNotNull(responseWithFile.getHeaders());
+ assertNotNull(responseWithFile.getBody());
+ assertTrue(fileContent.contains("testing"));
+ }
+
+ @Test
+ void testDownloadToFile(@TempDir Path testDir) throws IOException {
+ final DataLakeFileClientWrapper fileClientWrapper
+ = fileSystemClientWrapper.getDataLakeFileClientWrapper(randomFileName);
+ final DataLakeFileOperations operations = new DataLakeFileOperations(configuration, fileClientWrapper);
+
+ final Exchange exchange = new DefaultExchange(context);
+ exchange.getIn().setHeader(DataLakeConstants.FILE_DIR, testDir.toString());
+ exchange.getIn().setHeader(DataLakeConstants.FILE_NAME, randomFileName);
+
+ final DataLakeOperationResponse response = operations.downloadToFile(exchange);
+
+ final File testFile = testDir.resolve(randomFileName).toFile();
+ final String fileContent = FileUtils.readFileToString(testFile, Charset.defaultCharset());
+
+ assertNotNull(response);
+ assertNotNull(response.getBody());
+ assertNotNull(response.getHeaders());
+ assertNotNull(response.getHeaders().get(DataLakeConstants.FILE_NAME));
+ assertTrue(fileContent.contains("testing"));
+ }
+
+ @Test
+ void testDownloadLink() {
+ final DataLakeFileClientWrapper clientWrapper = fileSystemClientWrapper.getDataLakeFileClientWrapper(randomFileName);
+ final DataLakeFileOperations fileOperations = new DataLakeFileOperations(configuration, clientWrapper);
+
+ final DataLakeOperationResponse response = fileOperations.downloadLink(null);
+ assertNotNull(response);
+ assertNotNull(response.getBody());
+ assertNotNull(response.getHeaders().get(DataLakeConstants.DOWNLOAD_LINK));
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationTest.java
new file mode 100644
index 0000000..02a32bc
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationTest.java
@@ -0,0 +1,79 @@
+/*
+ * 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.azure.storage.datalake.integration;
+
+import java.util.concurrent.TimeUnit;
+
+import com.azure.storage.file.datalake.models.DataLakeStorageException;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConstants;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileSystemClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeServiceClientWrapper;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeFileSystemOperations;
+import org.apache.camel.component.azure.storage.datalake.operations.DataLakeOperationResponse;
+import org.awaitility.Awaitility;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class DataLakeFileSystemOperationTest extends BaseIT {
+
+ private DataLakeServiceClientWrapper serviceClientWrapper;
+
+ @BeforeAll
+ public void setup() {
+ serviceClientWrapper = new DataLakeServiceClientWrapper(serviceClient);
+ }
+
+ @Test
+ void testCreateAndDeleteFileSystem() {
+ final DataLakeFileSystemClientWrapper fileSystemClientWrapper
+ = serviceClientWrapper.getDataLakeFileSystemClientWrapper("testcontainer");
+
+ final DataLakeFileSystemOperations operations
+ = new DataLakeFileSystemOperations(configuration, fileSystemClientWrapper);
+
+ final DataLakeOperationResponse responseCreate = operations.createFileSystem(null);
+
+ assertNotNull(responseCreate);
+ assertNotNull(responseCreate.getHeaders().get(DataLakeConstants.RAW_HTTP_HEADERS));
+ assertTrue((boolean) responseCreate.getBody());
+
+ final DataLakeOperationResponse responseDelete = operations.deleteFileSystem(null);
+
+ assertNotNull(responseDelete);
+ assertNotNull(responseDelete.getHeaders().get(DataLakeConstants.RAW_HTTP_HEADERS));
+ assertTrue((boolean) responseDelete.getBody());
+
+ Awaitility.given().ignoreException(DataLakeStorageException.class).with()
+ .pollInterval(100, TimeUnit.MILLISECONDS).atMost(60, TimeUnit.SECONDS)
+ .until(() -> {
+ final DataLakeOperationResponse responseRecreate = operations.createFileSystem(null);
+ assertNotNull(responseRecreate);
+ assertNotNull(responseRecreate.getHeaders().get(DataLakeConstants.RAW_HTTP_HEADERS));
+ assertTrue((boolean) responseRecreate.getBody());
+
+ return (boolean) responseRecreate.getBody();
+ });
+ }
+
+ @AfterAll
+ public void delete() {
+ serviceClientWrapper.getDataLakeFileSystemClientWrapper("testcontainer").deleteFileSystem(null, null);
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeDirectoryOperationTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeDirectoryOperationTest.java
new file mode 100644
index 0000000..fe5f527
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeDirectoryOperationTest.java
@@ -0,0 +1,81 @@
+/*
+ * 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.azure.storage.datalake.operations;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.rest.ResponseBase;
+import com.azure.storage.file.datalake.DataLakeFileClient;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeDirectoryClientWrapper;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.when;
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@ExtendWith(MockitoExtension.class)
+public class DataLakeDirectoryOperationTest extends CamelTestSupport {
+ private DataLakeConfiguration configuration;
+
+ @Mock
+ private DataLakeDirectoryClientWrapper client;
+
+ @Mock
+ private DataLakeFileClient fileClient;
+
+ @BeforeEach
+ public void setup() {
+ configuration = new DataLakeConfiguration();
+ configuration.setAccountName("cameltesting");
+ }
+
+ @Test
+ void testCreateFile() {
+
+ final HttpHeaders httpHeaders = new HttpHeaders();
+ when(client.createFileWithResponse(any(), any(), any(), any(), any(), any(), any()))
+ .thenReturn(new ResponseBase<>(null, 200, httpHeaders, fileClient, null));
+
+ final DataLakeDirectoryOperations operations = new DataLakeDirectoryOperations(configuration, client);
+ final DataLakeOperationResponse response = operations.createFile(null);
+
+ assertNotNull(response);
+ }
+
+ @Test
+ void testDeleteDirectory() {
+ final HttpHeaders httpHeaders = new HttpHeaders();
+ httpHeaders.put("x-ms-request-id", "12345");
+ when(client.deleteWithResponse(any(), any(), any()))
+ .thenReturn(new ResponseBase<>(null, 200, httpHeaders, null, null));
+
+ final DataLakeDirectoryOperations operations = new DataLakeDirectoryOperations(configuration, client);
+ final DataLakeOperationResponse response = operations.deleteDirectory(null);
+
+ assertNotNull(response);
+ assertEquals(true, response.getBody());
+ }
+
+}
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileOperationTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileOperationTest.java
new file mode 100644
index 0000000..d55c713
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileOperationTest.java
@@ -0,0 +1,110 @@
+/*
+ * 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.azure.storage.datalake.operations;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+import java.time.OffsetDateTime;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.rest.ResponseBase;
+import com.azure.storage.file.datalake.models.PathInfo;
+import org.apache.camel.Exchange;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConstants;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileClientWrapper;
+import org.apache.camel.support.DefaultExchange;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.when;
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@ExtendWith(MockitoExtension.class)
+public class DataLakeFileOperationTest extends CamelTestSupport {
+
+ private DataLakeConfiguration configuration;
+
+ @Mock
+ private DataLakeFileClientWrapper client;
+
+ @BeforeEach
+ public void setup() {
+ configuration = new DataLakeConfiguration();
+ configuration.setAccountName("cameltesting");
+ }
+
+ @Test
+ void testGetFile() throws IOException {
+ InputStream mockStream = new ByteArrayInputStream("testInput".getBytes(Charset.defaultCharset()));
+
+ when(client.openInputStream()).thenReturn(mockStream);
+
+ final Exchange exchange = new DefaultExchange(context);
+ final DataLakeFileOperations operations = new DataLakeFileOperations(configuration, client);
+
+ final DataLakeOperationResponse response = operations.getFile(null);
+
+ assertNotNull(response);
+ assertNotNull(response.getBody());
+ assertNotNull(response.getHeaders());
+ assertEquals("testInput",
+ new BufferedReader(new InputStreamReader((InputStream) response.getBody(), Charset.defaultCharset()))
+ .readLine());
+
+ final DataLakeOperationResponse secondResponse = operations.getFile(exchange);
+
+ assertNotNull(secondResponse);
+ assertNotNull(secondResponse.getBody());
+ assertNotNull(secondResponse.getHeaders());
+ }
+
+ @Test
+ void testUploadFile() throws Exception {
+ final OffsetDateTime time = OffsetDateTime.now();
+ final PathInfo pathInfo = new PathInfo("testTag", time);
+ final HttpHeaders httpHeaders = new HttpHeaders();
+ when(client.uploadWithResponse(any(), any()))
+ .thenReturn(new ResponseBase<>(null, 200, httpHeaders, pathInfo, null));
+
+ final Exchange exchange = new DefaultExchange(context);
+ exchange.getIn().setBody(new ByteArrayInputStream("testing".getBytes(Charset.defaultCharset())));
+
+ final DataLakeFileOperations operations = new DataLakeFileOperations(configuration, client);
+ final DataLakeOperationResponse response = operations.upload(exchange);
+
+ assertNotNull(response);
+ assertTrue((boolean) response.getBody());
+ assertNotNull(response.getHeaders());
+ assertEquals("testTag", response.getHeaders().get(DataLakeConstants.E_TAG));
+ assertEquals(time, response.getHeaders().get(DataLakeConstants.LAST_MODIFIED));
+ }
+
+}
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileSystemOperationTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileSystemOperationTest.java
new file mode 100644
index 0000000..505c488
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileSystemOperationTest.java
@@ -0,0 +1,172 @@
+/*
+ * 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.azure.storage.datalake.operations;
+
+import java.time.OffsetDateTime;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.storage.file.datalake.models.PathItem;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration;
+import org.apache.camel.component.azure.storage.datalake.DataLakeConstants;
+import org.apache.camel.component.azure.storage.datalake.client.DataLakeFileSystemClientWrapper;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.when;
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@ExtendWith(MockitoExtension.class)
+public class DataLakeFileSystemOperationTest extends CamelTestSupport {
+ private DataLakeConfiguration configuration;
+
+ @Mock
+ private DataLakeFileSystemClientWrapper client;
+
+ @BeforeEach
+ public void setup() {
+ configuration = new DataLakeConfiguration();
+ configuration.setAccountName("cameltesting");
+ configuration.setFileSystemName("test");
+ }
+
+ @Test
+ void testCreateFileSystem() {
+ when(client.createFileSystem(any(), any(), any()))
+ .thenReturn(createFileSystemHeaderMock());
+
+ final DataLakeFileSystemOperations fileSystemOperations = new DataLakeFileSystemOperations(configuration, client);
+ final DataLakeOperationResponse response = fileSystemOperations.createFileSystem(null);
+
+ assertNotNull(response);
+ assertNotNull(response.getHeaders().get(DataLakeConstants.RAW_HTTP_HEADERS));
+ assertTrue((boolean) response.getBody());
+ }
+
+ @Test
+ void testDeleteFileSystem() {
+ when(client.deleteFileSystem(any(), any()))
+ .thenReturn(deleteFileSystemHeaderMock());
+
+ final DataLakeFileSystemOperations operations = new DataLakeFileSystemOperations(configuration, client);
+ final DataLakeOperationResponse response = operations.deleteFileSystem(null);
+
+ assertNotNull(response);
+ assertNotNull(response.getHeaders().get(DataLakeConstants.RAW_HTTP_HEADERS));
+ assertTrue((boolean) response.getBody());
+ }
+
+ @Test
+ void testListPaths() {
+ when(client.listPaths(any(), any()))
+ .thenReturn(listPathsMock());
+
+ final DataLakeFileSystemOperations operations = new DataLakeFileSystemOperations(configuration, client);
+ final DataLakeOperationResponse response = operations.listPaths(null);
+
+ assertNotNull(response);
+
+ @SuppressWarnings("unchecked")
+ final List<PathItem> body = (List<PathItem>) response.getBody();
+ final List<String> pathNames = body.stream().map(PathItem::getName).collect(Collectors.toList());
+ assertTrue(pathNames.contains("item1"));
+ assertTrue(pathNames.contains("item2"));
+
+ final List<PathItem> directories = body.stream().filter(PathItem::isDirectory).collect(Collectors.toList());
+ final List<PathItem> files = body.stream().filter(pathItem -> !pathItem.isDirectory()).collect(Collectors.toList());
+ assertEquals(1, directories.size());
+ assertEquals(1, files.size());
+ }
+
+ @Test
+ void testListPathWithRegex() {
+ configuration.setRegex(".*\\.pdf");
+
+ when(client.listPaths(any(), any()))
+ .thenReturn(listPathsForRegexMock());
+
+ final DataLakeFileSystemOperations operations = new DataLakeFileSystemOperations(configuration, client);
+ final DataLakeOperationResponse response = operations.listPaths(null);
+
+ assertNotNull(response);
+
+ @SuppressWarnings("unchecked")
+ final List<PathItem> body = (List<PathItem>) response.getBody();
+ final List<String> items = body.stream().map(PathItem::getName).collect(Collectors.toList());
+
+ assertEquals(3, items.size());
+ assertTrue(items.contains("file1.pdf"));
+ assertTrue(items.contains("file2.pdf"));
+ assertTrue(items.contains("file5.pdf"));
+ }
+
+ private List<PathItem> listPathsMock() {
+ final List<PathItem> paths = new LinkedList<>();
+
+ final PathItem item1 = new PathItem("testTag1", OffsetDateTime.now(), 0, null, false, "item1", null, null);
+ final PathItem item2 = new PathItem("testTag1", OffsetDateTime.now(), 0, null, true, "item2", null, null);
+
+ paths.add(item1);
+ paths.add(item2);
+
+ return paths;
+ }
+
+ private List<PathItem> listPathsForRegexMock() {
+ final List<PathItem> paths = listPathsMock();
+
+ final PathItem itemPdf1 = new PathItem("testTag1", OffsetDateTime.now(), 0, null, false, "file1.pdf", null, null);
+ final PathItem itemPdf2 = new PathItem("testTag2", OffsetDateTime.now(), 0, null, false, "file2.pdf", null, null);
+ final PathItem itemPdf3 = new PathItem("testTag3", OffsetDateTime.now(), 0, null, false, "file5.pdf", null, null);
+ final PathItem itemExe1 = new PathItem("testTag4", OffsetDateTime.now(), 0, null, false, "a.exe", null, null);
+ final PathItem itemExe2 = new PathItem("testTag5", OffsetDateTime.now(), 0, null, false, "b.exe", null, null);
+ final PathItem itemExe3 = new PathItem("testTag6", OffsetDateTime.now(), 0, null, false, "c.exe", null, null);
+
+ paths.add(itemPdf1);
+ paths.add(itemPdf2);
+ paths.add(itemPdf3);
+ paths.add(itemExe1);
+ paths.add(itemExe2);
+ paths.add(itemExe3);
+
+ return paths;
+
+ }
+
+ private HttpHeaders deleteFileSystemHeaderMock() {
+ final HttpHeaders httpHeaders = new HttpHeaders();
+ httpHeaders.put("x-ms-request-id", "12345");
+ return httpHeaders;
+ }
+
+ private HttpHeaders createFileSystemHeaderMock() {
+ final HttpHeaders httpHeaders = new HttpHeaders();
+ httpHeaders.put("x-ms-request-id", "12345");
+ return httpHeaders;
+ }
+}
diff --git a/components/camel-azure-storage-datalake/src/test/resources/log4j2.properties b/components/camel-azure-storage-datalake/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..ff832d3
--- /dev/null
+++ b/components/camel-azure-storage-datalake/src/test/resources/log4j2.properties
@@ -0,0 +1,25 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+appender.out.layout.pattern=%d [%15.15t] %highlight{%-5p} %-30.30c - %m%n
+appender.out.layout.type=PatternLayout
+appender.out.name=out
+appender.out.type=Console
+logger.mine.level=INFO
+logger.mine.name=org.apache.camel.component.chuck
+loggers=mine
+rootLogger.appenderRef.out.ref=out
+rootLogger.level=INFO
diff --git a/components/pom.xml b/components/pom.xml
index 31713ba..9bce699 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -146,6 +146,7 @@
<module>camel-aws-xray</module>
<module>camel-azure</module>
<module>camel-azure-storage-blob</module>
+ <module>camel-azure-storage-datalake</module>
<module>camel-azure-storage-queue</module>
<module>camel-azure-eventhubs</module>
<module>camel-barcode</module>
diff --git a/core/camel-allcomponents/pom.xml b/core/camel-allcomponents/pom.xml
index aa912cc..1cffb06 100644
--- a/core/camel-allcomponents/pom.xml
+++ b/core/camel-allcomponents/pom.xml
@@ -271,6 +271,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-azure-storage-datalake</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-azure-storage-queue</artifactId>
</dependency>
<dependency>
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index 6be9591..600352d 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -902,6 +902,19 @@ public interface ComponentsBuilderFactory {
return org.apache.camel.builder.component.dsl.AzureStorageBlobComponentBuilderFactory.azureStorageBlob();
}
/**
+ * Azure storage datalake service (camel-azure-storage-datalake)
+ * Camel Azure Datalake Gen2 Component
+ *
+ * Category: cloud,file
+ * Since: 3.8
+ * Maven coordinates: org.apache.camel:camel-azure-storage-datalake
+ *
+ * @return the dsl builder
+ */
+ static org.apache.camel.builder.component.dsl.AzureStorageDatalakeComponentBuilderFactory.AzureStorageDatalakeComponentBuilder azureStorageDatalake() {
+ return org.apache.camel.builder.component.dsl.AzureStorageDatalakeComponentBuilderFactory.azureStorageDatalake();
+ }
+ /**
* Azure Storage Queue Service (camel-azure-storage-queue)
* The azure-storage-queue component is used for storing and retrieving the
* messages to/from Azure Storage Queue using Azure SDK v12.
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureStorageDatalakeComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureStorageDatalakeComponentBuilderFactory.java
new file mode 100644
index 0000000..cf3b990
--- /dev/null
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureStorageDatalakeComponentBuilderFactory.java
@@ -0,0 +1,641 @@
+/*
+ * 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.builder.component.dsl;
+
+import javax.annotation.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.azure.storage.datalake.DataLakeComponent;
+
+/**
+ * Camel Azure Datalake Gen2 Component
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface AzureStorageDatalakeComponentBuilderFactory {
+
+ /**
+ * Azure storage datalake service (camel-azure-storage-datalake)
+ * Camel Azure Datalake Gen2 Component
+ *
+ * Category: cloud,file
+ * Since: 3.8
+ * Maven coordinates: org.apache.camel:camel-azure-storage-datalake
+ *
+ * @return the dsl builder
+ */
+ static AzureStorageDatalakeComponentBuilder azureStorageDatalake() {
+ return new AzureStorageDatalakeComponentBuilderImpl();
+ }
+
+ /**
+ * Builder for the Azure storage datalake service component.
+ */
+ interface AzureStorageDatalakeComponentBuilder
+ extends
+ ComponentBuilder<DataLakeComponent> {
+ /**
+ * account key for authentication.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param accountKey the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder accountKey(
+ java.lang.String accountKey) {
+ doSetProperty("accountKey", accountKey);
+ return this;
+ }
+ /**
+ * client id for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param clientId the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder clientId(
+ java.lang.String clientId) {
+ doSetProperty("clientId", clientId);
+ return this;
+ }
+ /**
+ * client secret for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param clientSecret the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder clientSecret(
+ java.lang.String clientSecret) {
+ doSetProperty("clientSecret", clientSecret);
+ return this;
+ }
+ /**
+ * client secret credential for authentication.
+ *
+ * The option is a:
+ * <code>com.azure.identity.ClientSecretCredential</code>
+ * type.
+ *
+ * Group: common
+ *
+ * @param clientSecretCredential the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder clientSecretCredential(
+ com.azure.identity.ClientSecretCredential clientSecretCredential) {
+ doSetProperty("clientSecretCredential", clientSecretCredential);
+ return this;
+ }
+ /**
+ * Whether or not a file changed event raised indicates completion
+ * (true) or modification (false).
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param close the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder close(
+ java.lang.Boolean close) {
+ doSetProperty("close", close);
+ return this;
+ }
+ /**
+ * check for closing stream after read.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param closeStreamAfterRead the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder closeStreamAfterRead(
+ java.lang.Boolean closeStreamAfterRead) {
+ doSetProperty("closeStreamAfterRead", closeStreamAfterRead);
+ return this;
+ }
+ /**
+ * configuration object for datalake.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration</code> type.
+ *
+ * Group: common
+ *
+ * @param configuration the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder configuration(
+ org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration configuration) {
+ doSetProperty("configuration", configuration);
+ return this;
+ }
+ /**
+ * count number of bytes to download.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param dataCount the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder dataCount(
+ java.lang.Long dataCount) {
+ doSetProperty("dataCount", dataCount);
+ return this;
+ }
+ /**
+ * directory of the file to be handled in component.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param directoryName the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder directoryName(
+ java.lang.String directoryName) {
+ doSetProperty("directoryName", directoryName);
+ return this;
+ }
+ /**
+ * download link expiration time.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param downloadLinkExpiration the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder downloadLinkExpiration(
+ java.lang.Long downloadLinkExpiration) {
+ doSetProperty("downloadLinkExpiration", downloadLinkExpiration);
+ return this;
+ }
+ /**
+ * expression for queryInputStream.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param expression the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder expression(
+ java.lang.String expression) {
+ doSetProperty("expression", expression);
+ return this;
+ }
+ /**
+ * directory of file to do operations in the local system.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param fileDir the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder fileDir(
+ java.lang.String fileDir) {
+ doSetProperty("fileDir", fileDir);
+ return this;
+ }
+ /**
+ * name of file to be handled in component.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param fileName the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder fileName(
+ java.lang.String fileName) {
+ doSetProperty("fileName", fileName);
+ return this;
+ }
+ /**
+ * offset position in file for different operations.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param fileOffset the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder fileOffset(
+ java.lang.Long fileOffset) {
+ doSetProperty("fileOffset", fileOffset);
+ return this;
+ }
+ /**
+ * maximum number of results to show at a time.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: common
+ *
+ * @param maxResults the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder maxResults(
+ java.lang.Integer maxResults) {
+ doSetProperty("maxResults", maxResults);
+ return this;
+ }
+ /**
+ * no of retries to a given request.
+ *
+ * The option is a: <code>int</code> type.
+ *
+ * Group: common
+ *
+ * @param maxRetryRequests the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder maxRetryRequests(
+ int maxRetryRequests) {
+ doSetProperty("maxRetryRequests", maxRetryRequests);
+ return this;
+ }
+ /**
+ * set open options for creating file.
+ *
+ * The option is a:
+ * <code>java.util.Set&lt;java.nio.file.OpenOption&gt;</code> type.
+ *
+ * Group: common
+ *
+ * @param openOptions the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder openOptions(
+ java.util.Set<java.nio.file.OpenOption> openOptions) {
+ doSetProperty("openOptions", openOptions);
+ return this;
+ }
+ /**
+ * path in azure datalake for operations.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param path the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder path(java.lang.String path) {
+ doSetProperty("path", path);
+ return this;
+ }
+ /**
+ * permission string for the file.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param permission the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder permission(
+ java.lang.String permission) {
+ doSetProperty("permission", permission);
+ return this;
+ }
+ /**
+ * This parameter allows the caller to upload data in parallel and
+ * control the order in which it is appended to the file.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param position the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder position(
+ java.lang.Long position) {
+ doSetProperty("position", position);
+ return this;
+ }
+ /**
+ * recursively include all paths.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param recursive the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder recursive(
+ java.lang.Boolean recursive) {
+ doSetProperty("recursive", recursive);
+ return this;
+ }
+ /**
+ * regular expression for matching file names.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param regex the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder regex(
+ java.lang.String regex) {
+ doSetProperty("regex", regex);
+ return this;
+ }
+ /**
+ * Whether or not uncommitted data is to be retained after the
+ * operation.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param retainUncommitedData the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder retainUncommitedData(
+ java.lang.Boolean retainUncommitedData) {
+ doSetProperty("retainUncommitedData", retainUncommitedData);
+ return this;
+ }
+ /**
+ * datalake service client for azure storage datalake.
+ *
+ * The option is a:
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param serviceClient the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder serviceClient(
+ com.azure.storage.file.datalake.DataLakeServiceClient serviceClient) {
+ doSetProperty("serviceClient", serviceClient);
+ return this;
+ }
+ /**
+ * shared key credential for azure datalake gen2.
+ *
+ * The option is a:
+ * <code>com.azure.storage.common.StorageSharedKeyCredential</code> type.
+ *
+ * Group: common
+ *
+ * @param sharedKeyCredential the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder sharedKeyCredential(
+ com.azure.storage.common.StorageSharedKeyCredential sharedKeyCredential) {
+ doSetProperty("sharedKeyCredential", sharedKeyCredential);
+ return this;
+ }
+ /**
+ * tenant id for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param tenantId the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder tenantId(
+ java.lang.String tenantId) {
+ doSetProperty("tenantId", tenantId);
+ return this;
+ }
+ /**
+ * Timeout for operation.
+ *
+ * The option is a: <code>java.time.Duration</code> type.
+ *
+ * Group: common
+ *
+ * @param timeout the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder timeout(
+ java.time.Duration timeout) {
+ doSetProperty("timeout", timeout);
+ return this;
+ }
+ /**
+ * umask permission for file.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param umask the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder umask(
+ java.lang.String umask) {
+ doSetProperty("umask", umask);
+ return this;
+ }
+ /**
+ * whether or not to use upn.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param userPrincipalNameReturned the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder userPrincipalNameReturned(
+ java.lang.Boolean userPrincipalNameReturned) {
+ doSetProperty("userPrincipalNameReturned", userPrincipalNameReturned);
+ return this;
+ }
+ /**
+ * Allows for bridging the consumer to the Camel routing Error Handler,
+ * which mean any exceptions occurred while the consumer is trying to
+ * pickup incoming messages, or the likes, will now be processed as a
+ * message and handled by the routing Error Handler. By default the
+ * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
+ * with exceptions, that will be logged at WARN or ERROR level and
+ * ignored.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: consumer
+ *
+ * @param bridgeErrorHandler the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder bridgeErrorHandler(
+ boolean bridgeErrorHandler) {
+ doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
+ return this;
+ }
+ /**
+ * Whether the producer should be started lazy (on the first message).
+ * By starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
+ * starting and cause the route to fail being started. By deferring this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder lazyStartProducer(
+ boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * operation to be performed.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition</code> type.
+ *
+ * Default: listFileSystem
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder operation(
+ org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Whether autowiring is enabled. This is used for automatic autowiring
+ * options (the option must be marked as autowired) by looking up in the
+ * registry to find if there is a single instance of matching type,
+ * which then gets configured on the component. This can be used for
+ * automatic configuring JDBC data sources, JMS connection factories,
+ * AWS Clients, etc.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: advanced
+ *
+ * @param autowiredEnabled the value to set
+ * @return the dsl builder
+ */
+ default AzureStorageDatalakeComponentBuilder autowiredEnabled(
+ boolean autowiredEnabled) {
+ doSetProperty("autowiredEnabled", autowiredEnabled);
+ return this;
+ }
+ }
+
+ class AzureStorageDatalakeComponentBuilderImpl
+ extends
+ AbstractComponentBuilder<DataLakeComponent>
+ implements
+ AzureStorageDatalakeComponentBuilder {
+ @Override
+ protected DataLakeComponent buildConcreteComponent() {
+ return new DataLakeComponent();
+ }
+ private org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration getOrCreateConfiguration(
+ org.apache.camel.component.azure.storage.datalake.DataLakeComponent component) {
+ if (component.getConfiguration() == null) {
+ component.setConfiguration(new org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration());
+ }
+ return component.getConfiguration();
+ }
+ @Override
+ protected boolean setPropertyOnComponent(
+ Component component,
+ String name,
+ Object value) {
+ switch (name) {
+ case "accountKey": getOrCreateConfiguration((DataLakeComponent) component).setAccountKey((java.lang.String) value); return true;
+ case "clientId": getOrCreateConfiguration((DataLakeComponent) component).setClientId((java.lang.String) value); return true;
+ case "clientSecret": getOrCreateConfiguration((DataLakeComponent) component).setClientSecret((java.lang.String) value); return true;
+ case "clientSecretCredential": getOrCreateConfiguration((DataLakeComponent) component).setClientSecretCredential((com.azure.identity.ClientSecretCredential) value); return true;
+ case "close": getOrCreateConfiguration((DataLakeComponent) component).setClose((java.lang.Boolean) value); return true;
+ case "closeStreamAfterRead": getOrCreateConfiguration((DataLakeComponent) component).setCloseStreamAfterRead((java.lang.Boolean) value); return true;
+ case "configuration": ((DataLakeComponent) component).setConfiguration((org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration) value); return true;
+ case "dataCount": getOrCreateConfiguration((DataLakeComponent) component).setDataCount((java.lang.Long) value); return true;
+ case "directoryName": getOrCreateConfiguration((DataLakeComponent) component).setDirectoryName((java.lang.String) value); return true;
+ case "downloadLinkExpiration": getOrCreateConfiguration((DataLakeComponent) component).setDownloadLinkExpiration((java.lang.Long) value); return true;
+ case "expression": getOrCreateConfiguration((DataLakeComponent) component).setExpression((java.lang.String) value); return true;
+ case "fileDir": getOrCreateConfiguration((DataLakeComponent) component).setFileDir((java.lang.String) value); return true;
+ case "fileName": getOrCreateConfiguration((DataLakeComponent) component).setFileName((java.lang.String) value); return true;
+ case "fileOffset": getOrCreateConfiguration((DataLakeComponent) component).setFileOffset((java.lang.Long) value); return true;
+ case "maxResults": getOrCreateConfiguration((DataLakeComponent) component).setMaxResults((java.lang.Integer) value); return true;
+ case "maxRetryRequests": getOrCreateConfiguration((DataLakeComponent) component).setMaxRetryRequests((int) value); return true;
+ case "openOptions": getOrCreateConfiguration((DataLakeComponent) component).setOpenOptions((java.util.Set) value); return true;
+ case "path": getOrCreateConfiguration((DataLakeComponent) component).setPath((java.lang.String) value); return true;
+ case "permission": getOrCreateConfiguration((DataLakeComponent) component).setPermission((java.lang.String) value); return true;
+ case "position": getOrCreateConfiguration((DataLakeComponent) component).setPosition((java.lang.Long) value); return true;
+ case "recursive": getOrCreateConfiguration((DataLakeComponent) component).setRecursive((java.lang.Boolean) value); return true;
+ case "regex": getOrCreateConfiguration((DataLakeComponent) component).setRegex((java.lang.String) value); return true;
+ case "retainUncommitedData": getOrCreateConfiguration((DataLakeComponent) component).setRetainUncommitedData((java.lang.Boolean) value); return true;
+ case "serviceClient": getOrCreateConfiguration((DataLakeComponent) component).setServiceClient((com.azure.storage.file.datalake.DataLakeServiceClient) value); return true;
+ case "sharedKeyCredential": getOrCreateConfiguration((DataLakeComponent) component).setSharedKeyCredential((com.azure.storage.common.StorageSharedKeyCredential) value); return true;
+ case "tenantId": getOrCreateConfiguration((DataLakeComponent) component).setTenantId((java.lang.String) value); return true;
+ case "timeout": getOrCreateConfiguration((DataLakeComponent) component).setTimeout((java.time.Duration) value); return true;
+ case "umask": getOrCreateConfiguration((DataLakeComponent) component).setUmask((java.lang.String) value); return true;
+ case "userPrincipalNameReturned": getOrCreateConfiguration((DataLakeComponent) component).setUserPrincipalNameReturned((java.lang.Boolean) value); return true;
+ case "bridgeErrorHandler": ((DataLakeComponent) component).setBridgeErrorHandler((boolean) value); return true;
+ case "lazyStartProducer": ((DataLakeComponent) component).setLazyStartProducer((boolean) value); return true;
+ case "operation": getOrCreateConfiguration((DataLakeComponent) component).setOperation((org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition) value); return true;
+ case "autowiredEnabled": ((DataLakeComponent) component).setAutowiredEnabled((boolean) value); return true;
+ default: return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/core/camel-componentdsl/src/generated/resources/metadata.json b/core/camel-componentdsl/src/generated/resources/metadata.json
index adfd612..272ec98 100644
--- a/core/camel-componentdsl/src/generated/resources/metadata.json
+++ b/core/camel-componentdsl/src/generated/resources/metadata.json
@@ -1434,6 +1434,28 @@
"producerOnly": false,
"lenientProperties": false
},
+ "AzureStorageDatalakeComponentBuilderFactory": {
+ "kind": "component",
+ "name": "azure-storage-datalake",
+ "title": "Azure storage datalake service",
+ "description": "Camel Azure Datalake Gen2 Component",
+ "deprecated": false,
+ "firstVersion": "3.8.0",
+ "label": "cloud,file",
+ "javaType": "org.apache.camel.component.azure.storage.datalake.DataLakeComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-azure-storage-datalake",
+ "version": "3.8.0-SNAPSHOT",
+ "scheme": "azure-storage-datalake",
+ "extendsScheme": "",
+ "syntax": "azure-storage-datalake:accountName\/fileSystemName",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": false,
+ "lenientProperties": false
+ },
"AzureStorageQueueComponentBuilderFactory": {
"kind": "component",
"name": "azure-storage-queue",
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index aefd79d..6e870d5 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -83,6 +83,7 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.CxfRsEndpointBuilderFactory.CxfRsBuilders,
org.apache.camel.builder.endpoint.dsl.DJLEndpointBuilderFactory.DJLBuilders,
org.apache.camel.builder.endpoint.dsl.DataFormatEndpointBuilderFactory.DataFormatBuilders,
+ org.apache.camel.builder.endpoint.dsl.DataLakeEndpointBuilderFactory.DataLakeBuilders,
org.apache.camel.builder.endpoint.dsl.DataSetEndpointBuilderFactory.DataSetBuilders,
org.apache.camel.builder.endpoint.dsl.DataSetTestEndpointBuilderFactory.DataSetTestBuilders,
org.apache.camel.builder.endpoint.dsl.Ddb2EndpointBuilderFactory.Ddb2Builders,
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index 6744441..570769b 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -80,6 +80,7 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.CxfRsEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.DJLEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.DataFormatEndpointBuilderFactory,
+ org.apache.camel.builder.endpoint.dsl.DataLakeEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.DataSetEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.DataSetTestEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.Ddb2EndpointBuilderFactory,
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 2de1b75..42c9e16 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -2888,6 +2888,55 @@ public class StaticEndpointBuilders {
return org.apache.camel.builder.endpoint.dsl.BlobEndpointBuilderFactory.endpointBuilder(componentName, path);
}
/**
+ * Azure storage datalake service (camel-azure-storage-datalake)
+ * Camel Azure Datalake Gen2 Component
+ *
+ * Category: cloud,file
+ * Since: 3.8
+ * Maven coordinates: org.apache.camel:camel-azure-storage-datalake
+ *
+ * Syntax: <code>azure-storage-datalake:accountName/fileSystemName</code>
+ *
+ * Path parameter: accountName
+ * name of the azure account
+ *
+ * Path parameter: fileSystemName
+ * name of filesystem to be used
+ *
+ * @param path accountName/fileSystemName
+ * @return the dsl builder
+ */
+ public static org.apache.camel.builder.endpoint.dsl.DataLakeEndpointBuilderFactory.DataLakeEndpointBuilder azureStorageDatalake(
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.DataLakeEndpointBuilderFactory.endpointBuilder("azure-storage-datalake", path);
+ }
+ /**
+ * Azure storage datalake service (camel-azure-storage-datalake)
+ * Camel Azure Datalake Gen2 Component
+ *
+ * Category: cloud,file
+ * Since: 3.8
+ * Maven coordinates: org.apache.camel:camel-azure-storage-datalake
+ *
+ * Syntax: <code>azure-storage-datalake:accountName/fileSystemName</code>
+ *
+ * Path parameter: accountName
+ * name of the azure account
+ *
+ * Path parameter: fileSystemName
+ * name of filesystem to be used
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path accountName/fileSystemName
+ * @return the dsl builder
+ */
+ public static org.apache.camel.builder.endpoint.dsl.DataLakeEndpointBuilderFactory.DataLakeEndpointBuilder azureStorageDatalake(
+ String componentName,
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.DataLakeEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+ /**
* Azure Storage Queue Service (camel-azure-storage-queue)
* The azure-storage-queue component is used for storing and retrieving the
* messages to/from Azure Storage Queue using Azure SDK v12.
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataLakeEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataLakeEndpointBuilderFactory.java
new file mode 100644
index 0000000..2d8e7f3
--- /dev/null
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataLakeEndpointBuilderFactory.java
@@ -0,0 +1,2465 @@
+/*
+ * 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.builder.endpoint.dsl;
+
+import java.nio.file.OpenOption;
+import java.time.Duration;
+import java.util.Set;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * Camel Azure Datalake Gen2 Component
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface DataLakeEndpointBuilderFactory {
+
+
+ /**
+ * Builder for endpoint consumers for the Azure storage datalake service
+ * component.
+ */
+ public interface DataLakeEndpointConsumerBuilder
+ extends
+ EndpointConsumerBuilder {
+ default AdvancedDataLakeEndpointConsumerBuilder advanced() {
+ return (AdvancedDataLakeEndpointConsumerBuilder) this;
+ }
+ /**
+ * account key for authentication.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param accountKey the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder accountKey(String accountKey) {
+ doSetProperty("accountKey", accountKey);
+ return this;
+ }
+ /**
+ * client id for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param clientId the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder clientId(String clientId) {
+ doSetProperty("clientId", clientId);
+ return this;
+ }
+ /**
+ * client secret for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param clientSecret the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder clientSecret(String clientSecret) {
+ doSetProperty("clientSecret", clientSecret);
+ return this;
+ }
+ /**
+ * client secret credential for authentication.
+ *
+ * The option is a:
+ * <code>com.azure.identity.ClientSecretCredential</code>
+ * type.
+ *
+ * Group: common
+ *
+ * @param clientSecretCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder clientSecretCredential(
+ Object clientSecretCredential) {
+ doSetProperty("clientSecretCredential", clientSecretCredential);
+ return this;
+ }
+ /**
+ * client secret credential for authentication.
+ *
+ * The option will be converted to a
+ * <code>com.azure.identity.ClientSecretCredential</code>
+ * type.
+ *
+ * Group: common
+ *
+ * @param clientSecretCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder clientSecretCredential(
+ String clientSecretCredential) {
+ doSetProperty("clientSecretCredential", clientSecretCredential);
+ return this;
+ }
+ /**
+ * Whether or not a file changed event raised indicates completion
+ * (true) or modification (false).
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param close the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder close(Boolean close) {
+ doSetProperty("close", close);
+ return this;
+ }
+ /**
+ * Whether or not a file changed event raised indicates completion
+ * (true) or modification (false).
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param close the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder close(String close) {
+ doSetProperty("close", close);
+ return this;
+ }
+ /**
+ * check for closing stream after read.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param closeStreamAfterRead the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder closeStreamAfterRead(
+ Boolean closeStreamAfterRead) {
+ doSetProperty("closeStreamAfterRead", closeStreamAfterRead);
+ return this;
+ }
+ /**
+ * check for closing stream after read.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param closeStreamAfterRead the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder closeStreamAfterRead(
+ String closeStreamAfterRead) {
+ doSetProperty("closeStreamAfterRead", closeStreamAfterRead);
+ return this;
+ }
+ /**
+ * count number of bytes to download.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param dataCount the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder dataCount(Long dataCount) {
+ doSetProperty("dataCount", dataCount);
+ return this;
+ }
+ /**
+ * count number of bytes to download.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param dataCount the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder dataCount(String dataCount) {
+ doSetProperty("dataCount", dataCount);
+ return this;
+ }
+ /**
+ * service client of datalake.
+ *
+ * The option is a:
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param dataLakeServiceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder dataLakeServiceClient(
+ Object dataLakeServiceClient) {
+ doSetProperty("dataLakeServiceClient", dataLakeServiceClient);
+ return this;
+ }
+ /**
+ * service client of datalake.
+ *
+ * The option will be converted to a
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param dataLakeServiceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder dataLakeServiceClient(
+ String dataLakeServiceClient) {
+ doSetProperty("dataLakeServiceClient", dataLakeServiceClient);
+ return this;
+ }
+ /**
+ * directory of the file to be handled in component.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param directoryName the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder directoryName(
+ String directoryName) {
+ doSetProperty("directoryName", directoryName);
+ return this;
+ }
+ /**
+ * download link expiration time.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param downloadLinkExpiration the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder downloadLinkExpiration(
+ Long downloadLinkExpiration) {
+ doSetProperty("downloadLinkExpiration", downloadLinkExpiration);
+ return this;
+ }
+ /**
+ * download link expiration time.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param downloadLinkExpiration the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder downloadLinkExpiration(
+ String downloadLinkExpiration) {
+ doSetProperty("downloadLinkExpiration", downloadLinkExpiration);
+ return this;
+ }
+ /**
+ * expression for queryInputStream.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param expression the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder expression(String expression) {
+ doSetProperty("expression", expression);
+ return this;
+ }
+ /**
+ * directory of file to do operations in the local system.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param fileDir the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder fileDir(String fileDir) {
+ doSetProperty("fileDir", fileDir);
+ return this;
+ }
+ /**
+ * name of file to be handled in component.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param fileName the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder fileName(String fileName) {
+ doSetProperty("fileName", fileName);
+ return this;
+ }
+ /**
+ * offset position in file for different operations.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param fileOffset the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder fileOffset(Long fileOffset) {
+ doSetProperty("fileOffset", fileOffset);
+ return this;
+ }
+ /**
+ * offset position in file for different operations.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param fileOffset the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder fileOffset(String fileOffset) {
+ doSetProperty("fileOffset", fileOffset);
+ return this;
+ }
+ /**
+ * maximum number of results to show at a time.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: common
+ *
+ * @param maxResults the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder maxResults(Integer maxResults) {
+ doSetProperty("maxResults", maxResults);
+ return this;
+ }
+ /**
+ * maximum number of results to show at a time.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Integer</code> type.
+ *
+ * Group: common
+ *
+ * @param maxResults the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder maxResults(String maxResults) {
+ doSetProperty("maxResults", maxResults);
+ return this;
+ }
+ /**
+ * no of retries to a given request.
+ *
+ * The option is a: <code>int</code> type.
+ *
+ * Group: common
+ *
+ * @param maxRetryRequests the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder maxRetryRequests(
+ int maxRetryRequests) {
+ doSetProperty("maxRetryRequests", maxRetryRequests);
+ return this;
+ }
+ /**
+ * no of retries to a given request.
+ *
+ * The option will be converted to a <code>int</code> type.
+ *
+ * Group: common
+ *
+ * @param maxRetryRequests the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder maxRetryRequests(
+ String maxRetryRequests) {
+ doSetProperty("maxRetryRequests", maxRetryRequests);
+ return this;
+ }
+ /**
+ * set open options for creating file.
+ *
+ * The option is a:
+ * <code>java.util.Set&lt;java.nio.file.OpenOption&gt;</code> type.
+ *
+ * Group: common
+ *
+ * @param openOptions the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder openOptions(
+ Set<OpenOption> openOptions) {
+ doSetProperty("openOptions", openOptions);
+ return this;
+ }
+ /**
+ * set open options for creating file.
+ *
+ * The option will be converted to a
+ * <code>java.util.Set&lt;java.nio.file.OpenOption&gt;</code> type.
+ *
+ * Group: common
+ *
+ * @param openOptions the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder openOptions(String openOptions) {
+ doSetProperty("openOptions", openOptions);
+ return this;
+ }
+ /**
+ * path in azure datalake for operations.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param path the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder path(String path) {
+ doSetProperty("path", path);
+ return this;
+ }
+ /**
+ * permission string for the file.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param permission the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder permission(String permission) {
+ doSetProperty("permission", permission);
+ return this;
+ }
+ /**
+ * This parameter allows the caller to upload data in parallel and
+ * control the order in which it is appended to the file.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param position the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder position(Long position) {
+ doSetProperty("position", position);
+ return this;
+ }
+ /**
+ * This parameter allows the caller to upload data in parallel and
+ * control the order in which it is appended to the file.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param position the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder position(String position) {
+ doSetProperty("position", position);
+ return this;
+ }
+ /**
+ * recursively include all paths.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param recursive the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder recursive(Boolean recursive) {
+ doSetProperty("recursive", recursive);
+ return this;
+ }
+ /**
+ * recursively include all paths.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param recursive the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder recursive(String recursive) {
+ doSetProperty("recursive", recursive);
+ return this;
+ }
+ /**
+ * regular expression for matching file names.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param regex the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder regex(String regex) {
+ doSetProperty("regex", regex);
+ return this;
+ }
+ /**
+ * Whether or not uncommitted data is to be retained after the
+ * operation.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param retainUncommitedData the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder retainUncommitedData(
+ Boolean retainUncommitedData) {
+ doSetProperty("retainUncommitedData", retainUncommitedData);
+ return this;
+ }
+ /**
+ * Whether or not uncommitted data is to be retained after the
+ * operation.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param retainUncommitedData the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder retainUncommitedData(
+ String retainUncommitedData) {
+ doSetProperty("retainUncommitedData", retainUncommitedData);
+ return this;
+ }
+ /**
+ * datalake service client for azure storage datalake.
+ *
+ * The option is a:
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param serviceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder serviceClient(
+ Object serviceClient) {
+ doSetProperty("serviceClient", serviceClient);
+ return this;
+ }
+ /**
+ * datalake service client for azure storage datalake.
+ *
+ * The option will be converted to a
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param serviceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder serviceClient(
+ String serviceClient) {
+ doSetProperty("serviceClient", serviceClient);
+ return this;
+ }
+ /**
+ * shared key credential for azure datalake gen2.
+ *
+ * The option is a:
+ * <code>com.azure.storage.common.StorageSharedKeyCredential</code> type.
+ *
+ * Group: common
+ *
+ * @param sharedKeyCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder sharedKeyCredential(
+ Object sharedKeyCredential) {
+ doSetProperty("sharedKeyCredential", sharedKeyCredential);
+ return this;
+ }
+ /**
+ * shared key credential for azure datalake gen2.
+ *
+ * The option will be converted to a
+ * <code>com.azure.storage.common.StorageSharedKeyCredential</code> type.
+ *
+ * Group: common
+ *
+ * @param sharedKeyCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder sharedKeyCredential(
+ String sharedKeyCredential) {
+ doSetProperty("sharedKeyCredential", sharedKeyCredential);
+ return this;
+ }
+ /**
+ * tenant id for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param tenantId the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder tenantId(String tenantId) {
+ doSetProperty("tenantId", tenantId);
+ return this;
+ }
+ /**
+ * Timeout for operation.
+ *
+ * The option is a: <code>java.time.Duration</code> type.
+ *
+ * Group: common
+ *
+ * @param timeout the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder timeout(Duration timeout) {
+ doSetProperty("timeout", timeout);
+ return this;
+ }
+ /**
+ * Timeout for operation.
+ *
+ * The option will be converted to a
+ * <code>java.time.Duration</code> type.
+ *
+ * Group: common
+ *
+ * @param timeout the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder timeout(String timeout) {
+ doSetProperty("timeout", timeout);
+ return this;
+ }
+ /**
+ * umask permission for file.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param umask the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder umask(String umask) {
+ doSetProperty("umask", umask);
+ return this;
+ }
+ /**
+ * whether or not to use upn.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param userPrincipalNameReturned the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder userPrincipalNameReturned(
+ Boolean userPrincipalNameReturned) {
+ doSetProperty("userPrincipalNameReturned", userPrincipalNameReturned);
+ return this;
+ }
+ /**
+ * whether or not to use upn.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param userPrincipalNameReturned the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder userPrincipalNameReturned(
+ String userPrincipalNameReturned) {
+ doSetProperty("userPrincipalNameReturned", userPrincipalNameReturned);
+ return this;
+ }
+ /**
+ * Allows for bridging the consumer to the Camel routing Error Handler,
+ * which mean any exceptions occurred while the consumer is trying to
+ * pickup incoming messages, or the likes, will now be processed as a
+ * message and handled by the routing Error Handler. By default the
+ * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
+ * with exceptions, that will be logged at WARN or ERROR level and
+ * ignored.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: consumer
+ *
+ * @param bridgeErrorHandler the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder bridgeErrorHandler(
+ boolean bridgeErrorHandler) {
+ doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
+ return this;
+ }
+ /**
+ * Allows for bridging the consumer to the Camel routing Error Handler,
+ * which mean any exceptions occurred while the consumer is trying to
+ * pickup incoming messages, or the likes, will now be processed as a
+ * message and handled by the routing Error Handler. By default the
+ * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
+ * with exceptions, that will be logged at WARN or ERROR level and
+ * ignored.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: consumer
+ *
+ * @param bridgeErrorHandler the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointConsumerBuilder bridgeErrorHandler(
+ String bridgeErrorHandler) {
+ doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint consumers for the Azure storage datalake
+ * service component.
+ */
+ public interface AdvancedDataLakeEndpointConsumerBuilder
+ extends
+ EndpointConsumerBuilder {
+ default DataLakeEndpointConsumerBuilder basic() {
+ return (DataLakeEndpointConsumerBuilder) this;
+ }
+ /**
+ * To let the consumer use a custom ExceptionHandler. Notice if the
+ * option bridgeErrorHandler is enabled then this option is not in use.
+ * By default the consumer will deal with exceptions, that will be
+ * logged at WARN or ERROR level and ignored.
+ *
+ * The option is a:
+ * <code>org.apache.camel.spi.ExceptionHandler</code> type.
+ *
+ * Group: consumer (advanced)
+ *
+ * @param exceptionHandler the value to set
+ * @return the dsl builder
+ */
+ default AdvancedDataLakeEndpointConsumerBuilder exceptionHandler(
+ ExceptionHandler exceptionHandler) {
+ doSetProperty("exceptionHandler", exceptionHandler);
+ return this;
+ }
+ /**
+ * To let the consumer use a custom ExceptionHandler. Notice if the
+ * option bridgeErrorHandler is enabled then this option is not in use.
+ * By default the consumer will deal with exceptions, that will be
+ * logged at WARN or ERROR level and ignored.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.spi.ExceptionHandler</code> type.
+ *
+ * Group: consumer (advanced)
+ *
+ * @param exceptionHandler the value to set
+ * @return the dsl builder
+ */
+ default AdvancedDataLakeEndpointConsumerBuilder exceptionHandler(
+ String exceptionHandler) {
+ doSetProperty("exceptionHandler", exceptionHandler);
+ return this;
+ }
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange.
+ *
+ * The option is a:
+ * <code>org.apache.camel.ExchangePattern</code> type.
+ *
+ * Group: consumer (advanced)
+ *
+ * @param exchangePattern the value to set
+ * @return the dsl builder
+ */
+ default AdvancedDataLakeEndpointConsumerBuilder exchangePattern(
+ ExchangePattern exchangePattern) {
+ doSetProperty("exchangePattern", exchangePattern);
+ return this;
+ }
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.ExchangePattern</code> type.
+ *
+ * Group: consumer (advanced)
+ *
+ * @param exchangePattern the value to set
+ * @return the dsl builder
+ */
+ default AdvancedDataLakeEndpointConsumerBuilder exchangePattern(
+ String exchangePattern) {
+ doSetProperty("exchangePattern", exchangePattern);
+ return this;
+ }
+ }
+
+ /**
+ * Builder for endpoint producers for the Azure storage datalake service
+ * component.
+ */
+ public interface DataLakeEndpointProducerBuilder
+ extends
+ EndpointProducerBuilder {
+ default AdvancedDataLakeEndpointProducerBuilder advanced() {
+ return (AdvancedDataLakeEndpointProducerBuilder) this;
+ }
+ /**
+ * account key for authentication.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param accountKey the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder accountKey(String accountKey) {
+ doSetProperty("accountKey", accountKey);
+ return this;
+ }
+ /**
+ * client id for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param clientId the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder clientId(String clientId) {
+ doSetProperty("clientId", clientId);
+ return this;
+ }
+ /**
+ * client secret for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param clientSecret the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder clientSecret(String clientSecret) {
+ doSetProperty("clientSecret", clientSecret);
+ return this;
+ }
+ /**
+ * client secret credential for authentication.
+ *
+ * The option is a:
+ * <code>com.azure.identity.ClientSecretCredential</code>
+ * type.
+ *
+ * Group: common
+ *
+ * @param clientSecretCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder clientSecretCredential(
+ Object clientSecretCredential) {
+ doSetProperty("clientSecretCredential", clientSecretCredential);
+ return this;
+ }
+ /**
+ * client secret credential for authentication.
+ *
+ * The option will be converted to a
+ * <code>com.azure.identity.ClientSecretCredential</code>
+ * type.
+ *
+ * Group: common
+ *
+ * @param clientSecretCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder clientSecretCredential(
+ String clientSecretCredential) {
+ doSetProperty("clientSecretCredential", clientSecretCredential);
+ return this;
+ }
+ /**
+ * Whether or not a file changed event raised indicates completion
+ * (true) or modification (false).
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param close the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder close(Boolean close) {
+ doSetProperty("close", close);
+ return this;
+ }
+ /**
+ * Whether or not a file changed event raised indicates completion
+ * (true) or modification (false).
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param close the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder close(String close) {
+ doSetProperty("close", close);
+ return this;
+ }
+ /**
+ * check for closing stream after read.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param closeStreamAfterRead the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder closeStreamAfterRead(
+ Boolean closeStreamAfterRead) {
+ doSetProperty("closeStreamAfterRead", closeStreamAfterRead);
+ return this;
+ }
+ /**
+ * check for closing stream after read.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param closeStreamAfterRead the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder closeStreamAfterRead(
+ String closeStreamAfterRead) {
+ doSetProperty("closeStreamAfterRead", closeStreamAfterRead);
+ return this;
+ }
+ /**
+ * count number of bytes to download.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param dataCount the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder dataCount(Long dataCount) {
+ doSetProperty("dataCount", dataCount);
+ return this;
+ }
+ /**
+ * count number of bytes to download.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param dataCount the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder dataCount(String dataCount) {
+ doSetProperty("dataCount", dataCount);
+ return this;
+ }
+ /**
+ * service client of datalake.
+ *
+ * The option is a:
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param dataLakeServiceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder dataLakeServiceClient(
+ Object dataLakeServiceClient) {
+ doSetProperty("dataLakeServiceClient", dataLakeServiceClient);
+ return this;
+ }
+ /**
+ * service client of datalake.
+ *
+ * The option will be converted to a
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param dataLakeServiceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder dataLakeServiceClient(
+ String dataLakeServiceClient) {
+ doSetProperty("dataLakeServiceClient", dataLakeServiceClient);
+ return this;
+ }
+ /**
+ * directory of the file to be handled in component.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param directoryName the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder directoryName(
+ String directoryName) {
+ doSetProperty("directoryName", directoryName);
+ return this;
+ }
+ /**
+ * download link expiration time.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param downloadLinkExpiration the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder downloadLinkExpiration(
+ Long downloadLinkExpiration) {
+ doSetProperty("downloadLinkExpiration", downloadLinkExpiration);
+ return this;
+ }
+ /**
+ * download link expiration time.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param downloadLinkExpiration the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder downloadLinkExpiration(
+ String downloadLinkExpiration) {
+ doSetProperty("downloadLinkExpiration", downloadLinkExpiration);
+ return this;
+ }
+ /**
+ * expression for queryInputStream.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param expression the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder expression(String expression) {
+ doSetProperty("expression", expression);
+ return this;
+ }
+ /**
+ * directory of file to do operations in the local system.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param fileDir the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder fileDir(String fileDir) {
+ doSetProperty("fileDir", fileDir);
+ return this;
+ }
+ /**
+ * name of file to be handled in component.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param fileName the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder fileName(String fileName) {
+ doSetProperty("fileName", fileName);
+ return this;
+ }
+ /**
+ * offset position in file for different operations.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param fileOffset the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder fileOffset(Long fileOffset) {
+ doSetProperty("fileOffset", fileOffset);
+ return this;
+ }
+ /**
+ * offset position in file for different operations.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param fileOffset the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder fileOffset(String fileOffset) {
+ doSetProperty("fileOffset", fileOffset);
+ return this;
+ }
+ /**
+ * maximum number of results to show at a time.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: common
+ *
+ * @param maxResults the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder maxResults(Integer maxResults) {
+ doSetProperty("maxResults", maxResults);
+ return this;
+ }
+ /**
+ * maximum number of results to show at a time.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Integer</code> type.
+ *
+ * Group: common
+ *
+ * @param maxResults the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder maxResults(String maxResults) {
+ doSetProperty("maxResults", maxResults);
+ return this;
+ }
+ /**
+ * no of retries to a given request.
+ *
+ * The option is a: <code>int</code> type.
+ *
+ * Group: common
+ *
+ * @param maxRetryRequests the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder maxRetryRequests(
+ int maxRetryRequests) {
+ doSetProperty("maxRetryRequests", maxRetryRequests);
+ return this;
+ }
+ /**
+ * no of retries to a given request.
+ *
+ * The option will be converted to a <code>int</code> type.
+ *
+ * Group: common
+ *
+ * @param maxRetryRequests the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder maxRetryRequests(
+ String maxRetryRequests) {
+ doSetProperty("maxRetryRequests", maxRetryRequests);
+ return this;
+ }
+ /**
+ * set open options for creating file.
+ *
+ * The option is a:
+ * <code>java.util.Set&lt;java.nio.file.OpenOption&gt;</code> type.
+ *
+ * Group: common
+ *
+ * @param openOptions the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder openOptions(
+ Set<OpenOption> openOptions) {
+ doSetProperty("openOptions", openOptions);
+ return this;
+ }
+ /**
+ * set open options for creating file.
+ *
+ * The option will be converted to a
+ * <code>java.util.Set&lt;java.nio.file.OpenOption&gt;</code> type.
+ *
+ * Group: common
+ *
+ * @param openOptions the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder openOptions(String openOptions) {
+ doSetProperty("openOptions", openOptions);
+ return this;
+ }
+ /**
+ * path in azure datalake for operations.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param path the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder path(String path) {
+ doSetProperty("path", path);
+ return this;
+ }
+ /**
+ * permission string for the file.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param permission the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder permission(String permission) {
+ doSetProperty("permission", permission);
+ return this;
+ }
+ /**
+ * This parameter allows the caller to upload data in parallel and
+ * control the order in which it is appended to the file.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param position the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder position(Long position) {
+ doSetProperty("position", position);
+ return this;
+ }
+ /**
+ * This parameter allows the caller to upload data in parallel and
+ * control the order in which it is appended to the file.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param position the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder position(String position) {
+ doSetProperty("position", position);
+ return this;
+ }
+ /**
+ * recursively include all paths.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param recursive the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder recursive(Boolean recursive) {
+ doSetProperty("recursive", recursive);
+ return this;
+ }
+ /**
+ * recursively include all paths.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param recursive the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder recursive(String recursive) {
+ doSetProperty("recursive", recursive);
+ return this;
+ }
+ /**
+ * regular expression for matching file names.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param regex the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder regex(String regex) {
+ doSetProperty("regex", regex);
+ return this;
+ }
+ /**
+ * Whether or not uncommitted data is to be retained after the
+ * operation.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param retainUncommitedData the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder retainUncommitedData(
+ Boolean retainUncommitedData) {
+ doSetProperty("retainUncommitedData", retainUncommitedData);
+ return this;
+ }
+ /**
+ * Whether or not uncommitted data is to be retained after the
+ * operation.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param retainUncommitedData the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder retainUncommitedData(
+ String retainUncommitedData) {
+ doSetProperty("retainUncommitedData", retainUncommitedData);
+ return this;
+ }
+ /**
+ * datalake service client for azure storage datalake.
+ *
+ * The option is a:
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param serviceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder serviceClient(
+ Object serviceClient) {
+ doSetProperty("serviceClient", serviceClient);
+ return this;
+ }
+ /**
+ * datalake service client for azure storage datalake.
+ *
+ * The option will be converted to a
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param serviceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder serviceClient(
+ String serviceClient) {
+ doSetProperty("serviceClient", serviceClient);
+ return this;
+ }
+ /**
+ * shared key credential for azure datalake gen2.
+ *
+ * The option is a:
+ * <code>com.azure.storage.common.StorageSharedKeyCredential</code> type.
+ *
+ * Group: common
+ *
+ * @param sharedKeyCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder sharedKeyCredential(
+ Object sharedKeyCredential) {
+ doSetProperty("sharedKeyCredential", sharedKeyCredential);
+ return this;
+ }
+ /**
+ * shared key credential for azure datalake gen2.
+ *
+ * The option will be converted to a
+ * <code>com.azure.storage.common.StorageSharedKeyCredential</code> type.
+ *
+ * Group: common
+ *
+ * @param sharedKeyCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder sharedKeyCredential(
+ String sharedKeyCredential) {
+ doSetProperty("sharedKeyCredential", sharedKeyCredential);
+ return this;
+ }
+ /**
+ * tenant id for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param tenantId the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder tenantId(String tenantId) {
+ doSetProperty("tenantId", tenantId);
+ return this;
+ }
+ /**
+ * Timeout for operation.
+ *
+ * The option is a: <code>java.time.Duration</code> type.
+ *
+ * Group: common
+ *
+ * @param timeout the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder timeout(Duration timeout) {
+ doSetProperty("timeout", timeout);
+ return this;
+ }
+ /**
+ * Timeout for operation.
+ *
+ * The option will be converted to a
+ * <code>java.time.Duration</code> type.
+ *
+ * Group: common
+ *
+ * @param timeout the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder timeout(String timeout) {
+ doSetProperty("timeout", timeout);
+ return this;
+ }
+ /**
+ * umask permission for file.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param umask the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder umask(String umask) {
+ doSetProperty("umask", umask);
+ return this;
+ }
+ /**
+ * whether or not to use upn.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param userPrincipalNameReturned the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder userPrincipalNameReturned(
+ Boolean userPrincipalNameReturned) {
+ doSetProperty("userPrincipalNameReturned", userPrincipalNameReturned);
+ return this;
+ }
+ /**
+ * whether or not to use upn.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param userPrincipalNameReturned the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder userPrincipalNameReturned(
+ String userPrincipalNameReturned) {
+ doSetProperty("userPrincipalNameReturned", userPrincipalNameReturned);
+ return this;
+ }
+ /**
+ * Whether the producer should be started lazy (on the first message).
+ * By starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
+ * starting and cause the route to fail being started. By deferring this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder lazyStartProducer(
+ boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * Whether the producer should be started lazy (on the first message).
+ * By starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
+ * starting and cause the route to fail being started. By deferring this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder lazyStartProducer(
+ String lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * operation to be performed.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition</code> type.
+ *
+ * Default: listFileSystem
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder operation(
+ DataLakeOperationsDefinition operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * operation to be performed.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition</code> type.
+ *
+ * Default: listFileSystem
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointProducerBuilder operation(String operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint producers for the Azure storage datalake
+ * service component.
+ */
+ public interface AdvancedDataLakeEndpointProducerBuilder
+ extends
+ EndpointProducerBuilder {
+ default DataLakeEndpointProducerBuilder basic() {
+ return (DataLakeEndpointProducerBuilder) this;
+ }
+ }
+
+ /**
+ * Builder for endpoint for the Azure storage datalake service component.
+ */
+ public interface DataLakeEndpointBuilder
+ extends
+ DataLakeEndpointConsumerBuilder,
+ DataLakeEndpointProducerBuilder {
+ default AdvancedDataLakeEndpointBuilder advanced() {
+ return (AdvancedDataLakeEndpointBuilder) this;
+ }
+ /**
+ * account key for authentication.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param accountKey the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder accountKey(String accountKey) {
+ doSetProperty("accountKey", accountKey);
+ return this;
+ }
+ /**
+ * client id for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param clientId the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder clientId(String clientId) {
+ doSetProperty("clientId", clientId);
+ return this;
+ }
+ /**
+ * client secret for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param clientSecret the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder clientSecret(String clientSecret) {
+ doSetProperty("clientSecret", clientSecret);
+ return this;
+ }
+ /**
+ * client secret credential for authentication.
+ *
+ * The option is a:
+ * <code>com.azure.identity.ClientSecretCredential</code>
+ * type.
+ *
+ * Group: common
+ *
+ * @param clientSecretCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder clientSecretCredential(
+ Object clientSecretCredential) {
+ doSetProperty("clientSecretCredential", clientSecretCredential);
+ return this;
+ }
+ /**
+ * client secret credential for authentication.
+ *
+ * The option will be converted to a
+ * <code>com.azure.identity.ClientSecretCredential</code>
+ * type.
+ *
+ * Group: common
+ *
+ * @param clientSecretCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder clientSecretCredential(
+ String clientSecretCredential) {
+ doSetProperty("clientSecretCredential", clientSecretCredential);
+ return this;
+ }
+ /**
+ * Whether or not a file changed event raised indicates completion
+ * (true) or modification (false).
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param close the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder close(Boolean close) {
+ doSetProperty("close", close);
+ return this;
+ }
+ /**
+ * Whether or not a file changed event raised indicates completion
+ * (true) or modification (false).
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param close the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder close(String close) {
+ doSetProperty("close", close);
+ return this;
+ }
+ /**
+ * check for closing stream after read.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param closeStreamAfterRead the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder closeStreamAfterRead(
+ Boolean closeStreamAfterRead) {
+ doSetProperty("closeStreamAfterRead", closeStreamAfterRead);
+ return this;
+ }
+ /**
+ * check for closing stream after read.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param closeStreamAfterRead the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder closeStreamAfterRead(
+ String closeStreamAfterRead) {
+ doSetProperty("closeStreamAfterRead", closeStreamAfterRead);
+ return this;
+ }
+ /**
+ * count number of bytes to download.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param dataCount the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder dataCount(Long dataCount) {
+ doSetProperty("dataCount", dataCount);
+ return this;
+ }
+ /**
+ * count number of bytes to download.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param dataCount the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder dataCount(String dataCount) {
+ doSetProperty("dataCount", dataCount);
+ return this;
+ }
+ /**
+ * service client of datalake.
+ *
+ * The option is a:
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param dataLakeServiceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder dataLakeServiceClient(
+ Object dataLakeServiceClient) {
+ doSetProperty("dataLakeServiceClient", dataLakeServiceClient);
+ return this;
+ }
+ /**
+ * service client of datalake.
+ *
+ * The option will be converted to a
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param dataLakeServiceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder dataLakeServiceClient(
+ String dataLakeServiceClient) {
+ doSetProperty("dataLakeServiceClient", dataLakeServiceClient);
+ return this;
+ }
+ /**
+ * directory of the file to be handled in component.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param directoryName the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder directoryName(String directoryName) {
+ doSetProperty("directoryName", directoryName);
+ return this;
+ }
+ /**
+ * download link expiration time.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param downloadLinkExpiration the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder downloadLinkExpiration(
+ Long downloadLinkExpiration) {
+ doSetProperty("downloadLinkExpiration", downloadLinkExpiration);
+ return this;
+ }
+ /**
+ * download link expiration time.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param downloadLinkExpiration the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder downloadLinkExpiration(
+ String downloadLinkExpiration) {
+ doSetProperty("downloadLinkExpiration", downloadLinkExpiration);
+ return this;
+ }
+ /**
+ * expression for queryInputStream.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param expression the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder expression(String expression) {
+ doSetProperty("expression", expression);
+ return this;
+ }
+ /**
+ * directory of file to do operations in the local system.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param fileDir the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder fileDir(String fileDir) {
+ doSetProperty("fileDir", fileDir);
+ return this;
+ }
+ /**
+ * name of file to be handled in component.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param fileName the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder fileName(String fileName) {
+ doSetProperty("fileName", fileName);
+ return this;
+ }
+ /**
+ * offset position in file for different operations.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param fileOffset the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder fileOffset(Long fileOffset) {
+ doSetProperty("fileOffset", fileOffset);
+ return this;
+ }
+ /**
+ * offset position in file for different operations.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param fileOffset the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder fileOffset(String fileOffset) {
+ doSetProperty("fileOffset", fileOffset);
+ return this;
+ }
+ /**
+ * maximum number of results to show at a time.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: common
+ *
+ * @param maxResults the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder maxResults(Integer maxResults) {
+ doSetProperty("maxResults", maxResults);
+ return this;
+ }
+ /**
+ * maximum number of results to show at a time.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Integer</code> type.
+ *
+ * Group: common
+ *
+ * @param maxResults the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder maxResults(String maxResults) {
+ doSetProperty("maxResults", maxResults);
+ return this;
+ }
+ /**
+ * no of retries to a given request.
+ *
+ * The option is a: <code>int</code> type.
+ *
+ * Group: common
+ *
+ * @param maxRetryRequests the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder maxRetryRequests(int maxRetryRequests) {
+ doSetProperty("maxRetryRequests", maxRetryRequests);
+ return this;
+ }
+ /**
+ * no of retries to a given request.
+ *
+ * The option will be converted to a <code>int</code> type.
+ *
+ * Group: common
+ *
+ * @param maxRetryRequests the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder maxRetryRequests(String maxRetryRequests) {
+ doSetProperty("maxRetryRequests", maxRetryRequests);
+ return this;
+ }
+ /**
+ * set open options for creating file.
+ *
+ * The option is a:
+ * <code>java.util.Set&lt;java.nio.file.OpenOption&gt;</code> type.
+ *
+ * Group: common
+ *
+ * @param openOptions the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder openOptions(Set<OpenOption> openOptions) {
+ doSetProperty("openOptions", openOptions);
+ return this;
+ }
+ /**
+ * set open options for creating file.
+ *
+ * The option will be converted to a
+ * <code>java.util.Set&lt;java.nio.file.OpenOption&gt;</code> type.
+ *
+ * Group: common
+ *
+ * @param openOptions the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder openOptions(String openOptions) {
+ doSetProperty("openOptions", openOptions);
+ return this;
+ }
+ /**
+ * path in azure datalake for operations.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param path the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder path(String path) {
+ doSetProperty("path", path);
+ return this;
+ }
+ /**
+ * permission string for the file.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param permission the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder permission(String permission) {
+ doSetProperty("permission", permission);
+ return this;
+ }
+ /**
+ * This parameter allows the caller to upload data in parallel and
+ * control the order in which it is appended to the file.
+ *
+ * The option is a: <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param position the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder position(Long position) {
+ doSetProperty("position", position);
+ return this;
+ }
+ /**
+ * This parameter allows the caller to upload data in parallel and
+ * control the order in which it is appended to the file.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Long</code> type.
+ *
+ * Group: common
+ *
+ * @param position the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder position(String position) {
+ doSetProperty("position", position);
+ return this;
+ }
+ /**
+ * recursively include all paths.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param recursive the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder recursive(Boolean recursive) {
+ doSetProperty("recursive", recursive);
+ return this;
+ }
+ /**
+ * recursively include all paths.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param recursive the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder recursive(String recursive) {
+ doSetProperty("recursive", recursive);
+ return this;
+ }
+ /**
+ * regular expression for matching file names.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param regex the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder regex(String regex) {
+ doSetProperty("regex", regex);
+ return this;
+ }
+ /**
+ * Whether or not uncommitted data is to be retained after the
+ * operation.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param retainUncommitedData the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder retainUncommitedData(
+ Boolean retainUncommitedData) {
+ doSetProperty("retainUncommitedData", retainUncommitedData);
+ return this;
+ }
+ /**
+ * Whether or not uncommitted data is to be retained after the
+ * operation.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param retainUncommitedData the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder retainUncommitedData(
+ String retainUncommitedData) {
+ doSetProperty("retainUncommitedData", retainUncommitedData);
+ return this;
+ }
+ /**
+ * datalake service client for azure storage datalake.
+ *
+ * The option is a:
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param serviceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder serviceClient(Object serviceClient) {
+ doSetProperty("serviceClient", serviceClient);
+ return this;
+ }
+ /**
+ * datalake service client for azure storage datalake.
+ *
+ * The option will be converted to a
+ * <code>com.azure.storage.file.datalake.DataLakeServiceClient</code> type.
+ *
+ * Group: common
+ *
+ * @param serviceClient the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder serviceClient(String serviceClient) {
+ doSetProperty("serviceClient", serviceClient);
+ return this;
+ }
+ /**
+ * shared key credential for azure datalake gen2.
+ *
+ * The option is a:
+ * <code>com.azure.storage.common.StorageSharedKeyCredential</code> type.
+ *
+ * Group: common
+ *
+ * @param sharedKeyCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder sharedKeyCredential(
+ Object sharedKeyCredential) {
+ doSetProperty("sharedKeyCredential", sharedKeyCredential);
+ return this;
+ }
+ /**
+ * shared key credential for azure datalake gen2.
+ *
+ * The option will be converted to a
+ * <code>com.azure.storage.common.StorageSharedKeyCredential</code> type.
+ *
+ * Group: common
+ *
+ * @param sharedKeyCredential the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder sharedKeyCredential(
+ String sharedKeyCredential) {
+ doSetProperty("sharedKeyCredential", sharedKeyCredential);
+ return this;
+ }
+ /**
+ * tenant id for azure account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param tenantId the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder tenantId(String tenantId) {
+ doSetProperty("tenantId", tenantId);
+ return this;
+ }
+ /**
+ * Timeout for operation.
+ *
+ * The option is a: <code>java.time.Duration</code> type.
+ *
+ * Group: common
+ *
+ * @param timeout the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder timeout(Duration timeout) {
+ doSetProperty("timeout", timeout);
+ return this;
+ }
+ /**
+ * Timeout for operation.
+ *
+ * The option will be converted to a
+ * <code>java.time.Duration</code> type.
+ *
+ * Group: common
+ *
+ * @param timeout the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder timeout(String timeout) {
+ doSetProperty("timeout", timeout);
+ return this;
+ }
+ /**
+ * umask permission for file.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param umask the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder umask(String umask) {
+ doSetProperty("umask", umask);
+ return this;
+ }
+ /**
+ * whether or not to use upn.
+ *
+ * The option is a: <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param userPrincipalNameReturned the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder userPrincipalNameReturned(
+ Boolean userPrincipalNameReturned) {
+ doSetProperty("userPrincipalNameReturned", userPrincipalNameReturned);
+ return this;
+ }
+ /**
+ * whether or not to use upn.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Boolean</code> type.
+ *
+ * Group: common
+ *
+ * @param userPrincipalNameReturned the value to set
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder userPrincipalNameReturned(
+ String userPrincipalNameReturned) {
+ doSetProperty("userPrincipalNameReturned", userPrincipalNameReturned);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint for the Azure storage datalake service
+ * component.
+ */
+ public interface AdvancedDataLakeEndpointBuilder
+ extends
+ AdvancedDataLakeEndpointConsumerBuilder,
+ AdvancedDataLakeEndpointProducerBuilder {
+ default DataLakeEndpointBuilder basic() {
+ return (DataLakeEndpointBuilder) this;
+ }
+ }
+
+ /**
+ * Proxy enum for
+ * <code>org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition</code> enum.
+ */
+ enum DataLakeOperationsDefinition {
+ listFileSystem,
+ createFileSystem,
+ deleteFileSystem,
+ listPaths,
+ getFile,
+ downloadToFile,
+ downloadLink,
+ deleteFile,
+ appendToFile,
+ flushToFile,
+ uploadFromFile,
+ upload,
+ openQueryInputStream,
+ createFile,
+ deleteDirectory;
+ }
+
+ public interface DataLakeBuilders {
+ /**
+ * Azure storage datalake service (camel-azure-storage-datalake)
+ * Camel Azure Datalake Gen2 Component
+ *
+ * Category: cloud,file
+ * Since: 3.8
+ * Maven coordinates: org.apache.camel:camel-azure-storage-datalake
+ *
+ * Syntax:
+ * <code>azure-storage-datalake:accountName/fileSystemName</code>
+ *
+ * Path parameter: accountName
+ * name of the azure account
+ *
+ * Path parameter: fileSystemName
+ * name of filesystem to be used
+ *
+ * @param path accountName/fileSystemName
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder azureStorageDatalake(String path) {
+ return DataLakeEndpointBuilderFactory.endpointBuilder("azure-storage-datalake", path);
+ }
+ /**
+ * Azure storage datalake service (camel-azure-storage-datalake)
+ * Camel Azure Datalake Gen2 Component
+ *
+ * Category: cloud,file
+ * Since: 3.8
+ * Maven coordinates: org.apache.camel:camel-azure-storage-datalake
+ *
+ * Syntax:
+ * <code>azure-storage-datalake:accountName/fileSystemName</code>
+ *
+ * Path parameter: accountName
+ * name of the azure account
+ *
+ * Path parameter: fileSystemName
+ * name of filesystem to be used
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path accountName/fileSystemName
+ * @return the dsl builder
+ */
+ default DataLakeEndpointBuilder azureStorageDatalake(
+ String componentName,
+ String path) {
+ return DataLakeEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+ }
+ static DataLakeEndpointBuilder endpointBuilder(
+ String componentName,
+ String path) {
+ class DataLakeEndpointBuilderImpl extends AbstractEndpointBuilder implements DataLakeEndpointBuilder, AdvancedDataLakeEndpointBuilder {
+ public DataLakeEndpointBuilderImpl(String path) {
+ super(componentName, path);
+ }
+ }
+ return new DataLakeEndpointBuilderImpl(path);
+ }
+}
\ No newline at end of file
diff --git a/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc b/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc
new file mode 100644
index 0000000..c95eecb
--- /dev/null
+++ b/docs/components/modules/ROOT/pages/azure-storage-datalake-component.adoc
@@ -0,0 +1,548 @@
+[[azure-storage-datalake-component]]
+= Azure storage datalake service Component
+//THIS FILE IS COPIED: EDIT THE SOURCE FILE:
+:page-source: components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
+:docTitle: Azure storage datalake service
+:artifactId: camel-azure-storage-datalake
+:description: Camel Azure Datalake Gen2 Component
+:since: 3.8
+:supportLevel: Preview
+:component-header: Both producer and consumer are supported
+include::{cq-version}@camel-quarkus:ROOT:partial$reference/components/azure-storage-datalake.adoc[opts=optional]
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The Azure storage datalake component is used for storing and retrieving file from Azure Storage Datalake Sevice using the *Azure APIs v12*.
+
+Prerequisites
+
+You need to have a valid Azure account with Azure storage set up. More information can be found at https://docs.microsoft.com/azure/[Azure Documentation Portal].
+
+Maven users will need to add the following dependency to their `pom.xml` for this component.
+
+[source,xml]
+---------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-azure-storage-datalake</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your camel core version -->
+</dependency>
+---------------
+
+== Uri Format
+
+[source,text]
+--
+azure-storage-datalake:accountName[/fileSystemName][?options]
+--
+
+In case of a consumer, both accountName and fileSystemName are required. In case of the producer, it depends on the operation
+being requested.
+
+You can append query options to the URI in the following format, ?option1=value&option2=value&...
+
+For example, in order to download content from file `test.txt` located on the `filesystem` in `camelTesting` storage account, use the following snippet:
+
+[source,java]
+--
+from("azure-storage-datalake:camelTesting/filesystem?fileName=test.txt&accountKey=key").
+to("file://fileDirectory");
+--
+
+== Uri Options
+
+// component options: START
+The Azure storage datalake service component supports 33 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accountKey* (common) | account key for authentication | | String
+| *clientId* (common) | client id for azure account | | String
+| *clientSecret* (common) | client secret for azure account | | String
+| *clientSecretCredential* (common) | client secret credential for authentication | | ClientSecretCredential
+| *close* (common) | Whether or not a file changed event raised indicates completion (true) or modification (false) | | Boolean
+| *closeStreamAfterRead* (common) | check for closing stream after read | | Boolean
+| *configuration* (common) | configuration object for datalake | | DataLakeConfiguration
+| *dataCount* (common) | count number of bytes to download | | Long
+| *directoryName* (common) | directory of the file to be handled in component | | String
+| *downloadLinkExpiration* (common) | download link expiration time | | Long
+| *expression* (common) | expression for queryInputStream | | String
+| *fileDir* (common) | directory of file to do operations in the local system | | String
+| *fileName* (common) | name of file to be handled in component | | String
+| *fileOffset* (common) | offset position in file for different operations | | Long
+| *maxResults* (common) | maximum number of results to show at a time | | Integer
+| *maxRetryRequests* (common) | no of retries to a given request | | int
+| *openOptions* (common) | set open options for creating file | | Set
+| *path* (common) | path in azure datalake for operations | | String
+| *permission* (common) | permission string for the file | | String
+| *position* (common) | This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. | | Long
+| *recursive* (common) | recursively include all paths | | Boolean
+| *regex* (common) | regular expression for matching file names | | String
+| *retainUncommitedData* (common) | Whether or not uncommitted data is to be retained after the operation | | Boolean
+| *serviceClient* (common) | *Autowired* datalake service client for azure storage datalake | | DataLakeServiceClient
+| *sharedKeyCredential* (common) | shared key credential for azure datalake gen2 | | StorageSharedKeyCredential
+| *tenantId* (common) | tenant id for azure account | | String
+| *timeout* (common) | Timeout for operation | | Duration
+| *umask* (common) | umask permission for file | | String
+| *userPrincipalNameReturned* (common) | whether or not to use upn | | Boolean
+| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
+| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
+| *operation* (producer) | operation to be performed. There are 2 enums and the value can be one of: listFileSystem, listFiles | listFileSystem | DataLakeOperationsDefinition
+| *autowiredEnabled* (advanced) | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
+|===
+// component options: END
+
+// endpoint options: START
+The Azure storage datalake service endpoint is configured using URI syntax:
+
+----
+azure-storage-datalake:accountName/fileSystemName
+----
+
+with the following path and query parameters:
+
+=== Path Parameters (2 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accountName* | name of the azure account | | String
+| *fileSystemName* | name of filesystem to be used | | String
+|===
+
+
+=== Query Parameters (34 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accountKey* (common) | account key for authentication | | String
+| *clientId* (common) | client id for azure account | | String
+| *clientSecret* (common) | client secret for azure account | | String
+| *clientSecretCredential* (common) | client secret credential for authentication | | ClientSecretCredential
+| *close* (common) | Whether or not a file changed event raised indicates completion (true) or modification (false) | | Boolean
+| *closeStreamAfterRead* (common) | check for closing stream after read | | Boolean
+| *dataCount* (common) | count number of bytes to download | | Long
+| *dataLakeServiceClient* (common) | service client of datalake | | DataLakeServiceClient
+| *directoryName* (common) | directory of the file to be handled in component | | String
+| *downloadLinkExpiration* (common) | download link expiration time | | Long
+| *expression* (common) | expression for queryInputStream | | String
+| *fileDir* (common) | directory of file to do operations in the local system | | String
+| *fileName* (common) | name of file to be handled in component | | String
+| *fileOffset* (common) | offset position in file for different operations | | Long
+| *maxResults* (common) | maximum number of results to show at a time | | Integer
+| *maxRetryRequests* (common) | no of retries to a given request | | int
+| *openOptions* (common) | set open options for creating file | | Set
+| *path* (common) | path in azure datalake for operations | | String
+| *permission* (common) | permission string for the file | | String
+| *position* (common) | This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. | | Long
+| *recursive* (common) | recursively include all paths | | Boolean
+| *regex* (common) | regular expression for matching file names | | String
+| *retainUncommitedData* (common) | Whether or not uncommitted data is to be retained after the operation | | Boolean
+| *serviceClient* (common) | *Autowired* datalake service client for azure storage datalake | | DataLakeServiceClient
+| *sharedKeyCredential* (common) | shared key credential for azure datalake gen2 | | StorageSharedKeyCredential
+| *tenantId* (common) | tenant id for azure account | | String
+| *timeout* (common) | Timeout for operation | | Duration
+| *umask* (common) | umask permission for file | | String
+| *userPrincipalNameReturned* (common) | whether or not to use upn | | Boolean
+| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
+| *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler
+| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. There are 3 enums and the value can be one of: InOnly, InOut, InOptionalOut | | ExchangePattern
+| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
+| *operation* (producer) | operation to be performed. There are 2 enums and the value can be one of: listFileSystem, listFiles | listFileSystem | DataLakeOperationsDefinition
+|===
+// endpoint options: END
+
+=== Methods of authentication
+In order to use this component, you will have to provide at least one of the below given points for authentication purposes.
+
+- Provide `accountName` and `accessKey` for your azure account.
+- Provide StorageSharedKeyCredential instance which can be provided into `sharedKeyCredential` option.
+- Provide ClientSecretCredential instance which can be provided into `clientSecretCredential` option.
+- Provide `accountName`, `clientId`, `clientSecret` and `tenantId` for authentication with Azure Active Directory.
+- Provide a DataLakeServiceClient instance which can be provided into `serviceClient` option.
+
+=== Batch Consumer
+
+This component implements the Batch Consumer.
+
+This allows you to know how many messages exists in this batch and let the Aggregator aggregate this number of messages.
+
+== Usage
+
+=== Message Headers specified by user
+
+[width="100%",cols="10%,10%,10%,70%",options="header",]
+|===
+|Header |Variable Name |Type |Description
+|`CamelAzureStorageDataLakeListFileSystemsOptions` |`DataLakeConstants.LIST_FILESYSTEMS_OPTIONS` | `ListFileSystemsOptions` | Defines options available to configure the behavior of a call to listFileSystemsSegment on a DataLakeServiceAsyncClient object. Null may be passed.
+|`CamelAzureStorageDataLakeTimeout` |`DataLakeConstants.TIMEOUT` |`Duration` | An optional timeout value beyond which a RuntimeException will be raised.
+|`CamelAzureStorageDataLakeOperation` |`DataLakeConstants.DATALAKE_OPERATION` |`DataLakeOperationsDefinition` | Specify the producer operation to execute. Different operations allowed are shown below.
+|`CamelAzureStorageDataLakeFileSystemName` |`DataLakeConstants.FILESYSTEM_NAME` |`String` | Name of the file system in azure datalake on which operation is to be performed. Please make sure that filesystem name is all lowercase.
+|`CamelAzureStorageDataLakeDirectoryName` |`DataLakeConstants.DIRECTORY_NAME` |`String` | Name of the directory in azure datalake on which operation is to be performed.
+|`CamelAzureStorageDataLakeFileName` |`DataLakeConstants.FILE_NAME` |`String` | Name of the file in azure datalake on which operation is to be performed.
+|`CamelAzureStorageDataLakeMetadata` |`DataLakeConstants.METADATA` |`Map<String,String>` | The metadata to associate with the file.
+|`CamelAzureStorageDataLakePublicAccessType` |`DataLakeConstants.PUBLIC_ACCESS_TYPE` |`PublicAccessType` |
+|`CamelAzureStorageDataLakeRequestCondition` |`DataLakeConstants.DATALAKE_REQUEST_CONDITION` |`DataLakeRequestConditions` | This contains values which will restrict the successful operation of a variety of requests to the conditions present. These conditions are entirely optional.
+|`CamelAzureStorageDataLakeListPathOptions` |`DataLakeConstants.LIST_PATH_OPTIONS` |`ListPathOptions` | Defines options available to configure the behavior of a call to listContainersSegment on a DataLakeFileSystemClient object. Null may be passed.
+|`CamelAzureStorageDataLakePath` |`DataLakeConstants.PATH` |`String` | Path of the file to be used for upload operations.
+|`CamelAzureStorageDataLakeRecursive` |`DataLakeConstants.RECURSIVE` |`Boolean` | Specifies if the call to listContainersSegment should recursively include all paths.
+|`CamelAzureStorageDataLakeMaxResults` |`DataLakeConstants.MAX_RESULTS` |`Integer` | Specifies the maximum number of blobs to return, including all BlobPrefix elements.
+|`CamelAzureStorageDataLakeUserPrincipalNameReturned` |`DataLakeConstants.USER_PRINCIPAL_NAME_RETURNED` |`Boolean` |
+|`CamelAzureStorageDataLakeRegex` |`DataLakeConstants.REGEX` |`String` | Filter the results to return only those files with match the specified regular expression.
+|`CamelAzureStorageDataLakeFileDir` |`DataLakeConstants.FILE_DIR` |`String` | Directory in which the file is to be downloaded.
+|`CamelAzureStorageDataLakeContentMD5` |`DataLakeConstants.CONTENT_MD5` |`byte[]` | An MD5 hash of the content. The hash is used to verify the intergity of the file during transport.
+|`CamelAzureStorageDataLakeFileRange` |`DataLakeConstants.FILE_RANGE` |`FileRange` | This is a representation of a range of bytes on a file, typically used during a download operation. Passing null as a FileRange value will default to the entire range of the file.
+|`CamelAzureStorageDataLakeParallelTransferOptions` |`DataLakeConstants.PARALLEL_TRANSFER_OPTIONS` | `ParallelTransferOptions` |
+|`CamelAzureStorageDataLakeOpenOptions` |`DataLakeConstants.OPEN_OPTIONS` |`Set<OpenOption>` | Set of OpenOption used to configure how to open or create a file.
+|`CamelAzureStorageDataLakeIncrementalCopy` |`DataLakeConstants.INCREMENTAL_COPY` |`Boolean` | Flag indicating if the file was incrementally copied.
+|`CamelAzureStorageDataLakeDownloadLinkExpiration` |`DataLakeConstants.DOWNLOAD_LINK_EXPIRATION` |`Long` | Set the Expiration time of the download link.
+|`CamelAzureStorageDataLakeFileOffset` |`DataLakeConstants.FILE_OFFSET` |`Long` | The position where the data is to be appended.
+|`CamelAzureStorageDataLakeLeaseId` |`DataLakeConstants.LEASE_ID` |`String` | By setting lease id, requests will fail if the provided lease does not match the active lease on the file.
+|`CamelAzureStorageDataLakePathHttpHeaders` |`DataLakeConstants.PATH_HTTP_HEADERS` |`PathHttpHeaders` | Additional parameters for a set of operations.
+|`CamelAzureStorageDataLakeRetainCommitedData` |`DataLakeConstants.RETAIN_UNCOMMITED_DATA` |`Boolean` | Determines Whether or not uncommitted data is to be retained after the operation.
+|`CamelAzureStorageDataLakeClose` |`DataLakeConstants.CLOSE` |`Boolean` | Whether or not a file changed event raised indicates completion (true) or modification (false).
+|`CamelAzureStorageDataLakePosition` |`DataLakeConstants.POSITION` |`Long` | The length of the file after all data has been written.
+|`CamelAzureStorageDataLakeExpression` |`DataLakeConstants.EXPRESSION` |`String` | The query expression on the file.
+|`CamelAzureStorageDataLakeInputSerialization` |`DataLakeConstants.INPUT_SERIALIZATION` |`FileQuerySerialization` | Defines the input serialization for a file query request. either FileQueryJsonSerialization or FileQueryDelimitedSerialization
+|`CamelAzureStorageDataLakeOutputSerialization` |`DataLakeConstants.OUTPUT_SERIALIZATION` |`FileQuerySerialization` | Defines the output serialization for a file query request. either FileQueryJsonSerialization or FileQueryDelimitedSerialization
+|`CamelAzureStorageDataLakeErrorConsumer` |`DataLakeConstants.ERROR_CONSUMER` |`Consumer<FileQueryError>` | Sets error consumer for file query
+|`CamelAzureStorageDataLakeProgressConsumer` |`DataLakeConstants.PROGRESS_CONSUMER` |`Consumer<FileQueryProgress>` | Sets progress consumer for file query
+|`CamelAzureStorageDataLakeQueryOptions` |`DataLakeConstants.QUERY_OPTIONS` |`FileQueryOptions` | Optional parameters for File Query.
+|`CamelAzureStorageDataLakePermission` |`DataLakeConstants.PERMISSION` |`String` | Sets the permission for file.
+|`CamelAzureStorageDataLakeUmask` |`DataLakeConstants.UMASK` |`String` | Sets the umask for file.
+|===
+
+=== Message headers set by the component
+
+[width="100%",cols="10%,10%,10%,70%",options="header",]
+|===
+|Header |Variable Name |Type |Description
+|`CamelAzureStorageDataLakeMetadata` |`DataLakeConstants.METADATA` |`Map<String,String>` | The metadata to associate with the file.
+|`CamelAzureStorageDataLakeRawHttpHeaders` |`DataLakeConstants.RAW_HTTP_HEADERS` |`HttpHeaders` | Non parsed http headers that can be used by the user.
+|`CamelAzureStorageDataLakeAccessTier` |`DataLakeConstants.ACCESS_TIER` |`AccessTier` | Access tier of file.
+|`CamelAzureStorageDataLakeAccessTierChangeTime` |`DataLakeConstants.ACCESS_TIER_CHANGE_TIME` |`OffsetDateTime` | Datetime when the access tier of the blob last changed.
+|`CamelAzureStorageDataLakeArchiveStatus` |`DataLakeConstants.ARCHIVE_STATUS` |`ArchiveStatus` | Archive status of file.
+|`CamelAzureStorageDataLakeCacheControl` |`DataLakeConstants.CACHE_CONTROL` |`String` | Cache control specified for the file.
+|`CamelAzureStorageDataLakeContentDisposition` |`DataLakeConstants.CONTENT_DISPOSITION` |`String` | Content disposition specified for the file.
+|`CamelAzureStorageDataLakeContentEncoding` |`DataLakeConstants.CONTENT_ENCODING` |`String` | Content encoding specified for the file.
+|`CamelAzureStorageDataLakeContentLanguage` |`DataLakeConstants.CONTENT_LANGUAGE` |`String` | Content language specified for the file.
+|`CamelAzureStorageDataLakeContentType` |`DataLakeConstants.CONTENT_TYPE` |`String` | Content type specified for the file.
+|`CamelAzureStorageDataLakeCopyCompletionTime` |`DataLakeConstants.COPY_COMPLETION_TIME` |`OffsetDateTime` | Conclusion time of the last attempted Copy Blob operation where this file was the destination file.
+|`CamelAzureStorageDataLakeCopyId` |`DataLakeConstants.COPY_ID` |`String` | String identifier for this copy operation.
+|`CamelAzureStorageDataLakeCopyProgress` |`DataLakeConstants.COPY_PROGRESS` |`String` | Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this file was the destination file.
+|`CamelAzureStorageDataLakeCopySource` |`DataLakeConstants.COPY_SOURCE` |`String` | URL up to 2 KB in length that specifies the source file or file used in the last attempted Copy Blob operation where this file was the destination file.
+|`CamelAzureStorageDataLakeCopyStatus` |`DataLakeConstants.COPY_STATUS` |`CopyStatusType` | Status of the last copy operation performed on the file.
+|`CamelAzureStorageDataLakeCopyStatusDescription` |`DataLakeConstants.COPY_STATUS_DESCRIPTION` |`String` |
+|`CamelAzureStorageDataLakeCreationTime` |`DataLakeConstants.CREATION_TIME` |`OffsetDateTime` | Creation time of the file.
+|`CamelAzureStorageDataLakeEncryptionKeySha256` |`DataLakeConstants.ENCRYPTION_KEY_SHA_256` |`String` | The SHA-256 hash of the encryption key used to encrypt the file.
+|`CamelAzureStorageDataLakeServerEncrypted` |`DataLakeConstants.SERVER_ENCRYPTED` |`Boolean` | Flag indicating if the file's content is encrypted on the server.
+|`CamelAzureStorageDataLakeETag` |`DataLakeConstants.E_TAG` |`String` | The E Tag of the file.
+|`CamelAzureStorageDataLakeFileSize` |`DataLakeConstants.FILE_SIZE` |`Long` | Size of the file.
+|`CamelAzureStorageDataLakeLastModified` |`DataLakeConstants.LAST_MODIFIED` |`OffsetDateTime` | Datetime when the file was last modified.
+|`CamelAzureStorageDataLakeLeaseDuration` |`DataLakeConstants.LEASE_DURATION` |`LeaseDurationType` | Type of lease on the file.
+|`CamelAzureStorageDataLakeLeaseState` |`DataLakeConstants.LEASE_STATE` |`LeaseStateType` | State of the lease on the file.
+|`CamelAzureStorageDataLakeLeaseStatus` |`DataLakeConstants.LEASE_STATUS` |`LeaseStatusType` | Status of the lease on the file.
+|`CamelAzureStorageDataLakeDownloadLink` |`DataLakeConstants.DOWNLOAD_LINK` |`String` | The link that can be used to download the file from datalake.
+|===
+
+=== Automatic detection of service client
+
+The component is capable of automatically detecting the presence of a DataLakeServiceClient bean in the registry.
+Hence, if your registry has only one instance of type DataLakeServiceClient, it will be automatically used as the default client.
+You won't have to explicitly define it as an uri paramater.
+
+=== Azure Storage DataLake Producer Operations
+
+The various operations supported by Azure Storage DataLake are as given below:
+
+*Operations on Service level*
+
+For these operations, `accountName` option is required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`listFileSystem` | List all the file systems that are present in the given azure account.
+|===
+
+*Operations on File system level*
+
+For these operations, `accountName` and `fileSystemName` options are required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`createFileSystem` | Creates a new file System with the storage account
+|`deleteFileSystem` | Deletes the specified file system within the storage account
+|`listPaths` | Returns list of all the files within the given path in the given file system , with folder structure flattened
+|===
+
+*Operations on Directory level*
+
+For these operations, `accountName`, `fileSystemName` and `directoryName` options are required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`createFile` | Creates a new file in the specified directory within the fileSystem
+|`deleteDirectory` | Deletes the specified directory within the file system
+|===
+
+*Operations on file level*
+
+For these operations, `accountName`, `fileSystemName` and `fileName` options are required
+[width="100%", cols="10%,90%", options="header",]
+|===
+|Operation |Description
+|`getFile` | Get the contents of a file
+|`downloadToFile` | Downloadd the entire file from the file system into a path specified by fileDir.
+|`downloadLink` | Generate download link for the specified file using Shared Access Signature (SAS).
+The expiration time to be set for the link can be specified otherwise 1 hour is taken as default.
+|`deleteFile` | Deletes the specified file.
+|`appendToFile` | Appends the data passed to the specified file in the file System. Flush command is
+required after append.
+|`flushToFile` | Flushes the data already appended to the specified file.
+|`openQueryInputStream` | Opens an inputstream based on the query passed to the endpoint. For this operation,
+you must first register the query acceleration feature with your subscription.
+|===
+
+Refer the examples section below for more details on how to use these operations
+
+=== Consumer Examples
+To consume a file from the storage datalake into a file using the file component, this can be done like this:
+[source,java]
+--
+from("azure-storage-datalake":cameltesting/filesystem?fileName=test.txt&accountKey=yourAccountKey").
+to("file:/filelocation");
+--
+
+You can also directly write to a file without using the file component. For this, you will need to specify the path in `fileDir` option, to save it to your machine.
+[source,java]
+--
+from("azure-storage-datalake":cameltesting/filesystem?fileName=test.txt&accountKey=yourAccountKey&fileDir=/test/directory").
+to("mock:results");
+--
+
+This component also supports batch consumer. So, you can consume multiple files from a file system by specifying the path
+from where you want to consume the files.
+[source,java]
+--
+from("azure-storage-datalake":cameltesting/filesystem?accountKey=yourAccountKey&fileDir=/test/directory&path=abc/test").
+to("mock:results");
+--
+
+
+=== Producer Examples
+- `listFileSystem`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ //required headers can be added here
+ exchange.getIn().setHeader(DataLakeConstants.LIST_FILESYSTEMS_OPTIONS, new ListFileSystemsOptions().setMaxResultsPerPage(10));
+ })
+ .to("azure-storage-datalake:cameltesting?operation=listFileSystem&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `createFileSystem`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.FILESYSTEM_NAME, "test1");
+ })
+ .to("azure-storage-datalake:cameltesting?operation=createFileSystem&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `deleteFileSystem`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.FILESYSTEM_NAME, "test1");
+ })
+ .to("azure-storage-datalake:cameltesting?operation=deleteFileSystem&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `listPaths`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.LIST_PATH_OPTIONS, new ListPathsOptions().setPath("/main"));
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=listPaths&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `getFile`
+
+This can be done in two ways, We can either set an outputstream in the exchange body
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ // set an outputstream where the file data can should be written
+ exchange.getIn().setBody(outputStream);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=getFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+Or if body is not set, the operation will give an inputstream, given that you have already registered for query acceleration
+in azure portal.
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=getFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .process(exchange -> {
+ InputStream inputStream = exchange.getMessage().getBody(InputStream.class);
+ System.out.Println(IOUtils.toString(inputStream, StandardCharcets.UTF_8.name()));
+ })
+ .to("mock:results");
+--
+
+- `deleteFile`
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=deleteFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `downloadToFile`
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=downloadToFile&fileName=test.txt&fileDir=/test/mydir&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `downloadLink`
+
+[source,java]
+--
+from("direct:start")
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=downloadLink&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .process(exchange -> {
+ String link = exchange.getMessage().getBody(String.class);
+ System.out.println(link);
+ })
+ .to("mock:results");
+--
+
+- `appendToFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ final String data = "test data";
+ final InputStream inputStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
+ exchange.getIn().setBody(inputStream);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=appendToFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `flushToFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.POSITION, 0);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=flushToFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `openQueryInputStream`
+
+For this operation, you should have already registered for query acceleration on the azure portal
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.QUERY_OPTIONS, new FileQueryOptions("SELECT * from BlobStorage"));
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=openQueryInputStream&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `upload`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ final String data = "test data";
+ final InputStream inputStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
+ exchange.getIn().setBody(inputStream);
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=upload&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `uploadFromFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.PATH, "test/file.txt");
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=uploadFromFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `createFile`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.DIRECTORY_NAME, "test/file/");
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=createFile&fileName=test.txt&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+- `deleteDirectory`
+
+[source,java]
+--
+from("direct:start")
+ .process(exchange -> {
+ exchange.getIn().setHeader(DataLakeConstants.DIRECTORY_NAME, "test/file/");
+ })
+ .to("azure-storage-datalake:cameltesting/filesystem?operation=deleteDirectory&dataLakeServiceClient=#serviceClient")
+ .to("mock:results");
+--
+
+=== Testing
+Please run all the unit tests and integration test while making changes to the component as changes or version upgrades can break things.
+For running all the test in the component, you will need to obtain azure accountName and accessKey. After obtaining the same, you
+can run the full test, on this component directory, by running the following maven command
+
+----
+mvn test -Dazure.storage.account.name=accountName -Dazure.storage.account.key=accountKey
+----
+
diff --git a/parent/pom.xml b/parent/pom.xml
index 7f7d05b..0df304f 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -82,8 +82,10 @@
<aws-java-sdk-swf-libs>1.11.22</aws-java-sdk-swf-libs>
<aws-xray-version>2.6.1</aws-xray-version>
<axiom-version>1.2.14</axiom-version>
+ <azure-identity-version>1.1.3</azure-identity-version>
<azure-storage-java-sdk-version>8.6.0</azure-storage-java-sdk-version>
<azure-storage-blob-java-sdk12-version>12.9.0</azure-storage-blob-java-sdk12-version>
+ <azure-storage-datalake-java-sdk12-version>12.3.0</azure-storage-datalake-java-sdk12-version>
<azure-storage-queue-java-sdk12-version>12.7.0</azure-storage-queue-java-sdk12-version>
<azure-eventhubs-java-version>5.3.1</azure-eventhubs-java-version>
<azure-eventhubs-checkpointstore-blob-version>1.3.1</azure-eventhubs-checkpointstore-blob-version>
@@ -1060,6 +1062,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-azure-storage-datalake</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-azure-storage-queue</artifactId>
<version>${project.version}</version>
</dependency>
@@ -2668,6 +2675,11 @@
<artifactId>camel-zookeeper</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-csimple-joor</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<!-- camel components: END -->
<!-- camel catalog -->
diff --git a/test-infra/camel-test-infra-azure-storage-datalake/pom.xml b/test-infra/camel-test-infra-azure-storage-datalake/pom.xml
new file mode 100644
index 0000000..ebff1bf
--- /dev/null
+++ b/test-infra/camel-test-infra-azure-storage-datalake/pom.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>camel-test-infra-parent</artifactId>
+ <groupId>org.apache.camel</groupId>
+ <relativePath>../camel-test-infra-parent/pom.xml</relativePath>
+ <version>3.8.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>Camel :: Test Infra :: Azure Storage Datalake</name>
+ <artifactId>camel-test-infra-azure-storage-datalake</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-infra-common</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-infra-azure-common</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- azure sdk -->
+ <dependency>
+ <groupId>com.azure</groupId>
+ <artifactId>azure-storage-file-datalake</artifactId>
+ <version>${azure-storage-datalake-java-sdk12-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.azure</groupId>
+ <artifactId>azure-identity</artifactId>
+ <version>${azure-identity-version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/test-infra/camel-test-infra-azure-storage-datalake/src/main/resources/META-INF/MANIFEST.MF b/test-infra/camel-test-infra-azure-storage-datalake/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e69de29
diff --git a/test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/clients/AzureStorageDataLakeClientUtils.java b/test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/clients/AzureStorageDataLakeClientUtils.java
new file mode 100644
index 0000000..fd9a6cc
--- /dev/null
+++ b/test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/clients/AzureStorageDataLakeClientUtils.java
@@ -0,0 +1,45 @@
+/*
+ * 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
... 161 lines suppressed ...