ClickHouse/dbms/include/DB/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.h
2016-01-17 08:22:22 +03:00

30 lines
522 B
C++

#pragma once
#include <DB/DataStreams/IBlockOutputStream.h>
namespace DB
{
class StorageReplicatedMergeTree;
class ReplicatedMergeTreeBlockOutputStream : public IBlockOutputStream
{
public:
ReplicatedMergeTreeBlockOutputStream(StorageReplicatedMergeTree & storage_, const String & insert_id_, size_t quorum_);
void writePrefix() override;
void write(const Block & block) override;
private:
StorageReplicatedMergeTree & storage;
String insert_id;
size_t quorum;
size_t block_index = 0;
Logger * log;
};
}