Class Data_Namespace::DataMgr¶
-
class
DataMgr
¶ Public Functions
-
DataMgr
(const std::string &dataDir, const SystemParameters &system_parameters, std::unique_ptr<CudaMgr_Namespace::CudaMgr> cudaMgr, const bool useGpus, const size_t reservedGpuMem = (1 << 27), const size_t numReaderThreads = 0, const File_Namespace::DiskCacheConfig cacheConfig = File_Namespace::DiskCacheConfig())¶
-
~DataMgr
()¶
-
AbstractBuffer *
createChunkBuffer
(const ChunkKey &key, const MemoryLevel memoryLevel, const int deviceId = 0, const size_t page_size = 0)¶
-
AbstractBuffer *
getChunkBuffer
(const ChunkKey &key, const MemoryLevel memoryLevel, const int deviceId = 0, const size_t numBytes = 0)¶
-
void
deleteChunksWithPrefix
(const ChunkKey &keyPrefix)¶
-
void
deleteChunksWithPrefix
(const ChunkKey &keyPrefix, const MemoryLevel memLevel)¶
-
AbstractBuffer *
alloc
(const MemoryLevel memoryLevel, const int deviceId, const size_t numBytes)¶
-
void
free
(AbstractBuffer *buffer)¶
-
void
copy
(AbstractBuffer *destBuffer, AbstractBuffer *srcBuffer)¶
-
bool
isBufferOnDevice
(const ChunkKey &key, const MemoryLevel memLevel, const int deviceId)¶
-
std::vector<MemoryInfo>
getMemoryInfo
(const MemoryLevel memLevel) const¶
-
std::vector<MemoryInfo>
getMemoryInfoUnlocked
(const MemoryLevel memLevel) const¶
-
std::string
dumpLevel
(const MemoryLevel memLevel)¶
-
void
clearMemory
(const MemoryLevel memLevel)¶
-
const std::map<ChunkKey, File_Namespace::FileBuffer *> &
getChunkMap
()¶
-
void
checkpoint
(const int db_id, const int tb_id)¶
-
void
checkpoint
(const int db_id, const int table_id, const MemoryLevel memory_level)¶
-
void
getChunkMetadataVecForKeyPrefix
(ChunkMetadataVector &chunkMetadataVec, const ChunkKey &keyPrefix)¶
-
bool
gpusPresent
() const¶
-
void
removeTableRelatedDS
(const int db_id, const int tb_id)¶
-
void
setTableEpoch
(const int db_id, const int tb_id, const int start_epoch)¶
-
size_t
getTableEpoch
(const int db_id, const int tb_id)¶
-
void
resetTableEpochFloor
(const int32_t db_id, const int32_t tb_id)¶
-
File_Namespace::GlobalFileMgr *
getGlobalFileMgr
() const¶
-
std::shared_ptr<ForeignStorageInterface>
getForeignStorageInterface
() const¶
-
std::unique_ptr<DeviceAllocator>
createGpuAllocator
(int device_id)¶
-
DataMgr::SystemMemoryUsage
getSystemMemoryUsage
() const¶
-
PersistentStorageMgr *
getPersistentStorageMgr
() const¶
-
void
resetPersistentStorage
(const File_Namespace::DiskCacheConfig &cache_config, const size_t num_reader_threads, const SystemParameters &sys_params)¶
-
Buffer_Namespace::CpuBufferMgr *
getCpuBufferMgr
() const¶
-
Buffer_Namespace::GpuCudaBufferMgr *
getGpuBufferMgr
(int32_t device_id) const¶
Public Members
-
std::vector<int>
levelSizes_
¶
Public Static Functions
-
size_t
getTotalSystemMemory
()¶
Private Functions
-
void
populateMgrs
(const SystemParameters &system_parameters, const size_t userSpecifiedNumReaderThreads, const File_Namespace::DiskCacheConfig &cache_config)¶
-
void
convertDB
(const std::string basePath)¶
-
void
checkpoint
()¶
-
void
createTopLevelMetadata
() const¶
-
void
allocateCpuBufferMgr
(int32_t device_id, size_t total_cpu_size, size_t minCpuSlabSize, size_t maxCpuSlabSize, size_t page_size, const std::vector<size_t> &cpu_tier_sizes)¶
Private Members
-
std::vector<std::vector<AbstractBufferMgr *>>
bufferMgrs_
¶
-
std::string
dataDir_
¶
-
bool
hasGpus_
¶
-
size_t
reservedGpuMem_
¶
-
std::mutex
buffer_access_mutex_
¶
Friends
-
friend
Data_Namespace::DataMgr::GlobalFileMgr
-
struct
SystemMemoryUsage
¶
-