mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
31 lines
612 B
C++
31 lines
612 B
C++
#pragma once
|
|
|
|
#include <DataStreams/IBlockOutputStream.h>
|
|
#include <Interpreters/Context.h>
|
|
#include <Storages/Kafka/StorageKafka.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class KafkaBlockOutputStream : public IBlockOutputStream
|
|
{
|
|
public:
|
|
explicit KafkaBlockOutputStream(StorageKafka & storage_, const Context & context_);
|
|
|
|
Block getHeader() const override;
|
|
|
|
void writePrefix() override;
|
|
void write(const Block & block) override;
|
|
void writeSuffix() override;
|
|
|
|
void flush() override;
|
|
|
|
private:
|
|
StorageKafka & storage;
|
|
Context context;
|
|
ProducerBufferPtr buffer;
|
|
BlockOutputStreamPtr child;
|
|
};
|
|
|
|
}
|