OmniSciDB
a5dc49c757
|
#include <PersistentStorageMgr.h>
Public Member Functions | |
PersistentStorageMgr (const std::string &data_dir, const size_t num_reader_threads, const File_Namespace::DiskCacheConfig &disk_cache_config) | |
AbstractBuffer * | createBuffer (const ChunkKey &chunk_key, const size_t page_size, const size_t initial_size) override |
void | deleteBuffer (const ChunkKey &chunk_key, const bool purge) override |
void | deleteBuffersWithPrefix (const ChunkKey &chunk_key_prefix, const bool purge) override |
AbstractBuffer * | getBuffer (const ChunkKey &chunk_key, const size_t num_bytes) override |
void | fetchBuffer (const ChunkKey &chunk_key, AbstractBuffer *destination_buffer, const size_t num_bytes) override |
AbstractBuffer * | putBuffer (const ChunkKey &chunk_key, AbstractBuffer *source_buffer, const size_t num_bytes) override |
void | getChunkMetadataVecForKeyPrefix (ChunkMetadataVector &chunk_metadata, const ChunkKey &chunk_key_prefix) override |
bool | isBufferOnDevice (const ChunkKey &chunk_key) override |
std::string | printSlabs () override |
size_t | getMaxSize () override |
size_t | getInUseSize () override |
size_t | getAllocated () override |
bool | isAllocationCapped () override |
void | checkpoint () override |
void | checkpoint (const int db_id, const int tb_id) override |
AbstractBuffer * | alloc (const size_t num_bytes) override |
void | free (AbstractBuffer *buffer) override |
MgrType | getMgrType () override |
std::string | getStringMgrType () override |
size_t | getNumChunks () override |
void | removeTableRelatedDS (const int db_id, const int table_id) override |
void | removeMutableTableCacheData (const int db_id, const int table_id) const |
File_Namespace::GlobalFileMgr * | getGlobalFileMgr () const |
foreign_storage::ForeignStorageMgr * | getForeignStorageMgr () const |
foreign_storage::ForeignStorageCache * | getDiskCache () const |
const File_Namespace::DiskCacheConfig | getDiskCacheConfig () const |
const std::shared_ptr < ForeignStorageInterface > | getForeignStorageInterface () const |
Protected Member Functions | |
bool | isForeignStorage (const ChunkKey &chunk_key) const |
AbstractBufferMgr * | getStorageMgrForTableKey (const ChunkKey &table_key) const |
bool | isChunkPrefixCacheable (const ChunkKey &chunk_prefix) const |
int | recoverDataWrapperIfCachedAndGetHighestFragId (const ChunkKey &table_key) |
Protected Attributes | |
std::unique_ptr < File_Namespace::GlobalFileMgr > | global_file_mgr_ |
std::unique_ptr < foreign_storage::ForeignStorageMgr > | foreign_storage_mgr_ |
std::unique_ptr < foreign_storage::ForeignStorageCache > | disk_cache_ |
File_Namespace::DiskCacheConfig | disk_cache_config_ |
std::shared_ptr < ForeignStorageInterface > | fsi_ |
Definition at line 26 of file PersistentStorageMgr.h.
PersistentStorageMgr::PersistentStorageMgr | ( | const std::string & | data_dir, |
const size_t | num_reader_threads, | ||
const File_Namespace::DiskCacheConfig & | disk_cache_config | ||
) |
Definition at line 24 of file PersistentStorageMgr.cpp.
References CHECK, disk_cache_, disk_cache_config_, foreign_storage_mgr_, fsi_, global_file_mgr_, File_Namespace::DiskCacheConfig::isEnabled(), File_Namespace::DiskCacheConfig::isEnabledForFSI(), File_Namespace::DiskCacheConfig::isEnabledForMutableTables(), registerArrowCsvForeignStorage(), and registerArrowForeignStorage().
|
override |
Definition at line 130 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 122 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 126 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 55 of file PersistentStorageMgr.cpp.
References getStorageMgrForTableKey().
|
override |
Definition at line 62 of file PersistentStorageMgr.cpp.
References getStorageMgrForTableKey().
|
override |
Definition at line 66 of file PersistentStorageMgr.cpp.
References getStorageMgrForTableKey().
|
override |
Definition at line 77 of file PersistentStorageMgr.cpp.
References getStorageMgrForTableKey().
|
override |
Definition at line 134 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 114 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 72 of file PersistentStorageMgr.cpp.
References getStorageMgrForTableKey().
|
override |
Definition at line 91 of file PersistentStorageMgr.cpp.
References getStorageMgrForTableKey().
foreign_storage::ForeignStorageCache * PersistentStorageMgr::getDiskCache | ( | ) | const |
Definition at line 202 of file PersistentStorageMgr.cpp.
References disk_cache_.
Referenced by Catalog_Namespace::anonymous_namespace{Catalog.cpp}::clear_cached_table_data().
|
inline |
Definition at line 66 of file PersistentStorageMgr.h.
|
inline |
Definition at line 69 of file PersistentStorageMgr.h.
foreign_storage::ForeignStorageMgr * PersistentStorageMgr::getForeignStorageMgr | ( | ) | const |
Definition at line 198 of file PersistentStorageMgr.cpp.
References foreign_storage_mgr_.
Referenced by anonymous_namespace{RelAlgExecutor.cpp}::set_parallelism_hints().
File_Namespace::GlobalFileMgr * PersistentStorageMgr::getGlobalFileMgr | ( | ) | const |
Definition at line 150 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 110 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 106 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 138 of file PersistentStorageMgr.cpp.
|
override |
Definition at line 146 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
protected |
Definition at line 189 of file PersistentStorageMgr.cpp.
References foreign_storage_mgr_, global_file_mgr_, and isForeignStorage().
Referenced by createBuffer(), deleteBuffer(), deleteBuffersWithPrefix(), fetchBuffer(), getBuffer(), getChunkMetadataVecForKeyPrefix(), putBuffer(), and removeTableRelatedDS().
|
override |
Definition at line 142 of file PersistentStorageMgr.cpp.
|
override |
Definition at line 118 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 98 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
protected |
|
protected |
Definition at line 169 of file PersistentStorageMgr.cpp.
References CHECK, CHUNK_KEY_DB_IDX, CHUNK_KEY_TABLE_IDX, StorageType::FOREIGN_TABLE, Catalog_Namespace::SysCatalog::getCatalog(), has_table_prefix(), and Catalog_Namespace::SysCatalog::instance().
Referenced by getStorageMgrForTableKey().
|
override |
Definition at line 102 of file PersistentStorageMgr.cpp.
References global_file_mgr_.
|
override |
Definition at line 84 of file PersistentStorageMgr.cpp.
References getStorageMgrForTableKey().
|
protected |
void PersistentStorageMgr::removeMutableTableCacheData | ( | const int | db_id, |
const int | table_id | ||
) | const |
Definition at line 158 of file PersistentStorageMgr.cpp.
References disk_cache_config_, global_file_mgr_, and File_Namespace::DiskCacheConfig::isEnabledForMutableTables().
Referenced by Data_Namespace::DataMgr::removeMutableTableDiskCacheData().
|
override |
Definition at line 154 of file PersistentStorageMgr.cpp.
References getStorageMgrForTableKey().
|
protected |
Definition at line 82 of file PersistentStorageMgr.h.
Referenced by getDiskCache(), and PersistentStorageMgr().
|
protected |
Definition at line 83 of file PersistentStorageMgr.h.
Referenced by PersistentStorageMgr(), and removeMutableTableCacheData().
|
protected |
Definition at line 81 of file PersistentStorageMgr.h.
Referenced by getForeignStorageMgr(), getStorageMgrForTableKey(), and PersistentStorageMgr().
|
protected |
Definition at line 84 of file PersistentStorageMgr.h.
Referenced by PersistentStorageMgr().
|
protected |
Definition at line 80 of file PersistentStorageMgr.h.
Referenced by alloc(), checkpoint(), free(), getAllocated(), getGlobalFileMgr(), getInUseSize(), getMaxSize(), getNumChunks(), getStorageMgrForTableKey(), isAllocationCapped(), isBufferOnDevice(), PersistentStorageMgr(), printSlabs(), and removeMutableTableCacheData().