mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Registering the Blob Storage Disk
This commit is contained in:
parent
20dda7f666
commit
88b5feb59d
@ -47,6 +47,16 @@ class DiskBlobStorage final : public IDiskRemote
|
||||
{
|
||||
public:
|
||||
|
||||
DiskBlobStorage(
|
||||
const String & name_,
|
||||
const String & remote_fs_root_path_,
|
||||
const String & metadata_path_,
|
||||
const String & log_name_,
|
||||
size_t thread_pool_size) :
|
||||
IDiskRemote(name_, remote_fs_root_path_, metadata_path_, log_name_, thread_pool_size) {}
|
||||
|
||||
DiskBlobStorage() : IDiskRemote("a", "b", "c", "d", 1) {}
|
||||
|
||||
std::unique_ptr<ReadBufferFromFileBase> readFile(
|
||||
const String &,
|
||||
size_t,
|
||||
|
@ -4,17 +4,40 @@
|
||||
|
||||
#include <Disks/DiskFactory.h>
|
||||
|
||||
#if USE_AZURE_BLOB_STORAGE
|
||||
|
||||
#include <Disks/BlobStorage/DiskBlobStorage.h>
|
||||
#include <Disks/DiskRestartProxy.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
#if USE_AZURE_BLOB_STORAGE
|
||||
void registerDiskBlobStorage(DiskFactory & factory)
|
||||
{
|
||||
auto creator = [](
|
||||
const String &,
|
||||
const Poco::Util::AbstractConfiguration &,
|
||||
const String &,
|
||||
ContextPtr,
|
||||
const DisksMap &)
|
||||
{
|
||||
std::shared_ptr<IDisk> diskBlobStorage = std::make_shared<DiskBlobStorage>();
|
||||
|
||||
void registerDiskBlobStorage(DiskFactory &) {};
|
||||
return std::make_shared<DiskRestartProxy>(diskBlobStorage);
|
||||
};
|
||||
factory.registerDiskType("blob_storage", creator);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void registerDiskBlobStorage(DiskFactory &) {};
|
||||
namespace DB
|
||||
{
|
||||
|
||||
#endif
|
||||
void registerDiskBlobStorage(DiskFactory &) {}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "WriteIndirectBufferFromRemoteFS.h"
|
||||
|
||||
#include <IO/WriteBufferFromS3.h>
|
||||
#include <IO/WriteBufferFromBlobStorage.h>
|
||||
#include <Storages/HDFS/WriteBufferFromHDFS.h>
|
||||
#include <IO/WriteBufferFromHTTP.h>
|
||||
|
||||
@ -57,6 +58,11 @@ template
|
||||
class WriteIndirectBufferFromRemoteFS<WriteBufferFromS3>;
|
||||
#endif
|
||||
|
||||
#if USE_AZURE_BLOB_STORAGE
|
||||
template
|
||||
class WriteIndirectBufferFromRemoteFS<WriteBufferFromBlobStorage>;
|
||||
#endif
|
||||
|
||||
#if USE_HDFS
|
||||
template
|
||||
class WriteIndirectBufferFromRemoteFS<WriteBufferFromHDFS>;
|
||||
|
Loading…
Reference in New Issue
Block a user