OmniSciDB
a5dc49c757
|
#include <FileReader.h>
Public Member Functions | |
LocalMultiFileReader (const std::string &file_path, const import_export::CopyParams ©_params, const shared::FilePathOptions &options, const std::optional< size_t > &max_file_count) | |
LocalMultiFileReader (const std::string &file_path, const import_export::CopyParams ©_params, const rapidjson::Value &value) | |
void | checkForMoreRows (size_t file_offset, const shared::FilePathOptions &options, const ForeignServer *server_options, const UserMapping *user_mapping) override |
Public Member Functions inherited from foreign_storage::MultiFileReader | |
MultiFileReader (const std::string &file_path, const import_export::CopyParams ©_params) | |
MultiFileReader (const std::string &file_path, const import_export::CopyParams ©_params, const rapidjson::Value &value) | |
size_t | getRemainingSize () override |
bool | isRemainingSizeKnown () override |
size_t | read (void *buffer, size_t max_size) override |
size_t | readRegion (void *buffer, size_t offset, size_t size) override |
bool | isScanFinished () const override |
void | serialize (rapidjson::Value &value, rapidjson::Document::AllocatorType &allocator) const override |
FirstLineByFilePath | getFirstLineForEachFile () const override |
bool | isEndOfLastFile () override |
std::string | getCurrentFilePath () const override |
virtual std::set< std::string > | checkForRolledOffFiles (const shared::FilePathOptions &file_path_options) |
Public Member Functions inherited from foreign_storage::FileReader | |
FileReader (const std::string &file_path, const import_export::CopyParams ©_params) | |
virtual | ~FileReader ()=default |
Private Member Functions | |
std::vector< std::string > | getAllFilePaths (const shared::FilePathOptions &file_path_options) const override |
void | insertFile (std::string location) |
Additional Inherited Members | |
Protected Attributes inherited from foreign_storage::MultiFileReader | |
std::vector< std::unique_ptr < FileReader > > | files_ |
std::vector< std::string > | file_locations_ |
std::vector< size_t > | cumulative_sizes_ |
size_t | current_index_ |
size_t | current_offset_ |
size_t | starting_offset_ |
bool | is_end_of_last_file_ |
Protected Attributes inherited from foreign_storage::FileReader | |
import_export::CopyParams | copy_params_ |
std::string | file_path_ |
Definition at line 396 of file FileReader.h.
foreign_storage::LocalMultiFileReader::LocalMultiFileReader | ( | const std::string & | file_path, |
const import_export::CopyParams & | copy_params, | ||
const shared::FilePathOptions & | options, | ||
const std::optional< size_t > & | max_file_count | ||
) |
Definition at line 631 of file FileReader.cpp.
References insertFile(), and shared::local_glob_filter_sort_files().
foreign_storage::LocalMultiFileReader::LocalMultiFileReader | ( | const std::string & | file_path, |
const import_export::CopyParams & | copy_params, | ||
const rapidjson::Value & | value | ||
) |
Definition at line 646 of file FileReader.cpp.
References foreign_storage::FileReader::copy_params_, foreign_storage::MultiFileReader::file_locations_, foreign_storage::MultiFileReader::files_, and shared::is_compressed_file_extension().
|
overridevirtual |
Rescan the target files Throws an exception if the rescan fails (ie files are not in a valid appended state or not supported)
file_offset | - where to resume the scan from (end of the last row) as not all of the bytes may have been consumed by the upstream compoennet |
server_options | - only needed for S3 backed files |
user_mapping | - only needed for S3 backed files |
Reimplemented from foreign_storage::FileReader.
Definition at line 680 of file FileReader.cpp.
References CHECK, CHECK_GT, shared::contains(), foreign_storage::MultiFileReader::cumulative_sizes_, foreign_storage::MultiFileReader::current_index_, foreign_storage::MultiFileReader::current_offset_, foreign_storage::MultiFileReader::file_locations_, foreign_storage::FileReader::file_path_, foreign_storage::MultiFileReader::files_, getAllFilePaths(), insertFile(), foreign_storage::MultiFileReader::is_end_of_last_file_, foreign_storage::MultiFileReader::isScanFinished(), foreign_storage::MultiFileReader::starting_offset_, and foreign_storage::throw_removed_file_error().
|
overrideprivatevirtual |
Implements foreign_storage::MultiFileReader.
Definition at line 729 of file FileReader.cpp.
References foreign_storage::FileReader::file_path_, and shared::local_glob_filter_sort_files().
Referenced by checkForMoreRows().
|
private |
Definition at line 666 of file FileReader.cpp.
References foreign_storage::FileReader::copy_params_, foreign_storage::MultiFileReader::file_locations_, foreign_storage::MultiFileReader::files_, and shared::is_compressed_file_extension().
Referenced by checkForMoreRows(), and LocalMultiFileReader().