fix build for non USE_S3 case

Signed-off-by: Jianfei Hu <hujianfei258@gmail.com>
This commit is contained in:
Jianfei Hu 2023-11-15 19:18:38 +00:00
parent d0398e3c1d
commit ea92dbb1c7
2 changed files with 8 additions and 4 deletions

View File

@ -784,15 +784,17 @@ S3CredentialsProviderChain::S3CredentialsProviderChain(
#else
# include <stdexcept>
namespace DB
{
namespace S3
{
String getRunningAvailabilityZone()
std::string getRunningAvailabilityZone()
{
throw Poco::Exception("Does not support availability zone detection for non-cloud environment");
throw std::runtime_error("Does not support availability zone detection for non-cloud environment");
}
}

View File

@ -25,7 +25,7 @@ inline static constexpr uint64_t DEFAULT_EXPIRATION_WINDOW_SECONDS = 120;
static inline constexpr char GCP_METADATA_SERVICE_ENDPOINT[] = "http://metadata.google.internal";
/// getRunningAvailabilityZone returns the availability zone of the underlying compute resources where the current process runs.
String getRunningAvailabilityZone();
std::string getRunningAvailabilityZone();
class AWSEC2MetadataClient : public Aws::Internal::AWSHttpResourceClient
{
@ -189,12 +189,14 @@ public:
#else
# include <string>
namespace DB
{
namespace S3
{
String getRunningAvailabilityZone();
std::string getRunningAvailabilityZone();
}
}