system.blob_storage_log
在 ClickHouse Cloud 中查询
此系统表中的数据在 ClickHouse Cloud 中的每个节点上本地保存。因此,要获得所有数据的完整视图,需要使用 clusterAllReplicas 函数。有关进一步的详细信息,请参见 这里。
包含有关各种 blob 存储操作(例如上传和删除)的日志条目。
列:
hostname(LowCardinality(String)) — 执行查询的服务器主机名。event_date(Date) — 事件的日期。event_time(DateTime) — 事件的时间。event_time_microseconds(DateTime64) — 事件的时间,微秒精度。event_type(Enum8) — 事件的类型。可能的值:'Upload''Delete''MultiPartUploadCreate''MultiPartUploadWrite''MultiPartUploadComplete''MultiPartUploadAbort'
query_id(String) — 与事件相关的查询的标识符(如果有)。thread_id(UInt64) — 执行操作的线程标识符。thread_name(String) — 执行操作的线程名称。disk_name(LowCardinality(String)) — 关联磁盘的名称。bucket(String) — 桶的名称。remote_path(String) — 远程资源的路径。local_path(String) — 本地系统上指向元数据文件的路径,该文件引用了远程资源。data_size(UInt32) — 参与上传事件的数据大小。error(String) — 与事件相关的错误消息(如果有)。
示例
假设 blob 存储操作上传一个文件,并记录了一条事件:
在此示例中,上传操作与 ID 为 7afe0450-504d-4e4b-9a80-cd9826047972 的 INSERT 查询相关联。 本地元数据文件 store/654/6549e8b3-d753-4447-8047-d462df6e6dbe/tmp_insert_all_1_1_0/checksums.txt 指向桶 bucket1 中磁盘 disk_s3 的远程路径 rrr/kxo/tbnqtrghgtnxkzgtcrlutwuslgawe,数据大小为 259 字节。
另见