Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Public Member Functions | Static Public Member Functions | List of all members
arrow::io::ReadableFile Class Reference

#include <arrow/io/file.h>

Inheritance diagram for arrow::io::ReadableFile:
arrow::io::RandomAccessFile arrow::io::InputStream arrow::io::Seekable arrow::io::FileInterface arrow::io::Readable

Public Member Functions

 ~ReadableFile ()
 
Status Close () override
 
Status Tell (int64_t *position) const override
 
Status Read (int64_t nbytes, int64_t *bytes_read, uint8_t *buffer) override
 
Status Read (int64_t nbytes, std::shared_ptr< Buffer > *out) override
 
Status ReadAt (int64_t position, int64_t nbytes, int64_t *bytes_read, uint8_t *out) override
 Thread-safe implementation of ReadAt. More...
 
Status ReadAt (int64_t position, int64_t nbytes, std::shared_ptr< Buffer > *out) override
 Thread-safe implementation of ReadAt. More...
 
Status GetSize (int64_t *size) override
 
Status Seek (int64_t position) override
 
bool supports_zero_copy () const override
 
int file_descriptor () const
 
- Public Member Functions inherited from arrow::io::RandomAccessFile
 ~RandomAccessFile () override
 Necessary because we hold a std::unique_ptr. More...
 
- Public Member Functions inherited from arrow::io::FileInterface
virtual ~FileInterface ()=0
 
FileMode::type mode () const
 
- Public Member Functions inherited from arrow::io::Readable
virtual ~Readable ()=default
 
- Public Member Functions inherited from arrow::io::Seekable
virtual ~Seekable ()=default
 

Static Public Member Functions

static Status Open (const std::string &path, std::shared_ptr< ReadableFile > *file)
 Open a local file for reading. More...
 
static Status Open (const std::string &path, MemoryPool *pool, std::shared_ptr< ReadableFile > *file)
 Open a local file for reading. More...
 

Additional Inherited Members

- Protected Member Functions inherited from arrow::io::RandomAccessFile
 RandomAccessFile ()
 
- Protected Member Functions inherited from arrow::io::InputStream
 InputStream ()=default
 
- Protected Member Functions inherited from arrow::io::FileInterface
 FileInterface ()
 
void set_mode (FileMode::type mode)
 
- Protected Attributes inherited from arrow::io::FileInterface
FileMode::type mode_
 

Constructor & Destructor Documentation

◆ ~ReadableFile()

arrow::io::ReadableFile::~ReadableFile ( )

Member Function Documentation

◆ Close()

Status arrow::io::ReadableFile::Close ( )
overridevirtual

◆ file_descriptor()

int arrow::io::ReadableFile::file_descriptor ( ) const

◆ GetSize()

Status arrow::io::ReadableFile::GetSize ( int64_t *  size)
overridevirtual

◆ Open() [1/2]

static Status arrow::io::ReadableFile::Open ( const std::string &  path,
std::shared_ptr< ReadableFile > *  file 
)
static

Open a local file for reading.

Parameters
[in]pathwith UTF8 encoding
[out]fileReadableFile instance Open file, allocate memory (if needed) from default memory pool

◆ Open() [2/2]

static Status arrow::io::ReadableFile::Open ( const std::string &  path,
MemoryPool pool,
std::shared_ptr< ReadableFile > *  file 
)
static

Open a local file for reading.

Parameters
[in]pathwith UTF8 encoding
[in]poola MemoryPool for memory allocations
[out]fileReadableFile instance Open file with one's own memory pool for memory allocations

◆ Read() [1/2]

Status arrow::io::ReadableFile::Read ( int64_t  nbytes,
int64_t *  bytes_read,
uint8_t *  buffer 
)
overridevirtual

Implements arrow::io::Readable.

◆ Read() [2/2]

Status arrow::io::ReadableFile::Read ( int64_t  nbytes,
std::shared_ptr< Buffer > *  out 
)
overridevirtual

Implements arrow::io::Readable.

◆ ReadAt() [1/2]

Status arrow::io::ReadableFile::ReadAt ( int64_t  position,
int64_t  nbytes,
int64_t *  bytes_read,
uint8_t *  out 
)
overridevirtual

Thread-safe implementation of ReadAt.

Implements arrow::io::RandomAccessFile.

◆ ReadAt() [2/2]

Status arrow::io::ReadableFile::ReadAt ( int64_t  position,
int64_t  nbytes,
std::shared_ptr< Buffer > *  out 
)
overridevirtual

Thread-safe implementation of ReadAt.

Implements arrow::io::RandomAccessFile.

◆ Seek()

Status arrow::io::ReadableFile::Seek ( int64_t  position)
overridevirtual

Implements arrow::io::Seekable.

◆ supports_zero_copy()

bool arrow::io::ReadableFile::supports_zero_copy ( ) const
overridevirtual

◆ Tell()

Status arrow::io::ReadableFile::Tell ( int64_t *  position) const
overridevirtual

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