Bedrock.DataPlane.Materializer.Olivine.CompactionWriter.Bundle (bedrock v0.6.0)

View Source

CompactionWriter implementation that writes to a single bundle file.

Bundle format: [data bytes] [index record] <- existing IndexDatabase format (magic 0x4F4C5644)

The data_end_offset marks where data ends and index begins. This format is suitable for ObjectStorage upload as a single file.

Summary

Functions

Create a new Bundle writer for the given path.

Types

result()

@type result() :: %{
  fd: :file.fd(),
  path: charlist(),
  data_end_offset: non_neg_integer(),
  total_size: non_neg_integer()
}

t()

@type t() :: %Bedrock.DataPlane.Materializer.Olivine.CompactionWriter.Bundle{
  data_end_offset: non_neg_integer(),
  fd: :file.fd(),
  path: charlist()
}

Functions

new(path)

@spec new(path :: charlist()) :: {:ok, t()} | {:error, term()}

Create a new Bundle writer for the given path.