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

#include <arrow/io/interfaces.h>

Inheritance diagram for arrow::io::RandomAccessFile:
arrow::io::InputStream arrow::io::Seekable arrow::io::FileInterface arrow::io::Readable arrow::io::BufferReader arrow::io::HdfsReadableFile arrow::io::ReadableFile arrow::io::ReadWriteFileInterface arrow::py::PyReadableFile arrow::gpu::CudaBufferReader arrow::py::PyBytesReader arrow::io::MemoryMappedFile

Public Member Functions

 ~RandomAccessFile () override
 Necessary because we hold a std::unique_ptr. More...
 
virtual Status GetSize (int64_t *size)=0
 
virtual bool supports_zero_copy () const =0
 
virtual Status ReadAt (int64_t position, int64_t nbytes, int64_t *bytes_read, uint8_t *out)=0
 Read nbytes at position, provide default implementations using Read(...), but can be overridden. More...
 
virtual Status ReadAt (int64_t position, int64_t nbytes, std::shared_ptr< Buffer > *out)=0
 Read nbytes at position, provide default implementations using Read(...), but can be overridden. More...
 
- Public Member Functions inherited from arrow::io::FileInterface
virtual ~FileInterface ()=0
 
virtual Status Close ()=0
 
virtual Status Tell (int64_t *position) const =0
 
FileMode::type mode () const
 
- Public Member Functions inherited from arrow::io::Readable
virtual ~Readable ()=default
 
virtual Status Read (int64_t nbytes, int64_t *bytes_read, uint8_t *out)=0
 
virtual Status Read (int64_t nbytes, std::shared_ptr< Buffer > *out)=0
 
- Public Member Functions inherited from arrow::io::Seekable
virtual ~Seekable ()=default
 
virtual Status Seek (int64_t position)=0
 

Protected Member Functions

 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)
 

Additional Inherited Members

- Protected Attributes inherited from arrow::io::FileInterface
FileMode::type mode_
 

Constructor & Destructor Documentation

◆ ~RandomAccessFile()

arrow::io::RandomAccessFile::~RandomAccessFile ( )
override

Necessary because we hold a std::unique_ptr.

◆ RandomAccessFile()

arrow::io::RandomAccessFile::RandomAccessFile ( )
protected

Member Function Documentation

◆ GetSize()

virtual Status arrow::io::RandomAccessFile::GetSize ( int64_t *  size)
pure virtual

◆ ReadAt() [1/2]

virtual Status arrow::io::RandomAccessFile::ReadAt ( int64_t  position,
int64_t  nbytes,
int64_t *  bytes_read,
uint8_t *  out 
)
pure virtual

Read nbytes at position, provide default implementations using Read(...), but can be overridden.

Default implementation is thread-safe.

Note
Child classes must explicitly call this implementation or provide their own.
Parameters
[in]positionWhere to read bytes from
[in]nbytesThe number of bytes to read
[out]bytes_readThe number of bytes read
[out]outThe buffer to read bytes into
Returns
Status

Implemented in arrow::io::HdfsReadableFile, arrow::io::MemoryMappedFile, arrow::io::BufferReader, arrow::io::ReadableFile, and arrow::py::PyReadableFile.

◆ ReadAt() [2/2]

virtual Status arrow::io::RandomAccessFile::ReadAt ( int64_t  position,
int64_t  nbytes,
std::shared_ptr< Buffer > *  out 
)
pure virtual

Read nbytes at position, provide default implementations using Read(...), but can be overridden.

Default implementation is thread-safe.

Note
Child classes must explicitly call this implementation or provide their own.
Parameters
[in]positionWhere to read bytes from
[in]nbytesThe number of bytes to read
[out]outThe buffer to read bytes into. The number of bytes read can be retrieved by calling Buffer::size().

Implemented in arrow::io::HdfsReadableFile, arrow::io::MemoryMappedFile, arrow::io::BufferReader, arrow::io::ReadableFile, and arrow::py::PyReadableFile.

◆ supports_zero_copy()

virtual bool arrow::io::RandomAccessFile::supports_zero_copy ( ) const
pure virtual

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