Appendix

template <typename kv_store>
struct h5s3::driver::kv_driver

Key-value driver for hdf5.

This driver is polymorphic over the backing key-value store.

Template Parameters
  • kv_store: The type of the backing key-value store.

Public Static Functions

template <typename… Extra>
static herr_t set_fapl(hid_t fapl_id, std::size_t page_size, std::size_t page_cache_size, Extra... extra)

Set the parameters on the file access property list.

Return
0 on success, -1 on failure.
Parameters
  • fapl_id: The id of the file access property list to modify.
  • page_size: The size of each page. Pass 0 for the default or to read the value out of an existing file. If passed when opening an existing file, it must match.
  • page_cache_size: The number of pages to hold in memory.
  • extra: The arguments to forward to the kv_store.

class h5s3::s3_driver::s3_kv_store

The kv-store implementation backed by Amazon S3.

Public Functions

s3_kv_store(s3_kv_store &&mvfrom)
std::size_t page_size() const
page::id max_page() const
void max_page(page::id max_page)
void read(page::id page_id, utils::out_buffer &out) const
void write(page::id page_id, const std::string_view &data)
void flush()

Public Static Functions

s3_kv_store from_params(const std::string_view &uri_view, unsigned int, std::size_t page_size, const char *access_key, const char *secret_key, const char *region, const char *host, bool use_tls)

Public Static Attributes

const char *name = "h5s3"
template <typename kv_store>
class h5s3::page::table

A page table adapts a kv_store to present the abstraction of a contiguous memory space. The page table implements caching to reduce the trips to the underlying kv_store.

Template Parameters
  • kv_store: The underlying key-value store.

Public Functions

kv_store &store()

Access the kv_store that backs this table.

const kv_store &store() const

Access the kv_store that backs this table.

void read(std::size_t addr, utils::out_buffer &buffer) const

Read data from the page table.

Parameters
  • addr: The start address of the read.
  • buffer: The output buffer to fill.

void write(std::size_t addr, const std::string_view &data)

Write data into the page table.

Parameters
  • addr: The start address of the write.
  • data: The data to write into the table.

void flush()

Flush the internal caches back to store().

void flush() const

Flush the internal caches back to store().

void truncate(std::size_t eoa)

Truncate the backing kv_store to the semantic end of address space.

Parameters
  • eoa: The end of address space to set.

std::size_t eof() const

Compute the eof from the max_page of store().