From d824fd45385edc1c1767d591d5ff7f06d8a150d4 Mon Sep 17 00:00:00 2001 From: AlexYue Date: Thu, 30 May 2024 12:20:39 +0800 Subject: [PATCH] [feature-wip](Cloud) Introduce azure core C++ sdk (#35208) We're intended to extent the OSS support ability limit to S3-not compatible cloud vendor like Azure. This pr is the first step which introduces the Azure C++ sdk to BE. Consequent pr abort the CMake file and BE feature enhancement would come soon. Co-authored-by: zy-kkk --- thirdparty/CHANGELOG.md | 4 ++++ thirdparty/build-thirdparty.sh | 20 ++++++++++++++++++++ thirdparty/vars.sh | 7 +++++++ 3 files changed, 31 insertions(+) diff --git a/thirdparty/CHANGELOG.md b/thirdparty/CHANGELOG.md index dd04eb07bfe756..5aac13eb301a9f 100644 --- a/thirdparty/CHANGELOG.md +++ b/thirdparty/CHANGELOG.md @@ -2,6 +2,10 @@ This file contains version of the third-party dependency libraries in the build-env image. The docker build-env image is apache/doris, and the tag is `build-env-${version}` +## 20240529 + +- Added: azure-core 1.10.3 + ## 20240325 - Modified: arrow 13.0.0 -> 15.0.2 diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh index f17af7571bbc4b..78491966a561ae 100755 --- a/thirdparty/build-thirdparty.sh +++ b/thirdparty/build-thirdparty.sh @@ -1778,6 +1778,25 @@ build_base64() { "${BUILD_SYSTEM}" install } +# azure blob storage +build_azure() { + check_if_source_exist "${AZURE_SOURCE}" + cd "${TP_SOURCE_DIR}/${AZURE_SOURCE}" + azure_dir=$(pwd) + + rm -rf "${BUILD_DIR}" + mkdir -p "${BUILD_DIR}" + cd "${BUILD_DIR}" + + # We need use openssl 1.1.1n, which is already carried in vcpkg-custom-ports + AZURE_PORTS="vcpkg-custom-ports" + AZURE_MANIFEST_DIR="." + + "${CMAKE_CMD}" -G "${GENERATOR}" -DVCPKG_MANIFEST_MODE=ON -DVCPKG_OVERLAY_PORTS="${azure_dir}/${AZURE_PORTS}" -DVCPKG_MANIFEST_DIR="${azure_dir}/${AZURE_MANIFEST_DIR}" -DWARNINGS_AS_ERRORS=FALSE -DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" -DCMAKE_BUILD_TYPE=Release .. + "${BUILD_SYSTEM}" -j "${PARALLEL}" + "${BUILD_SYSTEM}" install +} + if [[ "${#packages[@]}" -eq 0 ]]; then packages=( libunixodbc @@ -1844,6 +1863,7 @@ if [[ "${#packages[@]}" -eq 0 ]]; then streamvbyte ali_sdk base64 + azure ) if [[ "$(uname -s)" == 'Darwin' ]]; then read -r -a packages <<<"binutils gettext ${packages[*]}" diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh index ff8092dba6621c..0c9113ab8febc5 100644 --- a/thirdparty/vars.sh +++ b/thirdparty/vars.sh @@ -508,6 +508,12 @@ BASE64_NAME="v0.5.2.tar.gz" BASE64_SOURCE="base64-0.5.2" BASE64_MD5SUM="49e5a6c98bd0192aedd16c16eec39974" +# azure blob +AZURE_DOWNLOAD="https://github.com/Azure/azure-sdk-for-cpp/archive/azure-core_1.10.3.tar.gz" +AZURE_NAME="azure-core_1.10.3.tar.gz" +AZURE_SOURCE="azure-sdk-for-cpp-azure-core_1.10.3" +AZURE_MD5SUM="aa470cfdba93dd69a6f3112a6958c13c" + # all thirdparties which need to be downloaded is set in array TP_ARCHIVES export TP_ARCHIVES=( 'LIBEVENT' @@ -583,6 +589,7 @@ export TP_ARCHIVES=( 'LIBUUID' 'ALI_SDK' 'BASE64' + 'AZURE' ) if [[ "$(uname -s)" == 'Darwin' ]]; then