OmniSciDB
a5dc49c757
|
#include <TableArchiver.h>
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 std::string &table_name, const std::string &archive_path, const std::string &compression, const TableArchiverS3Options &s3_options) |
Private Member Functions | |
void | restoreTable (const Catalog_Namespace::SessionInfo &session, const TableDescriptor *td, const std::string &archive_path, const std::string &compression) |
Private Attributes | |
Catalog_Namespace::Catalog * | cat_ |
Definition at line 32 of file TableArchiver.h.
|
inline |
Definition at line 34 of file TableArchiver.h.
void TableArchiver::dumpTable | ( | const TableDescriptor * | td, |
const std::string & | archive_path, | ||
const std::string & | compression | ||
) |
Definition at line 439 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, nvtx_helpers::anonymous_namespace{nvtx_helpers.cpp}::filename(), 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::isForeignTable(), TableDescriptor::isView, join(), kDumpVersion, TableDescriptor::persistenceLevel, run, anonymous_namespace{TableArchiver.cpp}::simple_file_closer, table_dumpversion_filename, 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().
void TableArchiver::restoreTable | ( | const Catalog_Namespace::SessionInfo & | session, |
const std::string & | table_name, | ||
const std::string & | archive_path, | ||
const std::string & | compression, | ||
const TableArchiverS3Options & | s3_options | ||
) |
Definition at line 821 of file TableArchiver.cpp.
References cat_, CHECK, Parser::create_stmt_for_query(), anonymous_namespace{TableArchiver.cpp}::get_table_schema(), Catalog_Namespace::Catalog::getMetadataForTable(), and shared::is_s3_uri().
Referenced by Parser::RestoreTableStmt::execute().
|
private |
Definition at line 535 of file TableArchiver.cpp.
References anonymous_namespace{Utm.h}::a, anonymous_namespace{TableArchiver.cpp}::abs_path(), cat_, CHECK, Parser::create_stmt_for_query(), Catalog_Namespace::DBMetadata::dbId, Data_Namespace::DISK_LEVEL, anonymous_namespace{TableArchiver.cpp}::drop_render_group_columns(), measure< TimeT >::execution(), anonymous_namespace{TableArchiver.cpp}::find_render_group_columns(), 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, logger::INFO, TableDescriptor::isView, join(), kDumpVersion_remove_render_group_columns, LOG, 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_dumpversion_filename, table_epoch_filename, table_oldinfo_filename, TableDescriptor::tableId, TableDescriptor::tableName, to_string(), shared::transform(), anonymous_namespace{TableArchiver.cpp}::update_or_drop_column_ids_in_table_files(), ddl_utils::validate_allowed_file_path(), and VLOG.
|
private |
Definition at line 52 of file TableArchiver.h.
Referenced by dumpTable(), and restoreTable().