Class ChunkedValueManifestContainer
java.lang.Object
com.linkedin.davinci.storage.chunking.ChunkedValueManifestContainer
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intSentinel meaning the caller accepts any size, which is the default and the behavior for all read paths. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the value was left unassembled because it exceeds the ceiling this container declared.voidsetManifest(ChunkedValueManifest manifest)
-
Field Details
-
UNLIMITED_SIZE
public static final int UNLIMITED_SIZESentinel 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 asUNLIMITED_SIZE, imposes no ceiling.
-
-
Method Details
-
setManifest
-
getManifest
-
isSizeLimitExceeded
public boolean isSizeLimitExceeded()Whether the value was left unassembled because it exceeds the ceiling this container declared. When this is true, anulllookup result means "too large to read", not "not found".
-