mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
b5434eac3b
Since #44922 it is not a directory monitor anymore. v2: Remove unused error codes v3: Contains some header fixes due to conflicts with master Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
45 lines
865 B
C++
45 lines
865 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class DistributedAsyncInsertDirectoryQueue;
|
|
class WriteBuffer;
|
|
class ReadBuffer;
|
|
|
|
class DistributedAsyncInsertBatch
|
|
{
|
|
public:
|
|
explicit DistributedAsyncInsertBatch(DistributedAsyncInsertDirectoryQueue & parent_);
|
|
|
|
bool isEnoughSize() const;
|
|
void send();
|
|
|
|
void serialize();
|
|
void deserialize();
|
|
|
|
size_t total_rows = 0;
|
|
size_t total_bytes = 0;
|
|
std::vector<std::string> files;
|
|
|
|
private:
|
|
void writeText(WriteBuffer & out);
|
|
void readText(ReadBuffer & in);
|
|
void sendBatch();
|
|
void sendSeparateFiles();
|
|
|
|
DistributedAsyncInsertDirectoryQueue & parent;
|
|
|
|
/// Does the batch had been created from the files in current_batch.txt?
|
|
bool recovered = false;
|
|
|
|
bool split_batch_on_failure = true;
|
|
bool fsync = false;
|
|
bool dir_fsync = false;
|
|
};
|
|
|
|
}
|