ClickHouse/src/Storages/System/StorageSystemFilesystemCache.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.1 KiB
C++
Raw Normal View History

#pragma once
#include <Storages/System/IStorageSystemOneBlock.h>
2023-06-29 14:41:36 +00:00
#include <Interpreters/Cache/FileCache_fwd_internal.h>
namespace DB
{
2022-03-23 14:35:15 +00:00
/**
* Usage example. How to get mapping from local paths to remote paths:
2022-03-23 17:11:52 +00:00
* SELECT
* cache_path,
* cache_hits,
* remote_path,
* local_path,
2022-04-07 16:46:46 +00:00
* file_segment_range_begin,
* file_segment_range_end,
2022-03-23 17:11:52 +00:00
* size,
* state
* FROM
* (
* SELECT
* arrayJoin(cache_paths) AS cache_path,
* local_path,
* remote_path
* FROM system.remote_data_paths
* ) AS data_paths
2022-03-30 11:47:44 +00:00
* INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path
2022-03-23 17:11:52 +00:00
* FORMAT Vertical
2022-03-23 14:35:15 +00:00
*/
class StorageSystemFilesystemCache final : public IStorageSystemOneBlock<StorageSystemFilesystemCache>
{
public:
explicit StorageSystemFilesystemCache(const StorageID & table_id_);
2022-03-30 09:54:42 +00:00
std::string getName() const override { return "SystemFilesystemCache"; }
static ColumnsDescription getColumnsDescription();
protected:
void fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo & query_info) const override;
};
}