15 #ifndef THRILL_VFS_FILE_IO_HEADER 16 #define THRILL_VFS_FILE_IO_HEADER 42 size_t worker,
size_t file_part);
91 {
return operator [] (i).size_inc_psum(); }
95 {
return i < size() ? operator [] (i).size_ex_psum : total_size; }
126 virtual ssize_t read(
void* data,
size_t size) = 0;
129 virtual void close() = 0;
140 virtual ssize_t write(
const void* data,
size_t size) = 0;
142 virtual void close() = 0;
171 #endif // !THRILL_VFS_FILE_IO_HEADER bool IsCompressed() const
if the file is compressed
Writer object to output data to any supported URI.
Reader object from any source.
FileList Glob(const std::vector< std::string > &globlist, const GlobType >ype)
Reads a glob path list and deliver a file list, sizes, and prefixsums (in bytes) for all matching fil...
uint64_t total_size
total size of files
void Initialize()
Initialize VFS layer.
GlobType
Type of objects to include in glob result.
std::string FillFilePattern(const std::string &pathbase, size_t worker, size_t file_part)
ReadStreamPtr OpenReadStream(const std::string &path, const common::Range &range)
Construct reader for given path uri.
represents a 1 dimensional range (interval) [begin,end)
bool contains_remote_uri
whether the list contains a remote-uri file.
General information of vfs file.
bool IsRemoteUri() const
if the file is at remote uri
uint64_t size
size of file.
uint64_t size_inc_psum(size_t i) const
inclusive prefix sum of file sizes (only for symmetry with ex_psum)
void Deinitialize()
Deinitialize VFS layer.
std::string path
path to file
uint64_t size_ex_psum(size_t i) const
exclusive prefix sum of file sizes with total_size as sentinel
std::basic_string< char, std::char_traits< char >, Allocator< char > > string
string with Manager tracking
std::vector< T, Allocator< T > > vector
vector with Manager tracking
bool IsCompressed(const std::string &path)
High-performance smart pointer used as a wrapping reference counting pointer.
List of file info and additional overall info.
bool IsRemoteUri(const std::string &path)
Returns true, if file at filepath is a remote uri like s3:// or hdfs://.
std::ostream & operator<<(std::ostream &os, const Type &t)
bool operator<(const uint_pair &b) const
less-than comparison operator
bool contains_compressed
whether the list contains a compressed file.
uint64_t size_inc_psum() const
inclusive prefix sum of file sizes.
WriteStreamPtr OpenWriteStream(const std::string &path)
uint64_t size_ex_psum
exclusive prefix sum of file sizes.
Provides reference counting abilities for use with CountingPtr.