|
iceberg-cpp
|
A concrete implementation of FileIO for Arrow file system. More...
#include <arrow_io_internal.h>
Public Member Functions | |
| ArrowFileSystemFileIO (std::shared_ptr<::arrow::fs::FileSystem > arrow_fs) | |
| Result< std::unique_ptr< InputFile > > | NewInputFile (std::string file_location) override |
| Create an input file handle for the given location. | |
| Result< std::unique_ptr< InputFile > > | NewInputFile (std::string file_location, size_t length) override |
| Create an input file handle for the given location with a known length. | |
| Result< std::unique_ptr< OutputFile > > | NewOutputFile (std::string file_location) override |
| Create an output file handle for the given location. | |
| Status | DeleteFile (const std::string &file_location) override |
| Delete a file at the given location. | |
| const std::shared_ptr<::arrow::fs::FileSystem > & | fs () const |
| Get the Arrow file system. | |
Public Member Functions inherited from iceberg::FileIO | |
| virtual Result< std::string > | ReadFile (const std::string &file_location, std::optional< size_t > length) |
| Read the content of the file at the given location. | |
| virtual Status | WriteFile (const std::string &file_location, std::string_view content) |
| Write the given content to the file at the given location. | |
Static Public Member Functions | |
| static std::unique_ptr< FileIO > | MakeMockFileIO () |
| Make an in-memory FileIO backed by arrow::fs::internal::MockFileSystem. | |
| static std::unique_ptr< FileIO > | MakeLocalFileIO () |
| Make a local FileIO backed by arrow::fs::LocalFileSystem. | |
Friends | |
| Result< std::shared_ptr<::arrow::io::RandomAccessFile > > | OpenArrowInputStream (const std::shared_ptr< FileIO > &io, const std::string &path, std::optional< size_t > length) |
| Open a FileIO input as an Arrow input stream. | |
| Result< std::shared_ptr<::arrow::io::OutputStream > > | OpenArrowOutputStream (const std::shared_ptr< FileIO > &io, const std::string &path, bool overwrite) |
| Open a FileIO output as an Arrow output stream. | |
A concrete implementation of FileIO for Arrow file system.
|
overridevirtual |
Delete a file at the given location.
Reimplemented from iceberg::FileIO.
|
overridevirtual |
Create an input file handle for the given location.
Reimplemented from iceberg::FileIO.
|
overridevirtual |
Create an input file handle for the given location with a known length.
Reimplemented from iceberg::FileIO.
|
overridevirtual |
Create an output file handle for the given location.
Reimplemented from iceberg::FileIO.
|
friend |
Open a FileIO input as an Arrow input stream.
Uses ArrowFileSystemFileIO's native Arrow stream directly when possible and falls back to a FileIO stream adapter otherwise. The fallback requires FileIO to implement NewInputFile.
|
friend |
Open a FileIO output as an Arrow output stream.
Uses ArrowFileSystemFileIO's native Arrow stream directly when possible and falls back to a FileIO stream adapter otherwise. The fallback requires FileIO to implement NewOutputFile.