Input / output and filesystems¶
Arrow provides a range of C++ interfaces abstracting the concrete details of input / output operations. They operate on streams of untyped binary data. Those abstractions are used for various purposes such as reading CSV or Parquet data, transmitting IPC streams, and more.
Reading binary data¶
Interfaces for reading binary data come in two flavours:
Sequential reading: the
InputStream
interface providesRead
methods; it is recommended toRead
to aBuffer
as it may in some cases avoid a memory copy.Random access reading: the
RandomAccessFile
interface provides additional facilities for positioning and, most importantly, theReadAt
methods which allow parallel reading from multiple threads.
Concrete implementations are available for in-memory reads
,
unbuffered file reads
,
memory-mapped file reads
,
buffered reads
,
compressed reads
.
Writing binary data¶
Writing binary data is mostly done through the OutputStream
interface.
Concrete implementations are available for in-memory writes
,
unbuffered file writes
,
memory-mapped file writes
,
buffered writes
,
compressed writes
.
Filesystems¶
The filesystem interface
allows abstracted access over
various data storage backends such as the local filesystem or a S3 bucket.
It provides input and output streams as well as directory operations.
The filesystem interface exposes a simplified view of the underlying data
storage. Data paths are represented as abstract paths, which are
/
-separated, even on Windows, and shouldn’t include special path
components such as .
and ..
. Symbolic links, if supported by the
underlying storage, are automatically dereferenced. Only basic
metadata
about file entries, such as the file size
and modification time, is made available.
Concrete implementations are available for
local filesystem access
,
HDFS
and
Amazon S3-compatible storage
.