Package com.linkedin.venice.blobtransfer
Class MetadataBasedServerBlobFinder
java.lang.Object
com.linkedin.venice.blobtransfer.MetadataBasedServerBlobFinder
- All Implemented Interfaces:
BlobFinder,AutoCloseable
Discovers the Venice servers hosting a store partition so a Stateful CDC / Da Vinci client with no peer can fall back
to fetching a blob from a server. Used only on the cold-start fallback path.
metadata/<store> is served by Venice servers, not the Router, so this finder uses D2 server-routing (like
Fast Client's RequestBasedMetadata): it resolves the store's server D2 service, GETs metadata/<store>
on a server, and reads the partition-to-replica map from MetadataResponseRecord.getRoutingInfo(), reusing the
D2 client on the ClientConfig. The response is decoded against the writer schema the server advertises (via
its schema id), so a server running a newer MetadataResponseRecord schema than the client is still readable.
Any failure returns an empty/error response so the caller falls back to Version Topic replay -- it never returns a
wrong host.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Release finder-owned resources after the blob transfer manager has stopped issuing discovery requests.discoverBlobPeers(String storeName, int version, int partitionId) Return the server replicas hostingpartitionIdfor the store's current serving version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.venice.blobtransfer.BlobFinder
shouldPreservePeerOrder
-
Constructor Details
-
MetadataBasedServerBlobFinder
-
-
Method Details
-
discoverBlobPeers
Return the server replicas hostingpartitionIdfor the store's current serving version.- Specified by:
discoverBlobPeersin interfaceBlobFinder
-
close
public void close()Release finder-owned resources after the blob transfer manager has stopped issuing discovery requests.- Specified by:
closein interfaceAutoCloseable
-