#pragma once #if !defined(ARCADIA_BUILD) #include #endif #if USE_AWS_S3 #include "Client/Connection.h" #include #include #include #include #include #include "ext/shared_ptr_helper.h" namespace DB { class Context; struct ClientAuthentificationBuilder { String access_key_id; String secret_access_key; UInt64 max_connections; }; class StorageS3Cluster : public ext::shared_ptr_helper, public IStorage { friend struct ext::shared_ptr_helper; public: std::string getName() const override { return "S3Cluster"; } Pipe read(const Names &, const StorageMetadataPtr &, SelectQueryInfo &, ContextPtr, QueryProcessingStage::Enum, size_t /*max_block_size*/, unsigned /*num_streams*/) override; QueryProcessingStage::Enum getQueryProcessingStage(ContextPtr, QueryProcessingStage::Enum, const StorageMetadataPtr &, SelectQueryInfo &) const override; NamesAndTypesList getVirtuals() const override; protected: StorageS3Cluster( const String & filename_, const String & access_key_id_, const String & secret_access_key_, const StorageID & table_id_, String cluster_name_, const String & format_name_, UInt64 max_connections_, const ColumnsDescription & columns_, const ConstraintsDescription & constraints_, ContextPtr context_, const String & compression_method_); private: /// Connections from initiator to other nodes std::vector> connections; StorageS3::ClientAuthentificaiton client_auth; String filename; String cluster_name; String format_name; String compression_method; }; } #endif