Class ChunkedValueManifestContainer

java.lang.Object
com.linkedin.davinci.storage.chunking.ChunkedValueManifestContainer

public class ChunkedValueManifestContainer extends Object
Carries the ChunkedValueManifest of a chunked value back to the caller of a storage lookup.

A caller may also declare a ceiling on the assembled value size. When it does, the lookup short-circuits as soon as the manifest is read: the manifest records the fully assembled size, so an oversized value can be identified without fetching and concatenating any of its chunks. The lookup then returns null, and the caller distinguishes that from a genuinely missing value via isSizeLimitExceeded().

This is used by nearline large-record skipping so that a pathological multi-megabyte record is never assembled just to discover that the write must be rejected. Callers that do not declare a ceiling are unaffected.

  • Field Details

    • UNLIMITED_SIZE

      public static final int UNLIMITED_SIZE
      Sentinel meaning the caller accepts any size, which is the default and the behavior for all read paths.
      See Also:
  • Constructor Details

    • ChunkedValueManifestContainer

      public ChunkedValueManifestContainer()
    • ChunkedValueManifestContainer

      public ChunkedValueManifestContainer(int maxAssembledSizeBytes)
      Parameters:
      maxAssembledSizeBytes - largest assembled value the caller is willing to have read. Any non-positive value, such as UNLIMITED_SIZE, imposes no ceiling.
  • Method Details

    • setManifest

      public void setManifest(ChunkedValueManifest manifest)
    • getManifest

      public ChunkedValueManifest getManifest()
    • isSizeLimitExceeded

      public boolean isSizeLimitExceeded()
      Whether the value was left unassembled because it exceeds the ceiling this container declared. When this is true, a null lookup result means "too large to read", not "not found".