File tree Expand file tree Collapse file tree
src/main/kotlin/com/atlan/pkg/objectstore Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ angus-mail = "2.0.5"
2626pkl = " 0.31.1"
2727adls = " 12.26.3"
2828azure = " 1.18.2"
29+ azure-core-http-okhttp = " 1.13.4"
2930guava = " 33.6.0-jre"
3031openlineage = " 1.46.0"
3132kotlin = " 2.3.20"
@@ -57,6 +58,7 @@ gcs = { module = "com.google.cloud:google-cloud-storage" }
5758gcs-control = { module = " com.google.cloud:google-cloud-storage-control" }
5859adls = { module = " com.azure:azure-storage-file-datalake" , version.ref = " adls" }
5960azure-identity = { module = " com.azure:azure-identity" , version.ref = " azure" }
61+ azure-core-http-okhttp = { module = " com.azure:azure-core-http-okhttp" , version.ref = " azure-core-http-okhttp" }
6062system-stubs = { module = " uk.org.webcompere:system-stubs-testng" , version.ref = " system-stubs" }
6163fastcsv = { module = " de.siegmar:fastcsv" , version.ref = " fastcsv" }
6264apache-poi = { module = " org.apache.poi:poi" , version.ref = " poi" }
Original file line number Diff line number Diff line change @@ -25,8 +25,13 @@ dependencies {
2525 api(libs.awssdk.sts)
2626 api(platform(libs.gcs.bom))
2727 api(libs.gcs)
28- api(libs.azure.identity)
29- api(libs.adls)
28+ api(libs.azure.identity) {
29+ exclude(group = " com.azure" , module = " azure-core-http-netty" )
30+ }
31+ api(libs.adls) {
32+ exclude(group = " com.azure" , module = " azure-core-http-netty" )
33+ }
34+ api(libs.azure.core.http.okhttp)
3035 implementation(libs.sqlite)
3136 implementation(libs.simple.java.mail)
3237 implementation(libs.log4j.core) // This gives us the OOTB-log4j appenders (that we MUST have for pattern-handling)
@@ -189,7 +194,7 @@ tasks {
189194 include(dependency(" com.microsoft.azure:msal4j-persistence-extension:.*" ))
190195 include(dependency(" net.java.dev.jna:jna:.*" ))
191196 include(dependency(" net.java.dev.jna:jna-platform:.*" ))
192- include(dependency(" com.azure:azure-core-http-netty :.*" ))
197+ include(dependency(" com.azure:azure-core-http-okhttp :.*" ))
193198 include(dependency(" com.azure:azure-core:.*" ))
194199 include(dependency(" com.azure:azure-json:.*" ))
195200 include(dependency(" com.azure:azure-storage-blob:.*" ))
Original file line number Diff line number Diff line change 22 Copyright 2023 Atlan Pte. Ltd. */
33package com.atlan.pkg.objectstore
44
5+ import com.azure.core.http.okhttp.OkHttpAsyncHttpClientBuilder
56import com.azure.identity.ClientSecretCredentialBuilder
67import com.azure.storage.blob.BlobContainerClient
78import com.azure.storage.blob.BlobContainerClientBuilder
@@ -36,18 +37,21 @@ class ADLSSync(
3637 private val blobContainerClient: BlobContainerClient ?
3738
3839 init {
40+ val httpClient = OkHttpAsyncHttpClientBuilder ().build()
3941 if (tenantId.isNotBlank() && clientId.isNotBlank()) {
4042 logger.info { " Authenticating to ADLS using provided tenant and client IDs and secrets." }
4143 val credential =
4244 ClientSecretCredentialBuilder ()
4345 .tenantId(tenantId)
4446 .clientId(clientId)
4547 .clientSecret(clientSecret)
48+ .httpClient(httpClient)
4649 .build()
4750 adlsClient =
4851 DataLakeServiceClientBuilder ()
4952 .endpoint(" https://$accountName .dfs.core.windows.net" )
5053 .credential(credential)
54+ .httpClient(httpClient)
5155 .buildClient()
5256 blobContainerClient = null
5357 } else {
@@ -61,6 +65,7 @@ class ADLSSync(
6165 .endpoint(" https://$accountName .blob.core.windows.net" )
6266 .credential(credential)
6367 .containerName(containerName)
68+ .httpClient(httpClient)
6469 .buildClient()
6570 adlsClient = null
6671 }
You can’t perform that action at this time.
0 commit comments