OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
File_Namespace::GlobalFileMgr Class Reference

#include <GlobalFileMgr.h>

+ Inheritance diagram for File_Namespace::GlobalFileMgr:
+ Collaboration diagram for File_Namespace::GlobalFileMgr:

Public Member Functions

 GlobalFileMgr (const int deviceId, std::string basePath=".", const size_t num_reader_threads=0, const size_t defaultPageSize=2097152)
 Constructor. More...
 
 ~GlobalFileMgr () override
 Destructor. More...
 
AbstractBuffercreateBuffer (const ChunkKey &key, size_t pageSize=0, const size_t numBytes=0) override
 Creates a chunk with the specified key and page size. More...
 
bool isBufferOnDevice (const ChunkKey &key) override
 
void deleteBuffer (const ChunkKey &key, const bool purge=true) override
 Deletes the chunk with the specified key. More...
 
void deleteBuffersWithPrefix (const ChunkKey &keyPrefix, const bool purge=true) override
 
AbstractBuffergetBuffer (const ChunkKey &key, const size_t numBytes=0) override
 Returns the a pointer to the chunk with the specified key. More...
 
void fetchBuffer (const ChunkKey &key, AbstractBuffer *destBuffer, const size_t numBytes) override
 
AbstractBufferputBuffer (const ChunkKey &key, AbstractBuffer *d, const size_t numBytes=0) override
 Puts the contents of d into the Chunk with the given key. More...
 
AbstractBufferalloc (const size_t numBytes) override
 
void free (AbstractBuffer *buffer) override
 
MgrType getMgrType () override
 
std::string getStringMgrType () override
 
std::string printSlabs () override
 
void clearSlabs () override
 
size_t getMaxSize () override
 
size_t getInUseSize () override
 
size_t getAllocated () override
 
bool isAllocationCapped () override
 
void init ()
 
void getChunkMetadataVec (std::vector< std::pair< ChunkKey, ChunkMetadata >> &chunkMetadataVec) override
 
void getChunkMetadataVecForKeyPrefix (std::vector< std::pair< ChunkKey, ChunkMetadata >> &chunkMetadataVec, const ChunkKey &keyPrefix) override
 
void checkpoint () override
 Fsyncs data files, writes out epoch and fsyncs that. More...
 
void checkpoint (const int db_id, const int tb_id) override
 
size_t getNumReaderThreads ()
 Returns number of threads defined by parameter num-reader-threads which should be used during initial load and consequent read of data. More...
 
size_t getNumChunks () override
 
FileMgrfindFileMgr (const int db_id, const int tb_id, const bool removeFromMap=false)
 
FileMgrgetFileMgr (const int db_id, const int tb_id)
 
FileMgrgetFileMgr (const ChunkKey &key)
 
std::string getBasePath () const
 
size_t getDefaultPageSize () const
 
void writeFileMgrData (FileMgr *fileMgr=0)
 
int getDBVersion () const
 
bool getDBConvert () const
 
void setDBConvert (bool val)
 
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)
 

Private Attributes

std::string basePath_
 
size_t num_reader_threads_
 The OS file system path containing the files. More...
 
int epoch_
 number of threads used when loading data More...
 
size_t defaultPageSize_
 
int mapd_db_version_
 default page size, used to set FileMgr defaultPageSize_ More...
 
bool dbConvert_
 
std::map< std::pair< int, int >
, FileMgr * > 
fileMgrs_
 
mapd_shared_mutex fileMgrs_mutex_
 

Detailed Description

Definition at line 47 of file GlobalFileMgr.h.

Constructor & Destructor Documentation

File_Namespace::GlobalFileMgr::GlobalFileMgr ( const int  deviceId,
std::string  basePath = ".",
const size_t  num_reader_threads = 0,
const size_t  defaultPageSize = 2097152 
)

Constructor.

Definition at line 40 of file GlobalFileMgr.cpp.

References dbConvert_, init(), and mapd_db_version_.

44  : AbstractBufferMgr(deviceId)
45  , basePath_(basePath)
46  , num_reader_threads_(num_reader_threads)
47  , epoch_(-1)
48  , // set the default epoch for all tables corresponding to the time of
49  // last checkpoint
50  defaultPageSize_(defaultPageSize) {
52  1; // DS changes triggered by individual FileMgr per table project (release 2.1.0)
53  dbConvert_ = false;
54  init();
55 }
int epoch_
number of threads used when loading data
int mapd_db_version_
default page size, used to set FileMgr defaultPageSize_
size_t num_reader_threads_
The OS file system path containing the files.

+ Here is the call graph for this function:

File_Namespace::GlobalFileMgr::~GlobalFileMgr ( )
override

Destructor.

Definition at line 57 of file GlobalFileMgr.cpp.

References fileMgrs_, and fileMgrs_mutex_.

57  {
58  mapd_lock_guard<mapd_shared_mutex> fileMgrsMutex(fileMgrs_mutex_);
59  for (auto fileMgrsIt = fileMgrs_.begin(); fileMgrsIt != fileMgrs_.end(); ++fileMgrsIt) {
60  delete fileMgrsIt->second;
61  }
62 }
std::map< std::pair< int, int >, FileMgr * > fileMgrs_
mapd_shared_mutex fileMgrs_mutex_

Member Function Documentation

AbstractBuffer* File_Namespace::GlobalFileMgr::alloc ( const size_t  numBytes)
inlineoverride

Definition at line 105 of file GlobalFileMgr.h.

References logger::FATAL, and LOG.

105  {
106  LOG(FATAL) << "Operation not supported";
107  return nullptr; // satisfy return-type warning
108  }
#define LOG(tag)
Definition: Logger.h:185
void File_Namespace::GlobalFileMgr::checkpoint ( )
override

Fsyncs data files, writes out epoch and fsyncs that.

Definition at line 81 of file GlobalFileMgr.cpp.

References fileMgrs_, and fileMgrs_mutex_.

81  {
82  mapd_lock_guard<mapd_shared_mutex> fileMgrsMutex(fileMgrs_mutex_);
83  for (auto fileMgrsIt = fileMgrs_.begin(); fileMgrsIt != fileMgrs_.end(); ++fileMgrsIt) {
84  fileMgrsIt->second->checkpoint();
85  }
86 }
std::map< std::pair< int, int >, FileMgr * > fileMgrs_
mapd_shared_mutex fileMgrs_mutex_
void File_Namespace::GlobalFileMgr::checkpoint ( const int  db_id,
const int  tb_id 
)
override

Definition at line 88 of file GlobalFileMgr.cpp.

References File_Namespace::FileMgr::checkpoint(), and getFileMgr().

88  {
89  getFileMgr(db_id, tb_id)->checkpoint();
90 }
FileMgr * getFileMgr(const int db_id, const int tb_id)
void checkpoint() override
Fsyncs data files, writes out epoch and fsyncs that.
Definition: FileMgr.cpp:577

+ Here is the call graph for this function:

void File_Namespace::GlobalFileMgr::clearSlabs ( )
inlineoverride

Definition at line 115 of file GlobalFileMgr.h.

115  { /* noop */
116  }
AbstractBuffer* File_Namespace::GlobalFileMgr::createBuffer ( const ChunkKey key,
size_t  pageSize = 0,
const size_t  numBytes = 0 
)
inlineoverride

Creates a chunk with the specified key and page size.

Definition at line 60 of file GlobalFileMgr.h.

62  {
63  return getFileMgr(key)->createBuffer(key, pageSize, numBytes);
64  }
FileMgr * getFileMgr(const int db_id, const int tb_id)
AbstractBuffer * createBuffer(const ChunkKey &key, size_t pageSize=0, const size_t numBytes=0) override
Creates a chunk with the specified key and page size.
Definition: FileMgr.cpp:611
void File_Namespace::GlobalFileMgr::deleteBuffer ( const ChunkKey key,
const bool  purge = true 
)
inlineoverride

Deletes the chunk with the specified key.

Definition at line 74 of file GlobalFileMgr.h.

74  {
75  return getFileMgr(key)->deleteBuffer(key, purge);
76  }
FileMgr * getFileMgr(const int db_id, const int tb_id)
void deleteBuffer(const ChunkKey &key, const bool purge=true) override
Deletes the chunk with the specified key.
Definition: FileMgr.cpp:636
void File_Namespace::GlobalFileMgr::deleteBuffersWithPrefix ( const ChunkKey keyPrefix,
const bool  purge = true 
)
override

Definition at line 105 of file GlobalFileMgr.cpp.

References File_Namespace::FileMgr::deleteBuffersWithPrefix(), and getFileMgr().

105  {
106  /* keyPrefix[0] can be -1 only for gpu or cpu buffers but not for FileMgr.
107  * There is no assert here, as GlobalFileMgr is being called with -1 value as well in
108  * the same loop with other buffers. So the case of -1 will just be ignored, as nothing
109  * needs to be done.
110  */
111  if (keyPrefix[0] != -1) {
112  return getFileMgr(keyPrefix)->deleteBuffersWithPrefix(keyPrefix, purge);
113  }
114 }
FileMgr * getFileMgr(const int db_id, const int tb_id)
void deleteBuffersWithPrefix(const ChunkKey &keyPrefix, const bool purge=true) override
Definition: FileMgr.cpp:653

+ Here is the call graph for this function:

void File_Namespace::GlobalFileMgr::fetchBuffer ( const ChunkKey key,
AbstractBuffer destBuffer,
const size_t  numBytes 
)
inlineoverride

Definition at line 86 of file GlobalFileMgr.h.

88  {
89  return getFileMgr(key)->fetchBuffer(key, destBuffer, numBytes);
90  }
FileMgr * getFileMgr(const int db_id, const int tb_id)
void fetchBuffer(const ChunkKey &key, AbstractBuffer *destBuffer, const size_t numBytes) override
Definition: FileMgr.cpp:689
FileMgr * File_Namespace::GlobalFileMgr::findFileMgr ( const int  db_id,
const int  tb_id,
const bool  removeFromMap = false 
)

Definition at line 130 of file GlobalFileMgr.cpp.

References fileMgrs_, and fileMgrs_mutex_.

Referenced by getFileMgr(), removeTableRelatedDS(), and setTableEpoch().

132  {
133  FileMgr* fm = nullptr;
134  const auto file_mgr_key = std::make_pair(db_id, tb_id);
135  {
136  mapd_lock_guard<mapd_shared_mutex> read_lock(fileMgrs_mutex_);
137  auto it = fileMgrs_.find(file_mgr_key);
138  if (it != fileMgrs_.end()) {
139  fm = it->second;
140  if (removeFromMap) {
141  fileMgrs_.erase(it);
142  }
143  }
144  }
145  return fm;
146 }
std::map< std::pair< int, int >, FileMgr * > fileMgrs_
mapd_shared_mutex fileMgrs_mutex_

+ Here is the caller graph for this function:

void File_Namespace::GlobalFileMgr::free ( AbstractBuffer buffer)
inlineoverride

Definition at line 110 of file GlobalFileMgr.h.

References logger::FATAL, and LOG.

110 { LOG(FATAL) << "Operation not supported"; }
#define LOG(tag)
Definition: Logger.h:185
size_t File_Namespace::GlobalFileMgr::getAllocated ( )
inlineoverride

Definition at line 119 of file GlobalFileMgr.h.

119 { return 0; }
std::string File_Namespace::GlobalFileMgr::getBasePath ( ) const
inline

Definition at line 153 of file GlobalFileMgr.h.

Referenced by Catalog_Namespace::abs_path(), File_Namespace::FileMgr::FileMgr(), and File_Namespace::FileMgr::init().

153 { return basePath_; }

+ Here is the caller graph for this function:

AbstractBuffer* File_Namespace::GlobalFileMgr::getBuffer ( const ChunkKey key,
const size_t  numBytes = 0 
)
inlineoverride

Returns the a pointer to the chunk with the specified key.

Definition at line 82 of file GlobalFileMgr.h.

82  {
83  return getFileMgr(key)->getBuffer(key, numBytes);
84  }
FileMgr * getFileMgr(const int db_id, const int tb_id)
AbstractBuffer * getBuffer(const ChunkKey &key, const size_t numBytes=0) override
Returns the a pointer to the chunk with the specified key.
Definition: FileMgr.cpp:680
void File_Namespace::GlobalFileMgr::getChunkMetadataVec ( std::vector< std::pair< ChunkKey, ChunkMetadata >> &  chunkMetadataVec)
override

Definition at line 116 of file GlobalFileMgr.cpp.

References fileMgrs_, and fileMgrs_mutex_.

117  {
118  mapd_shared_lock<mapd_shared_mutex> fileMgrsMutex(fileMgrs_mutex_);
119  std::vector<std::pair<ChunkKey, ChunkMetadata>> chunkMetadataVecForFileMgr;
120  for (auto fileMgrsIt = fileMgrs_.begin(); fileMgrsIt != fileMgrs_.end(); ++fileMgrsIt) {
121  fileMgrsIt->second->getChunkMetadataVec(chunkMetadataVecForFileMgr);
122  while (!chunkMetadataVecForFileMgr.empty()) {
123  // norair - order of elements is reversed, consider optimising this later if needed
124  chunkMetadataVec.push_back(chunkMetadataVecForFileMgr.back());
125  chunkMetadataVecForFileMgr.pop_back();
126  }
127  }
128 }
std::map< std::pair< int, int >, FileMgr * > fileMgrs_
mapd_shared_mutex fileMgrs_mutex_
void File_Namespace::GlobalFileMgr::getChunkMetadataVecForKeyPrefix ( std::vector< std::pair< ChunkKey, ChunkMetadata >> &  chunkMetadataVec,
const ChunkKey keyPrefix 
)
inlineoverride

Definition at line 126 of file GlobalFileMgr.h.

128  {
129  return getFileMgr(keyPrefix)->getChunkMetadataVecForKeyPrefix(chunkMetadataVec,
130  keyPrefix);
131  }
FileMgr * getFileMgr(const int db_id, const int tb_id)
void getChunkMetadataVecForKeyPrefix(std::vector< std::pair< ChunkKey, ChunkMetadata >> &chunkMetadataVec, const ChunkKey &keyPrefix) override
Definition: FileMgr.cpp:942
bool File_Namespace::GlobalFileMgr::getDBConvert ( ) const
inline

Definition at line 159 of file GlobalFileMgr.h.

Referenced by File_Namespace::FileMgr::getDBConvert().

159 { return dbConvert_; }

+ Here is the caller graph for this function:

int File_Namespace::GlobalFileMgr::getDBVersion ( ) const
inline

Definition at line 158 of file GlobalFileMgr.h.

Referenced by File_Namespace::FileMgr::getDBVersion().

158 { return mapd_db_version_; }
int mapd_db_version_
default page size, used to set FileMgr defaultPageSize_

+ Here is the caller graph for this function:

size_t File_Namespace::GlobalFileMgr::getDefaultPageSize ( ) const
inline

Definition at line 154 of file GlobalFileMgr.h.

Referenced by Data_Namespace::DataMgr::convertDB().

154 { return defaultPageSize_; }

+ Here is the caller graph for this function:

FileMgr * File_Namespace::GlobalFileMgr::getFileMgr ( const int  db_id,
const int  tb_id 
)

Definition at line 148 of file GlobalFileMgr.cpp.

References CHECK(), defaultPageSize_, epoch_, fileMgrs_, fileMgrs_mutex_, findFileMgr(), and num_reader_threads_.

Referenced by checkpoint(), Data_Namespace::DataMgr::createTopLevelMetadata(), deleteBuffersWithPrefix(), Catalog_Namespace::Catalog::getTableDataDirectories(), getTableEpoch(), and File_Namespace::FileMgr::init().

148  {
149  { /* check if FileMgr already exists for (db_id, tb_id) */
150  FileMgr* fm = findFileMgr(db_id, tb_id);
151  if (fm != nullptr) {
152  return fm;
153  }
154  }
155 
156  { /* create new FileMgr for (db_id, tb_id) */
157  const auto file_mgr_key = std::make_pair(db_id, tb_id);
158  mapd_lock_guard<mapd_shared_mutex> write_lock(fileMgrs_mutex_);
159  auto it = fileMgrs_.find(file_mgr_key);
160  if (it != fileMgrs_.end()) {
161  return it->second;
162  }
163  FileMgr* fm =
164  new FileMgr(0, this, file_mgr_key, num_reader_threads_, epoch_, defaultPageSize_);
165  auto it_ok = fileMgrs_.insert(std::make_pair(file_mgr_key, fm));
166  CHECK(it_ok.second);
167 
168  return fm;
169  }
170 }
int epoch_
number of threads used when loading data
FileMgr * findFileMgr(const int db_id, const int tb_id, const bool removeFromMap=false)
CHECK(cgen_state)
std::map< std::pair< int, int >, FileMgr * > fileMgrs_
size_t num_reader_threads_
The OS file system path containing the files.
mapd_shared_mutex fileMgrs_mutex_

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FileMgr* File_Namespace::GlobalFileMgr::getFileMgr ( const ChunkKey key)
inline

Definition at line 152 of file GlobalFileMgr.h.

References getFileMgr().

Referenced by getFileMgr().

152 { return getFileMgr(key[0], key[1]); }
FileMgr * getFileMgr(const int db_id, const int tb_id)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t File_Namespace::GlobalFileMgr::getInUseSize ( )
inlineoverride

Definition at line 118 of file GlobalFileMgr.h.

118 { return 0; }
size_t File_Namespace::GlobalFileMgr::getMaxSize ( )
inlineoverride

Definition at line 117 of file GlobalFileMgr.h.

117 { return 0; }
MgrType File_Namespace::GlobalFileMgr::getMgrType ( )
inlineoverride

Definition at line 112 of file GlobalFileMgr.h.

112 { return GLOBAL_FILE_MGR; };
size_t File_Namespace::GlobalFileMgr::getNumChunks ( )
override

Definition at line 92 of file GlobalFileMgr.cpp.

References fileMgrs_, and fileMgrs_mutex_.

92  {
93  {
94  mapd_shared_lock<mapd_shared_mutex> fileMgrsMutex(fileMgrs_mutex_);
95  size_t num_chunks = 0;
96  for (auto fileMgrsIt = fileMgrs_.begin(); fileMgrsIt != fileMgrs_.end();
97  ++fileMgrsIt) {
98  num_chunks += fileMgrsIt->second->getNumChunks();
99  }
100 
101  return num_chunks;
102  }
103 }
std::map< std::pair< int, int >, FileMgr * > fileMgrs_
mapd_shared_mutex fileMgrs_mutex_
size_t File_Namespace::GlobalFileMgr::getNumReaderThreads ( )
inline

Returns number of threads defined by parameter num-reader-threads which should be used during initial load and consequent read of data.

Definition at line 144 of file GlobalFileMgr.h.

144 { return num_reader_threads_; }
size_t num_reader_threads_
The OS file system path containing the files.
std::string File_Namespace::GlobalFileMgr::getStringMgrType ( )
inlineoverride

Definition at line 113 of file GlobalFileMgr.h.

113 { return ToString(GLOBAL_FILE_MGR); }
size_t File_Namespace::GlobalFileMgr::getTableEpoch ( const int  db_id,
const int  tb_id 
)

Definition at line 224 of file GlobalFileMgr.cpp.

References File_Namespace::FileMgr::epoch_, and getFileMgr().

224  {
225  FileMgr* fm = getFileMgr(db_id, tb_id);
226 
227  return fm->epoch_;
228 }
FileMgr * getFileMgr(const int db_id, const int tb_id)

+ Here is the call graph for this function:

void File_Namespace::GlobalFileMgr::init ( )

Definition at line 64 of file GlobalFileMgr.cpp.

References basePath_, logger::FATAL, and LOG.

Referenced by GlobalFileMgr().

64  {
65  // check if basePath_ already exists, and if not create one
66  boost::filesystem::path path(basePath_);
67  if (basePath_.size() > 0 && basePath_[basePath_.size() - 1] != '/') {
68  basePath_.push_back('/');
69  }
70  if (boost::filesystem::exists(path)) {
71  if (!boost::filesystem::is_directory(path)) {
72  LOG(FATAL) << "Specified path is not a directory.";
73  }
74  } else { // data directory does not exist
75  if (!boost::filesystem::create_directory(path)) {
76  LOG(FATAL) << "Could not create data directory";
77  }
78  }
79 }
#define LOG(tag)
Definition: Logger.h:185

+ Here is the caller graph for this function:

bool File_Namespace::GlobalFileMgr::isAllocationCapped ( )
inlineoverride

Definition at line 120 of file GlobalFileMgr.h.

120 { return false; }
bool File_Namespace::GlobalFileMgr::isBufferOnDevice ( const ChunkKey key)
inlineoverride

Definition at line 66 of file GlobalFileMgr.h.

66  {
67  return getFileMgr(key)->isBufferOnDevice(key);
68  }
FileMgr * getFileMgr(const int db_id, const int tb_id)
bool isBufferOnDevice(const ChunkKey &key) override
Definition: FileMgr.cpp:631
std::string File_Namespace::GlobalFileMgr::printSlabs ( )
inlineoverride

Definition at line 114 of file GlobalFileMgr.h.

114 { return "Not Implemented"; }
AbstractBuffer* File_Namespace::GlobalFileMgr::putBuffer ( const ChunkKey key,
AbstractBuffer d,
const size_t  numBytes = 0 
)
inlineoverride

Puts the contents of d into the Chunk with the given key.

Parameters
key- Unique identifier for a Chunk.
d- An object representing the source data for the Chunk.
Returns
AbstractBuffer*

Definition at line 98 of file GlobalFileMgr.h.

100  {
101  return getFileMgr(key)->putBuffer(key, d, numBytes);
102  }
FileMgr * getFileMgr(const int db_id, const int tb_id)
AbstractBuffer * putBuffer(const ChunkKey &key, AbstractBuffer *d, const size_t numBytes=0) override
Puts the contents of d into the Chunk with the given key.
Definition: FileMgr.cpp:734
void File_Namespace::GlobalFileMgr::removeTableRelatedDS ( const int  db_id,
const int  tb_id 
)

Definition at line 188 of file GlobalFileMgr.cpp.

References File_Namespace::FileMgr::closeRemovePhysical(), and findFileMgr().

188  {
189  FileMgr* fm = findFileMgr(db_id, tb_id, true);
190  if (fm == nullptr) {
191  // fileMgr has not been initialized so there is no need to
192  // spend the time initializing
193  // inmitialize just enough to have to rename
194  const auto file_mgr_key = std::make_pair(db_id, tb_id);
195  fm = new FileMgr(0, this, file_mgr_key, true);
196  }
197  fm->closeRemovePhysical();
198  /* remove table related in-memory DS only if directory was removed successfully */
199 
200  delete fm;
201 }
FileMgr * findFileMgr(const int db_id, const int tb_id, const bool removeFromMap=false)

+ Here is the call graph for this function:

void File_Namespace::GlobalFileMgr::setDBConvert ( bool  val)
inline

Definition at line 160 of file GlobalFileMgr.h.

void File_Namespace::GlobalFileMgr::setTableEpoch ( const int  db_id,
const int  tb_id,
const int  start_epoch 
)

Definition at line 203 of file GlobalFileMgr.cpp.

References defaultPageSize_, findFileMgr(), logger::INFO, LOG, num_reader_threads_, and File_Namespace::FileMgr::setEpoch().

205  {
206  const auto file_mgr_key = std::make_pair(db_id, tb_id);
207  // this is where the real rollback of any data ahead of the currently set epoch is
208  // performed
209  FileMgr* fm = new FileMgr(
210  0, this, file_mgr_key, num_reader_threads_, start_epoch, defaultPageSize_);
211  fm->setEpoch(start_epoch - 1);
212  // remove the dummy one we built
213  delete fm;
214 
215  // see if one exists currently, and remove it
216  fm = findFileMgr(db_id, tb_id, true);
217 
218  if (fm != nullptr) {
219  LOG(INFO) << "found and removed fm";
220  delete fm;
221  }
222 }
#define LOG(tag)
Definition: Logger.h:185
FileMgr * findFileMgr(const int db_id, const int tb_id, const bool removeFromMap=false)
size_t num_reader_threads_
The OS file system path containing the files.

+ Here is the call graph for this function:

void File_Namespace::GlobalFileMgr::writeFileMgrData ( FileMgr fileMgr = 0)

Definition at line 172 of file GlobalFileMgr.cpp.

References File_Namespace::FileMgr::chunkIndex_, and fileMgrs_.

173  { // this function is not used, keep it for now for future needs
174  for (auto fileMgrIt = fileMgrs_.begin(); fileMgrIt != fileMgrs_.end(); fileMgrIt++) {
175  FileMgr* fm = fileMgrIt->second;
176  if ((fileMgr != 0) && (fileMgr != fm)) {
177  continue;
178  }
179  for (auto chunkIt = fm->chunkIndex_.begin(); chunkIt != fm->chunkIndex_.end();
180  chunkIt++) {
181  chunkIt->second->write((int8_t*)chunkIt->second, chunkIt->second->size(), 0);
182  // chunkIt->second->write((int8_t*)chunkIt->second, chunkIt->second->size(), 0,
183  // CPU_LEVEL, -1);
184  }
185  }
186 }
std::map< std::pair< int, int >, FileMgr * > fileMgrs_

Member Data Documentation

std::string File_Namespace::GlobalFileMgr::basePath_
private

Definition at line 167 of file GlobalFileMgr.h.

Referenced by init().

bool File_Namespace::GlobalFileMgr::dbConvert_
private

DB version for DataMgr DS and corresponding file buffer read/write code

Definition at line 181 of file GlobalFileMgr.h.

Referenced by GlobalFileMgr().

size_t File_Namespace::GlobalFileMgr::defaultPageSize_
private

Definition at line 173 of file GlobalFileMgr.h.

Referenced by getFileMgr(), and setTableEpoch().

int File_Namespace::GlobalFileMgr::epoch_
private

number of threads used when loading data

Definition at line 169 of file GlobalFileMgr.h.

Referenced by getFileMgr().

std::map<std::pair<int, int>, FileMgr*> File_Namespace::GlobalFileMgr::fileMgrs_
private

true if conversion should be done between different "mapd_db_version_"

Definition at line 183 of file GlobalFileMgr.h.

Referenced by checkpoint(), findFileMgr(), getChunkMetadataVec(), getFileMgr(), getNumChunks(), writeFileMgrData(), and ~GlobalFileMgr().

mapd_shared_mutex File_Namespace::GlobalFileMgr::fileMgrs_mutex_
private
int File_Namespace::GlobalFileMgr::mapd_db_version_
private

default page size, used to set FileMgr defaultPageSize_

Definition at line 175 of file GlobalFileMgr.h.

Referenced by GlobalFileMgr().

size_t File_Namespace::GlobalFileMgr::num_reader_threads_
private

The OS file system path containing the files.

Definition at line 168 of file GlobalFileMgr.h.

Referenced by getFileMgr(), and setTableEpoch().


The documentation for this class was generated from the following files: