ClickHouse/src/Interpreters/S3QueueLog.h
2024-01-12 16:39:22 +01:00

45 lines
1016 B
C++

#pragma once
#include <Common/ProfileEvents.h>
#include <Core/NamesAndAliases.h>
#include <Core/NamesAndTypes.h>
#include <Interpreters/SystemLog.h>
#include <Storages/ColumnsDescription.h>
namespace DB
{
struct S3QueueLogElement
{
time_t event_time{};
std::string table_uuid;
std::string file_name;
size_t rows_processed = 0;
enum class S3QueueStatus
{
Processed,
Failed,
};
S3QueueStatus status;
ProfileEvents::Counters::Snapshot counters_snapshot;
time_t processing_start_time;
time_t processing_end_time;
std::string exception;
static std::string name() { return "S3QueueLog"; }
static ColumnsDescription getColumnsDescription();
static NamesAndAliases getNamesAndAliases() { return {}; }
void appendToBlock(MutableColumns & columns) const;
static const char * getCustomColumnList() { return nullptr; }
};
class S3QueueLog : public SystemLog<S3QueueLogElement>
{
using SystemLog<S3QueueLogElement>::SystemLog;
};
}