OmniSciDB  c0231cc57d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TableArchiver Class Reference

#include <TableArchiver.h>

+ Collaboration diagram for TableArchiver:

Public Member Functions

 TableArchiver (Catalog_Namespace::Catalog *cat)
 
void dumpTable (const TableDescriptor *td, const std::string &archive_path, const std::string &compression)
 
void restoreTable (const Catalog_Namespace::SessionInfo &session, const TableDescriptor *td, const std::string &archive_path, const std::string &compression)
 
void restoreTable (const Catalog_Namespace::SessionInfo &session, const std::string &table_name, const std::string &archive_path, const std::string &compression)
 

Private Attributes

Catalog_Namespace::Catalogcat_
 

Detailed Description

Definition at line 24 of file TableArchiver.h.

Constructor & Destructor Documentation

TableArchiver::TableArchiver ( Catalog_Namespace::Catalog cat)
inline

Definition at line 26 of file TableArchiver.h.

26 : cat_(cat){};
Catalog_Namespace::Catalog * cat_
Definition: TableArchiver.h:43

Member Function Documentation

void TableArchiver::dumpTable ( const TableDescriptor td,
const std::string &  archive_path,
const std::string &  compression 
)

Definition at line 328 of file TableArchiver.cpp.

References anonymous_namespace{TableArchiver.cpp}::abs_path(), cat_, Catalog_Namespace::DBMetadata::dbId, Data_Namespace::DISK_LEVEL, Catalog_Namespace::Catalog::dumpSchema(), ddl_utils::EXPORT, heavyai::fopen(), g_cluster, get_quoted_string(), Catalog_Namespace::Catalog::getAllColumnMetadataForTable(), Catalog_Namespace::Catalog::getColumnDictDirectory(), Catalog_Namespace::Catalog::getCurrentDB(), Catalog_Namespace::Catalog::getDataMgr(), Data_Namespace::DataMgr::getGlobalFileMgr(), Catalog_Namespace::Catalog::getTableDataDirectories(), Catalog_Namespace::Catalog::getTableDictDirectories(), Catalog_Namespace::Catalog::getTableEpoch(), TableDescriptor::is_system_table, TableDescriptor::isView, join(), TableDescriptor::persistenceLevel, run, anonymous_namespace{TableArchiver.cpp}::simple_file_closer, table_epoch_filename, table_oldinfo_filename, table_schema_filename, TableDescriptor::tableId, TableDescriptor::tableName, to_string(), shared::transform(), and ddl_utils::validate_allowed_file_path().

Referenced by Parser::DumpTableStmt::execute().

330  {
331  if (td->is_system_table) {
332  throw std::runtime_error("Dumping a system table is not supported.");
333  }
336  if (g_cluster) {
337  throw std::runtime_error("DUMP/RESTORE is not supported yet on distributed setup.");
338  }
339  if (boost::filesystem::exists(archive_path)) {
340  throw std::runtime_error("Archive " + archive_path + " already exists.");
341  }
343  throw std::runtime_error("Dumping view or temporary table is not supported.");
344  }
345  // collect paths of files to archive
346  const auto global_file_mgr = cat_->getDataMgr().getGlobalFileMgr();
347  std::vector<std::string> file_paths;
348  auto file_writer = [&file_paths, global_file_mgr](const std::string& file_name,
349  const std::string& file_type,
350  const std::string& file_data) {
351  const auto file_path = abs_path(global_file_mgr) + "/" + file_name;
352  std::unique_ptr<FILE, decltype(simple_file_closer)> fp(
353  std::fopen(file_path.c_str(), "w"), simple_file_closer);
354  if (!fp) {
355  throw std::runtime_error("Failed to create " + file_type + " file '" + file_path +
356  "': " + std::strerror(errno));
357  }
358  if (std::fwrite(file_data.data(), 1, file_data.size(), fp.get()) < file_data.size()) {
359  throw std::runtime_error("Failed to write " + file_type + " file '" + file_path +
360  "': " + std::strerror(errno));
361  }
362  file_paths.push_back(file_name);
363  };
364 
365  const auto table_name = td->tableName;
366  {
367  // - gen schema file
368  const auto schema_str = cat_->dumpSchema(td);
369  file_writer(table_schema_filename, "table schema", schema_str);
370  // - gen column-old-info file
371  const auto cds = cat_->getAllColumnMetadataForTable(td->tableId, true, true, true);
372  std::vector<std::string> column_oldinfo;
373  std::transform(cds.begin(),
374  cds.end(),
375  std::back_inserter(column_oldinfo),
376  [&](const auto cd) -> std::string {
377  return cd->columnName + ":" + std::to_string(cd->columnId) + ":" +
379  });
380  const auto column_oldinfo_str = boost::algorithm::join(column_oldinfo, " ");
381  file_writer(table_oldinfo_filename, "table old info", column_oldinfo_str);
382  // - gen table epoch
383  const auto epoch = cat_->getTableEpoch(cat_->getCurrentDB().dbId, td->tableId);
384  file_writer(table_epoch_filename, "table epoch", std::to_string(epoch));
385  // - collect table data file paths ...
386  const auto data_file_dirs = cat_->getTableDataDirectories(td);
387  file_paths.insert(file_paths.end(), data_file_dirs.begin(), data_file_dirs.end());
388  // - collect table dict file paths ...
389  const auto dict_file_dirs = cat_->getTableDictDirectories(td);
390  file_paths.insert(file_paths.end(), dict_file_dirs.begin(), dict_file_dirs.end());
391  // tar takes time. release cat lock to yield the cat to concurrent CREATE statements.
392  }
393  // run tar to archive the files ... this may take a while !!
394  run("tar " + compression + " -cvf " + get_quoted_string(archive_path) + " " +
395  boost::algorithm::join(file_paths, " "),
396  abs_path(global_file_mgr));
397 }
std::string getColumnDictDirectory(const ColumnDescriptor *cd, bool file_name_only=true) const
Definition: Catalog.cpp:4981
static constexpr char const * table_schema_filename
std::string tableName
std::string abs_path(const File_Namespace::GlobalFileMgr *global_file_mgr)
Data_Namespace::DataMgr & getDataMgr() const
Definition: Catalog.h:243
std::string join(T const &container, std::string const &delim)
static constexpr char const * table_oldinfo_filename
int32_t getTableEpoch(const int32_t db_id, const int32_t table_id) const
Definition: Catalog.cpp:3342
std::vector< std::string > getTableDataDirectories(const TableDescriptor *td) const
Definition: Catalog.cpp:4967
std::string to_string(char const *&&v)
std::string get_quoted_string(const std::string &filename, char quote, char escape)
Quote a string while escaping any existing quotes in the string.
const DBMetadata & getCurrentDB() const
Definition: Catalog.h:242
::FILE * fopen(const char *filename, const char *mode)
Definition: heavyai_fs.cpp:74
OUTPUT transform(INPUT const &input, FUNC const &func)
Definition: misc.h:296
File_Namespace::GlobalFileMgr * getGlobalFileMgr() const
Definition: DataMgr.cpp:606
void validate_allowed_file_path(const std::string &file_path, const DataTransferType data_transfer_type, const bool allow_wildcards)
Definition: DdlUtils.cpp:785
std::vector< std::string > getTableDictDirectories(const TableDescriptor *td) const
Definition: Catalog.cpp:5002
std::list< const ColumnDescriptor * > getAllColumnMetadataForTable(const int tableId, const bool fetchSystemColumns, const bool fetchVirtualColumns, const bool fetchPhysicalColumns) const
Returns a list of pointers to constant ColumnDescriptor structs for all the columns from a particular...
Definition: Catalog.cpp:2228
Data_Namespace::MemoryLevel persistenceLevel
static constexpr char const * table_epoch_filename
bool g_cluster
static bool run
std::string dumpSchema(const TableDescriptor *td) const
Definition: Catalog.cpp:5033
Catalog_Namespace::Catalog * cat_
Definition: TableArchiver.h:43

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TableArchiver::restoreTable ( const Catalog_Namespace::SessionInfo session,
const TableDescriptor td,
const std::string &  archive_path,
const std::string &  compression 
)

Definition at line 400 of file TableArchiver.cpp.

References anonymous_namespace{Utm.h}::a, anonymous_namespace{TableArchiver.cpp}::abs_path(), anonymous_namespace{TableArchiver.cpp}::adjust_altered_table_files(), cat_, CHECK, Parser::create_stmt_for_query(), Catalog_Namespace::DBMetadata::dbId, Data_Namespace::DISK_LEVEL, measure< TimeT >::execution(), g_cluster, g_test_rollback_dump_restore, get_quoted_string(), anonymous_namespace{TableArchiver.cpp}::get_table_schema(), Catalog_Namespace::Catalog::getAllColumnMetadataForTable(), Catalog_Namespace::Catalog::getColumnDictDirectory(), Catalog_Namespace::Catalog::getCurrentDB(), Catalog_Namespace::Catalog::getDataMgr(), Data_Namespace::DataMgr::getGlobalFileMgr(), lockmgr::TableLockMgrImpl< TableSchemaLockMgr >::getReadLockForTable(), Catalog_Namespace::Catalog::getTableDataDirectories(), Catalog_Namespace::Catalog::getTableDictDirectories(), lockmgr::TableLockMgrImpl< T >::getWriteLockForTable(), TableDescriptor::hasDeletedCol, ddl_utils::IMPORT, TableDescriptor::isView, join(), TableDescriptor::nShards, TableDescriptor::persistenceLevel, anonymous_namespace{TableArchiver.cpp}::rename_table_directories(), run, Catalog_Namespace::Catalog::setTableEpoch(), anonymous_namespace{TableArchiver.cpp}::simple_file_cat(), split(), table_epoch_filename, table_oldinfo_filename, table_schema_filename, TableDescriptor::tableId, TableDescriptor::tableName, to_string(), shared::transform(), ddl_utils::validate_allowed_file_path(), and VLOG.

Referenced by Parser::RestoreTableStmt::execute(), and restoreTable().

403  {
406  if (g_cluster) {
407  throw std::runtime_error("DUMP/RESTORE is not supported yet on distributed setup.");
408  }
409  if (!boost::filesystem::exists(archive_path)) {
410  throw std::runtime_error("Archive " + archive_path + " does not exist.");
411  }
413  throw std::runtime_error("Restoring view or temporary table is not supported.");
414  }
415  // Obtain table schema read lock to prevent modification of the schema during
416  // restoration
417  const auto table_read_lock =
419  // prevent concurrent inserts into table during restoration
420  const auto insert_data_lock =
422 
423  // untar takes time. no grab of cat lock to yield to concurrent CREATE stmts.
424  const auto global_file_mgr = cat_->getDataMgr().getGlobalFileMgr();
425  // dirs where src files are untarred and dst files are backed up
426  constexpr static const auto temp_data_basename = "_data";
427  constexpr static const auto temp_back_basename = "_back";
428  const auto temp_data_dir = abs_path(global_file_mgr) + "/" + temp_data_basename;
429  const auto temp_back_dir = abs_path(global_file_mgr) + "/" + temp_back_basename;
430  // clean up tmp dirs and files in any case
431  auto tmp_files_cleaner = [&](void*) {
432  run("rm -rf " + temp_data_dir + " " + temp_back_dir);
433  run("rm -f " + abs_path(global_file_mgr) + "/" + table_schema_filename);
434  run("rm -f " + abs_path(global_file_mgr) + "/" + table_oldinfo_filename);
435  run("rm -f " + abs_path(global_file_mgr) + "/" + table_epoch_filename);
436  };
437  std::unique_ptr<decltype(tmp_files_cleaner), decltype(tmp_files_cleaner)> tfc(
438  &tmp_files_cleaner, tmp_files_cleaner);
439 
440  // extract & parse schema
441  const auto schema_str = get_table_schema(archive_path, td->tableName, compression);
442  std::unique_ptr<Parser::Stmt> stmt = Parser::create_stmt_for_query(schema_str, session);
443  const auto create_table_stmt = dynamic_cast<Parser::CreateTableStmt*>(stmt.get());
444  CHECK(create_table_stmt);
445 
446  // verify compatibility between source and destination schemas
447  TableDescriptor src_td;
448  std::list<ColumnDescriptor> src_columns;
449  std::vector<Parser::SharedDictionaryDef> shared_dict_defs;
450  create_table_stmt->executeDryRun(session, src_td, src_columns, shared_dict_defs);
451  // - sanity check table-level compatibility
452  if (src_td.hasDeletedCol != td->hasDeletedCol) {
453  // TODO: allow the case, in which src data enables vacuum while
454  // dst doesn't, by simply discarding src $deleted column data.
455  throw std::runtime_error("Incompatible table VACCUM option");
456  }
457  if (src_td.nShards != td->nShards) {
458  // TODO: allow different shard numbers if they have a "GCD",
459  // by splitting/merging src data files before drop into dst.
460  throw std::runtime_error("Unmatched number of table shards");
461  }
462  // - sanity check column-level compatibility (based on column names)
463  const auto dst_columns =
464  cat_->getAllColumnMetadataForTable(td->tableId, false, false, false);
465  if (dst_columns.size() != src_columns.size()) {
466  throw std::runtime_error("Unmatched number of table columns");
467  }
468  for (const auto& [src_cd, dst_cd] : boost::combine(src_columns, dst_columns)) {
469  if (src_cd.columnType.get_type_name() != dst_cd->columnType.get_type_name() ||
470  src_cd.columnType.get_compression_name() !=
471  dst_cd->columnType.get_compression_name()) {
472  throw std::runtime_error("Incompatible types on column " + src_cd.columnName);
473  }
474  }
475  // extract src table column ids (ALL columns incl. system/virtual/phy geo cols)
476  const auto all_src_oldinfo_str =
477  simple_file_cat(archive_path, table_oldinfo_filename, compression);
478  std::vector<std::string> src_oldinfo_strs;
479  boost::algorithm::split(src_oldinfo_strs,
480  all_src_oldinfo_str,
481  boost::is_any_of(" "),
482  boost::token_compress_on);
483  auto all_dst_columns =
484  cat_->getAllColumnMetadataForTable(td->tableId, true, true, true);
485  if (src_oldinfo_strs.size() != all_dst_columns.size()) {
486  throw std::runtime_error("Source table has a unmatched number of columns: " +
487  std::to_string(src_oldinfo_strs.size()) + " vs " +
488  std::to_string(all_dst_columns.size()));
489  }
490  // build a map of src column ids and dst column ids, just in case src table has been
491  // ALTERed before and chunk keys of src table needs to be adjusted accordingly.
492  // note: this map is used only for the case of migrating a table and not for restoring
493  // a table. When restoring a table, the two tables must have the same column ids.
494  //
495  // also build a map of src dict paths and dst dict paths for relocating src dicts
496  std::unordered_map<int, int> column_ids_map;
497  std::unordered_map<std::string, std::string> dict_paths_map;
498  // sort inputs of transform in lexical order of column names for correct mappings
499  std::list<std::vector<std::string>> src_oldinfo_tokens;
501  src_oldinfo_strs.begin(),
502  src_oldinfo_strs.end(),
503  std::back_inserter(src_oldinfo_tokens),
504  [](const auto& src_oldinfo_str) -> auto {
505  std::vector<std::string> tokens;
507  tokens, src_oldinfo_str, boost::is_any_of(":"), boost::token_compress_on);
508  return tokens;
509  });
510  src_oldinfo_tokens.sort(
511  [](const auto& lhs, const auto& rhs) { return lhs[0].compare(rhs[0]) < 0; });
512  all_dst_columns.sort(
513  [](auto a, auto b) { return a->columnName.compare(b->columnName) < 0; });
514  // transform inputs into the maps
515  std::transform(src_oldinfo_tokens.begin(),
516  src_oldinfo_tokens.end(),
517  all_dst_columns.begin(),
518  std::inserter(column_ids_map, column_ids_map.end()),
519  [&](const auto& tokens, const auto& cd) -> std::pair<int, int> {
520  VLOG(3) << boost::algorithm::join(tokens, ":") << " ==> "
521  << cd->columnName << ":" << cd->columnId;
522  dict_paths_map[tokens[2]] = cat_->getColumnDictDirectory(cd);
523  return {boost::lexical_cast<int>(tokens[1]), cd->columnId};
524  });
525  bool was_table_altered = false;
526  std::for_each(column_ids_map.begin(), column_ids_map.end(), [&](auto& it) {
527  was_table_altered = was_table_altered || it.first != it.second;
528  });
529  VLOG(3) << "was_table_altered = " << was_table_altered;
530  // extract all data files to a temp dir. will swap with dst table dir after all set,
531  // otherwise will corrupt table in case any bad thing happens in the middle.
532  run("rm -rf " + temp_data_dir);
533  run("mkdir -p " + temp_data_dir);
534  run("tar " + compression + " -xvf " + get_quoted_string(archive_path), temp_data_dir);
535 
536  // if table was ever altered after it was created, update column ids in chunk headers.
537  if (was_table_altered) {
538  const auto epoch = boost::lexical_cast<int32_t>(
539  simple_file_cat(archive_path, table_epoch_filename, compression));
540  const auto time_ms = measure<>::execution(
541  [&]() { adjust_altered_table_files(epoch, temp_data_dir, column_ids_map); });
542  VLOG(3) << "adjust_altered_table_files: " << time_ms << " ms";
543  }
544  // finally,,, swap table data/dict dirs!
545  const auto data_file_dirs = cat_->getTableDataDirectories(td);
546  const auto dict_file_dirs = cat_->getTableDictDirectories(td);
547  // move current target dirs, if exists, to backup dir
548  std::vector<std::string> both_file_dirs;
549  std::merge(data_file_dirs.begin(),
550  data_file_dirs.end(),
551  dict_file_dirs.begin(),
552  dict_file_dirs.end(),
553  std::back_inserter(both_file_dirs));
554  bool backup_completed = false;
555  try {
556  run("rm -rf " + temp_back_dir);
557  run("mkdir -p " + temp_back_dir);
558  for (const auto& dir : both_file_dirs) {
559  const auto dir_full_path = abs_path(global_file_mgr) + "/" + dir;
560  if (boost::filesystem::is_directory(dir_full_path)) {
561  run("mv " + dir_full_path + " " + temp_back_dir);
562  }
563  }
564  backup_completed = true;
565  // Move table directories from temp dir to main data directory.
566  rename_table_directories(global_file_mgr, temp_data_dir, data_file_dirs, "table_");
567  // Move dictionaries from temp dir to main dir.
568  for (const auto& dit : dict_paths_map) {
569  if (!dit.first.empty() && !dit.second.empty()) {
570  const auto src_dict_path = temp_data_dir + "/" + dit.first;
571  const auto dst_dict_path = abs_path(global_file_mgr) + "/" + dit.second;
572  run("mv " + src_dict_path + " " + dst_dict_path);
573  }
574  }
575  // throw if sanity test forces a rollback
577  throw std::runtime_error("lol!");
578  }
579  } catch (...) {
580  // once backup is completed, whatever in abs_path(global_file_mgr) is the "src"
581  // dirs that are to be rolled back and discarded
582  if (backup_completed) {
583  run("rm -rf " + boost::algorithm::join(both_file_dirs, " "),
584  abs_path(global_file_mgr));
585  }
586  // complete rollback by recovering original "dst" table dirs from backup dir
587  boost::filesystem::path base_path(temp_back_dir);
588  boost::filesystem::directory_iterator end_it;
589  for (boost::filesystem::directory_iterator fit(base_path); fit != end_it; ++fit) {
590  run("mv " + fit->path().string() + " .", abs_path(global_file_mgr));
591  }
592  throw;
593  }
594  // set for reloading table from the restored/migrated files
595  const auto epoch = simple_file_cat(archive_path, table_epoch_filename, compression);
597  cat_->getCurrentDB().dbId, td->tableId, boost::lexical_cast<int>(epoch));
598 }
std::string get_table_schema(const std::string &archive_path, const std::string &table, const std::string &compression)
static WriteLock getWriteLockForTable(Catalog_Namespace::Catalog &cat, const std::string &table_name)
Definition: LockMgrImpl.h:225
std::string getColumnDictDirectory(const ColumnDescriptor *cd, bool file_name_only=true) const
Definition: Catalog.cpp:4981
static constexpr char const * table_schema_filename
std::string tableName
static TimeT::rep execution(F func, Args &&...args)
Definition: sample.cpp:29
std::string abs_path(const File_Namespace::GlobalFileMgr *global_file_mgr)
Data_Namespace::DataMgr & getDataMgr() const
Definition: Catalog.h:243
std::string join(T const &container, std::string const &delim)
static constexpr char const * table_oldinfo_filename
std::vector< std::string > getTableDataDirectories(const TableDescriptor *td) const
Definition: Catalog.cpp:4967
std::string to_string(char const *&&v)
std::vector< std::string > split(std::string_view str, std::string_view delim, std::optional< size_t > maxsplit)
split apart a string into a vector of substrings
constexpr double a
Definition: Utm.h:32
std::string get_quoted_string(const std::string &filename, char quote, char escape)
Quote a string while escaping any existing quotes in the string.
const DBMetadata & getCurrentDB() const
Definition: Catalog.h:242
void rename_table_directories(const File_Namespace::GlobalFileMgr *global_file_mgr, const std::string &temp_data_dir, const std::vector< std::string > &target_paths, const std::string &name_prefix)
OUTPUT transform(INPUT const &input, FUNC const &func)
Definition: misc.h:296
File_Namespace::GlobalFileMgr * getGlobalFileMgr() const
Definition: DataMgr.cpp:606
void validate_allowed_file_path(const std::string &file_path, const DataTransferType data_transfer_type, const bool allow_wildcards)
Definition: DdlUtils.cpp:785
void setTableEpoch(const int db_id, const int table_id, const int new_epoch)
Definition: Catalog.cpp:3410
std::vector< std::string > getTableDictDirectories(const TableDescriptor *td) const
Definition: Catalog.cpp:5002
static ReadLock getReadLockForTable(Catalog_Namespace::Catalog &cat, const std::string &table_name)
Definition: LockMgrImpl.h:238
std::list< const ColumnDescriptor * > getAllColumnMetadataForTable(const int tableId, const bool fetchSystemColumns, const bool fetchVirtualColumns, const bool fetchPhysicalColumns) const
Returns a list of pointers to constant ColumnDescriptor structs for all the columns from a particular...
Definition: Catalog.cpp:2228
Data_Namespace::MemoryLevel persistenceLevel
void adjust_altered_table_files(const int32_t table_epoch, const std::string &temp_data_dir, const std::unordered_map< int, int > &column_ids_map)
static constexpr char const * table_epoch_filename
#define CHECK(condition)
Definition: Logger.h:222
bool g_cluster
static bool run
std::string simple_file_cat(const std::string &archive_path, const std::string &file_name, const std::string &compression)
std::unique_ptr< Parser::Stmt > create_stmt_for_query(const std::string &queryStr, const Catalog_Namespace::SessionInfo &session_info)
#define VLOG(n)
Definition: Logger.h:316
bool g_test_rollback_dump_restore
Catalog_Namespace::Catalog * cat_
Definition: TableArchiver.h:43

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TableArchiver::restoreTable ( const Catalog_Namespace::SessionInfo session,
const std::string &  table_name,
const std::string &  archive_path,
const std::string &  compression 
)

Definition at line 602 of file TableArchiver.cpp.

References cat_, CHECK, Parser::create_stmt_for_query(), anonymous_namespace{TableArchiver.cpp}::get_table_schema(), Catalog_Namespace::Catalog::getMetadataForTable(), and restoreTable().

605  {
606  // replace table name and drop foreign dict references
607  const auto schema_str = get_table_schema(archive_path, table_name, compression);
608  std::unique_ptr<Parser::Stmt> stmt = Parser::create_stmt_for_query(schema_str, session);
609  const auto create_table_stmt = dynamic_cast<Parser::CreateTableStmt*>(stmt.get());
610  CHECK(create_table_stmt);
611  create_table_stmt->execute(session, false /*read-only*/);
612 
613  try {
614  restoreTable(
615  session, cat_->getMetadataForTable(table_name), archive_path, compression);
616  } catch (...) {
617  const auto schema_str = "DROP TABLE IF EXISTS " + table_name + ";";
618  std::unique_ptr<Parser::Stmt> stmt =
619  Parser::create_stmt_for_query(schema_str, session);
620  const auto drop_table_stmt = dynamic_cast<Parser::DropTableStmt*>(stmt.get());
621  CHECK(drop_table_stmt);
622  drop_table_stmt->execute(session, false /*read-only*/);
623 
624  throw;
625  }
626 }
std::string get_table_schema(const std::string &archive_path, const std::string &table, const std::string &compression)
void restoreTable(const Catalog_Namespace::SessionInfo &session, const TableDescriptor *td, const std::string &archive_path, const std::string &compression)
#define CHECK(condition)
Definition: Logger.h:222
const TableDescriptor * getMetadataForTable(const std::string &tableName, const bool populateFragmenter=true) const
Returns a pointer to a const TableDescriptor struct matching the provided tableName.
std::unique_ptr< Parser::Stmt > create_stmt_for_query(const std::string &queryStr, const Catalog_Namespace::SessionInfo &session_info)
Catalog_Namespace::Catalog * cat_
Definition: TableArchiver.h:43

+ Here is the call graph for this function:

Member Data Documentation

Catalog_Namespace::Catalog* TableArchiver::cat_
private

Definition at line 43 of file TableArchiver.h.

Referenced by dumpTable(), and restoreTable().


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