diff --git a/docker/thirdparties/docker-compose/hive/hadoop-hive-3x.env.tpl b/docker/thirdparties/docker-compose/hive/hadoop-hive-3x.env.tpl index 4675fbf80539e1..5698c84ff2b838 100644 --- a/docker/thirdparties/docker-compose/hive/hadoop-hive-3x.env.tpl +++ b/docker/thirdparties/docker-compose/hive/hadoop-hive-3x.env.tpl @@ -40,4 +40,12 @@ HIVE_SITE_CONF_fs_oss_impl=org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem HIVE_SITE_CONF_fs_oss_accessKeyId=${OSSAk} HIVE_SITE_CONF_fs_oss_accessKeySecret=${OSSSk} HIVE_SITE_CONF_fs_oss_endpoint=${OSSEndpoint} -enablePaimonHms=${enablePaimonHms} \ No newline at end of file +HIVE_SITE_CONF_fs_AbstractFileSystem_gs_impl=com.google.cloud.hadoop.fs.gcs.GoogleHadoopFS +HIVE_SITE_CONF_fs_gs_project_id=${GCSProjectId} +HIVE_SITE_CONF_google_cloud_auth_service_account_enable=true +HIVE_SITE_CONF_fs_gs_auth_service_account_email=${GCSAccountEmail} +HIVE_SITE_CONF_fs_gs_auth_service_account_private_key_id=${GCSAccountPrivateKeyId} +HIVE_SITE_CONF_fs_gs_auth_service_account_private_key=${GCSAccountPrivateKey} +HIVE_SITE_CONF_fs_gs_proxy_address=${GCSProxyAddress} +enablePaimonHms=${enablePaimonHms} + diff --git a/docker/thirdparties/docker-compose/hive/hive-3x_settings.env b/docker/thirdparties/docker-compose/hive/hive-3x_settings.env index 5d59475424f9f7..bf2bc4424f8e83 100644 --- a/docker/thirdparties/docker-compose/hive/hive-3x_settings.env +++ b/docker/thirdparties/docker-compose/hive/hive-3x_settings.env @@ -40,3 +40,8 @@ export OBSEndpoint="obs.cn-north-4.myhuaweicloud.com" export COSAk="*****************" export COSSk="*****************" export COSRegion="ap-beijing" +export GCSProjectId="" +export GCSAccountEmail="" +export GCSAccountPrivateKeyId="" +export GCSAccountPrivateKey="" +export GCSProxyAddress="" \ No newline at end of file diff --git a/docker/thirdparties/docker-compose/hive/scripts/create_external_paimon_scripts/create_paimon_tables.hql b/docker/thirdparties/docker-compose/hive/scripts/create_external_paimon_scripts/create_paimon_tables.hql index dab087a4bffa0b..f132d39438067e 100644 --- a/docker/thirdparties/docker-compose/hive/scripts/create_external_paimon_scripts/create_paimon_tables.hql +++ b/docker/thirdparties/docker-compose/hive/scripts/create_external_paimon_scripts/create_paimon_tables.hql @@ -39,5 +39,9 @@ STORED BY 'org.apache.paimon.hive.PaimonStorageHandler' LOCATION 'cosn://sdb-qa-datalake-test-1308700295/paimon_warehouse/tx_db.db/hive_test_table'; - - +SET hive.metastore.warehouse.dir=gs://selectdb-qa-datalake-test/paimon_warehouse; +CREATE DATABASE gcs_db; +USE gcs_db; +CREATE EXTERNAL TABLE external_test_table +STORED BY 'org.apache.paimon.hive.PaimonStorageHandler' +LOCATION 'gs://selectdb-qa-datalake-test/paimon_warehouse/gcs_db.db/hive_test_table'; diff --git a/docker/thirdparties/docker-compose/hive/scripts/hive-metastore.sh b/docker/thirdparties/docker-compose/hive/scripts/hive-metastore.sh index 0571735c32a6fe..00e44d8951a1cf 100755 --- a/docker/thirdparties/docker-compose/hive/scripts/hive-metastore.sh +++ b/docker/thirdparties/docker-compose/hive/scripts/hive-metastore.sh @@ -45,6 +45,7 @@ curl -O https://s3BucketName.s3Endpoint/regression/docker/hive3/hadoop-cos-3.1.0 curl -O https://s3BucketName.s3Endpoint/regression/docker/hive3/cos_api-bundle-5.6.244.4.jar curl -O https://s3BucketName.s3Endpoint/regression/docker/hive3/hadoop-aws-3.2.1.jar curl -O https://s3BucketName.s3Endpoint/regression/docker/hive3/paimon-hive-connector-3.1-1.3-SNAPSHOT.jar +curl -O https://s3BucketName.s3Endpoint/regression/docker/hive3/gcs-connector-hadoop3-2.2.24-shaded.jar nohup /opt/hive/bin/hive --service metastore &