ClickHouse/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.h

34 lines
665 B
C++
Raw Normal View History

2014-04-02 07:59:43 +00:00
#pragma once
#include <DataStreams/IBlockOutputStream.h>
#include <Core/Types.h>
2014-04-02 07:59:43 +00:00
namespace Poco { class Logger; }
2014-04-02 07:59:43 +00:00
namespace DB
{
2016-01-17 05:22:22 +00:00
class StorageReplicatedMergeTree;
2014-04-02 07:59:43 +00:00
class ReplicatedMergeTreeBlockOutputStream : public IBlockOutputStream
{
public:
ReplicatedMergeTreeBlockOutputStream(StorageReplicatedMergeTree & storage_, const String & insert_id_,
size_t quorum_, size_t quorum_timeout_ms_);
void write(const Block & block) override;
2014-04-02 07:59:43 +00:00
private:
StorageReplicatedMergeTree & storage;
String insert_id;
size_t quorum;
size_t quorum_timeout_ms;
size_t block_index = 0;
using Logger = Poco::Logger;
Logger * log;
2014-04-02 07:59:43 +00:00
};
}