Implementation class for reading from an Apache Arrow file. The file could be a memory-mapped file or other implementation supported by Arrow.
More...
#include <arrow_io_source.hpp>
|
| arrow_io_source (std::string const &arrow_uri) |
| Constructs an object from an Apache Arrow Filesystem URI. More...
|
|
| arrow_io_source (std::shared_ptr< arrow::io::RandomAccessFile > file) |
| Constructs an object from an arrow source object. More...
|
|
std::unique_ptr< buffer > | host_read (size_t offset, size_t size) override |
| Returns a buffer with a subset of data from the arrow source. More...
|
|
size_t | host_read (size_t offset, size_t size, uint8_t *dst) override |
| Reads a selected range from the arrow source into a preallocated buffer. More...
|
|
size_t | size () const override |
| Returns the size of the data in the arrow source. More...
|
|
virtual | ~datasource () |
| Base class destructor.
|
|
virtual bool | supports_device_read () const |
| Whether or not this source supports reading directly into device memory. More...
|
|
virtual bool | is_device_read_preferred (size_t size) const |
| Estimates whether a direct device read would be more optimal for the given size. More...
|
|
virtual std::unique_ptr< datasource::buffer > | device_read (size_t offset, size_t size, rmm::cuda_stream_view stream) |
| Returns a device buffer with a subset of data from the source. More...
|
|
virtual size_t | device_read (size_t offset, size_t size, uint8_t *dst, rmm::cuda_stream_view stream) |
| Reads a selected range into a preallocated device buffer. More...
|
|
virtual std::future< size_t > | device_read_async (size_t offset, size_t size, uint8_t *dst, rmm::cuda_stream_view stream) |
| Asynchronously reads a selected range into a preallocated device buffer. More...
|
|
virtual bool | is_empty () const |
| Returns whether the source contains any data. More...
|
|
Implementation class for reading from an Apache Arrow file. The file could be a memory-mapped file or other implementation supported by Arrow.
Definition at line 42 of file arrow_io_source.hpp.
◆ arrow_io_source() [1/2]
cudf::io::arrow_io_source::arrow_io_source |
( |
std::string const & |
arrow_uri | ) |
|
|
explicit |
Constructs an object from an Apache Arrow Filesystem URI.
- Parameters
-
arrow_uri | Apache Arrow Filesystem URI |
◆ arrow_io_source() [2/2]
cudf::io::arrow_io_source::arrow_io_source |
( |
std::shared_ptr< arrow::io::RandomAccessFile > |
file | ) |
|
|
inlineexplicit |
Constructs an object from an arrow
source object.
- Parameters
-
file | The arrow object from which the data is read |
Definition at line 56 of file arrow_io_source.hpp.
◆ host_read() [1/2]
std::unique_ptr<buffer> cudf::io::arrow_io_source::host_read |
( |
size_t |
offset, |
|
|
size_t |
size |
|
) |
| |
|
overridevirtual |
Returns a buffer with a subset of data from the arrow
source.
- Parameters
-
offset | The offset in bytes from which to read |
size | The number of bytes to read |
- Returns
- A buffer with the read data
Implements cudf::io::datasource.
◆ host_read() [2/2]
size_t cudf::io::arrow_io_source::host_read |
( |
size_t |
offset, |
|
|
size_t |
size, |
|
|
uint8_t * |
dst |
|
) |
| |
|
overridevirtual |
Reads a selected range from the arrow
source into a preallocated buffer.
- Parameters
-
[in] | offset | The offset in bytes from which to read |
[in] | size | The number of bytes to read |
[out] | dst | The preallocated buffer to read into |
- Returns
- The number of bytes read
Implements cudf::io::datasource.
◆ size()
size_t cudf::io::arrow_io_source::size |
( |
| ) |
const |
|
overridevirtual |
Returns the size of the data in the arrow
source.
- Returns
- The size of the data in the
arrow
source
Implements cudf::io::datasource.
The documentation for this class was generated from the following file: