ClickHouse/dbms/include/DB/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.h

32 lines
578 B
C++
Raw Normal View History

2014-04-02 07:59:43 +00:00
#pragma once
2015-04-16 06:12:35 +00:00
#include <DB/DataStreams/IBlockOutputStream.h>
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_);
2016-01-17 05:22:22 +00:00
void writePrefix() override;
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;
2015-04-16 06:12:35 +00:00
size_t block_index = 0;
2014-04-02 13:45:39 +00:00
Logger * log;
2014-04-02 07:59:43 +00:00
};
}