mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
Rename readDistributedAsyncInsertHeader()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
a76d7b22c1
commit
00115c6615
@ -201,7 +201,7 @@ void DistributedAsyncInsertBatch::sendBatch()
|
||||
for (const auto & file : files)
|
||||
{
|
||||
ReadBufferFromFile in(file);
|
||||
const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log);
|
||||
const auto & distributed_header = DistributedAsyncInsertHeader::read(in, parent.log);
|
||||
|
||||
OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__,
|
||||
distributed_header.client_info.client_trace_context,
|
||||
@ -240,7 +240,7 @@ void DistributedAsyncInsertBatch::sendSeparateFiles()
|
||||
try
|
||||
{
|
||||
ReadBufferFromFile in(file);
|
||||
const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log);
|
||||
const auto & distributed_header = DistributedAsyncInsertHeader::read(in, parent.log);
|
||||
|
||||
// This function is called in a separated thread, so we set up the trace context from the file
|
||||
OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__,
|
||||
|
@ -417,7 +417,7 @@ void DistributedAsyncInsertDirectoryQueue::processFile(const std::string & file_
|
||||
CurrentMetrics::Increment metric_increment{CurrentMetrics::DistributedSend};
|
||||
|
||||
ReadBufferFromFile in(file_path);
|
||||
const auto & distributed_header = readDistributedAsyncInsertHeader(in, log);
|
||||
const auto & distributed_header = DistributedAsyncInsertHeader::read(in, log);
|
||||
|
||||
thread_trace_context = std::make_unique<OpenTelemetry::TracingContextHolder>(__PRETTY_FUNCTION__,
|
||||
distributed_header.client_info.client_trace_context,
|
||||
@ -563,7 +563,7 @@ void DistributedAsyncInsertDirectoryQueue::processFilesWithBatching()
|
||||
{
|
||||
/// Determine metadata of the current file and check if it is not broken.
|
||||
ReadBufferFromFile in{file_path};
|
||||
distributed_header = readDistributedAsyncInsertHeader(in, log);
|
||||
distributed_header = DistributedAsyncInsertHeader::read(in, log);
|
||||
|
||||
if (distributed_header.rows)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ namespace ErrorCodes
|
||||
extern const int CHECKSUM_DOESNT_MATCH;
|
||||
}
|
||||
|
||||
DistributedAsyncInsertHeader readDistributedAsyncInsertHeader(ReadBufferFromFile & in, Poco::Logger * log)
|
||||
DistributedAsyncInsertHeader DistributedAsyncInsertHeader::read(ReadBufferFromFile & in, Poco::Logger * log)
|
||||
{
|
||||
DistributedAsyncInsertHeader distributed_header;
|
||||
|
||||
|
@ -31,8 +31,8 @@ struct DistributedAsyncInsertHeader
|
||||
/// dumpStructure() of the header -- obsolete
|
||||
std::string block_header_string;
|
||||
Block block_header;
|
||||
|
||||
static DistributedAsyncInsertHeader read(ReadBufferFromFile & in, Poco::Logger * log);
|
||||
};
|
||||
|
||||
DistributedAsyncInsertHeader readDistributedAsyncInsertHeader(ReadBufferFromFile & in, Poco::Logger * log);
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ struct DistributedAsyncInsertSource::Data
|
||||
: log(&Poco::Logger::get("DistributedAsyncInsertSource"))
|
||||
, in(file_name)
|
||||
, decompressing_in(in)
|
||||
, block_in(decompressing_in, readDistributedAsyncInsertHeader(in, log).revision)
|
||||
, block_in(decompressing_in, DistributedAsyncInsertHeader::read(in, log).revision)
|
||||
, first_block(block_in.read())
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user