Class VeniceMultiGetPath
java.lang.Object
com.linkedin.venice.router.api.path.VenicePath
com.linkedin.venice.router.api.path.VeniceMultiKeyPath<MultiGetRouterRequestKeyV1>
com.linkedin.venice.router.api.path.VeniceMultiGetPath
- All Implemented Interfaces:
ResourcePath<RouterKey>
-
Field Summary
Fields inherited from class com.linkedin.venice.router.api.path.VeniceMultiKeyPath
keyNum, routerKeyMap
Fields inherited from class com.linkedin.venice.router.api.path.VenicePath
retryManager, storeName, versionNumber
-
Constructor Summary
ConstructorDescriptionVeniceMultiGetPath
(String storeName, int versionNumber, String resourceName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, boolean smartLongTailRetryEnabled, int smartLongTailRetryAbortThresholdMs, RouterStats<AggRouterHttpRequestStats> stats, int longTailRetryMaxRouteForMultiKeyReq, RetryManager retryManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected MultiGetRouterRequestKeyV1
createRouterRequestKey
(ByteBuffer key, int keyIdx, int partitionId) Create a router request key.protected VeniceMultiGetPath
fixRetryRequestForSubPath
(Map<RouterKey, MultiGetRouterRequestKeyV1> routerKeyMap) If the parent request is a retry request, the sub-request generated by scattering-gathering logic should be retry request as well.final RequestType
final RequestType
protected byte[]
For multi-get requests, simply serialize the set of RouterKey to bytes; for read compute requests, concatenate the compute request and the serialized keysMethods inherited from class com.linkedin.venice.router.api.path.VeniceMultiKeyPath
composeRouterRequestInternal, getBody, getHttpMethod, getLongTailRetryMaxRouteForMultiKeyReq, initialize, isLongTailRetryAllowedForNewRequest, setupRetryRelatedInfo, substitutePartitionKey, substitutePartitionKey
Methods inherited from class com.linkedin.venice.router.api.path.VenicePath
canRequestStorageNode, composeRouterRequest, getChunkedResponse, getHelixGroupId, getLongTailRetryThresholdMs, getOriginalRequestStartTs, getPartitionKeys, getRequestId, getRequestSize, getResourceName, getResponseDecompressor, getResponseHeaders, getSmartLongTailRetryAbortThresholdMs, getStoreName, getVersionNumber, isLongTailRetryWithinBudget, isRetryRequest, isRetryRequestTooLate, isSmartLongTailRetryEnabled, isStreamingRequest, markStorageNodeAsFast, recordOriginalRequestStartTimestamp, recordRequest, requestStorageNode, setChunkedWriteHandler, setHelixGroupId, setLongTailRetryThresholdMs, setPartitionKeys, setResponseDecompressor, setResponseHeaders, setRetryRequest, setRetryRequest, setupVeniceHeaders
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linkedin.alpini.router.api.ResourcePath
getPartitionKey
-
Field Details
-
EXPECTED_PROTOCOL
-
-
Constructor Details
-
VeniceMultiGetPath
public VeniceMultiGetPath(String storeName, int versionNumber, String resourceName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, boolean smartLongTailRetryEnabled, int smartLongTailRetryAbortThresholdMs, RouterStats<AggRouterHttpRequestStats> stats, int longTailRetryMaxRouteForMultiKeyReq, RetryManager retryManager) throws RouterException - Throws:
RouterException
-
-
Method Details
-
getLocation
-
getRequestType
- Specified by:
getRequestType
in classVenicePath
-
getStreamingRequestType
- Overrides:
getStreamingRequestType
in classVenicePath
-
fixRetryRequestForSubPath
protected VeniceMultiGetPath fixRetryRequestForSubPath(Map<RouterKey, MultiGetRouterRequestKeyV1> routerKeyMap) If the parent request is a retry request, the sub-request generated by scattering-gathering logic should be retry request as well.- Specified by:
fixRetryRequestForSubPath
in classVeniceMultiKeyPath<MultiGetRouterRequestKeyV1>
- Parameters:
routerKeyMap
-- Returns:
-
createRouterRequestKey
protected MultiGetRouterRequestKeyV1 createRouterRequestKey(ByteBuffer key, int keyIdx, int partitionId) Description copied from class:VeniceMultiKeyPath
Create a router request key.- Specified by:
createRouterRequestKey
in classVeniceMultiKeyPath<MultiGetRouterRequestKeyV1>
- Returns:
- An instance of ComputeRouterRequestKeyV1 for compute request; return an instance of MultiGetRouterRequestKeyV1 for multi-get
-
serializeRouterRequest
protected byte[] serializeRouterRequest()Description copied from class:VeniceMultiKeyPath
For multi-get requests, simply serialize the set of RouterKey to bytes; for read compute requests, concatenate the compute request and the serialized keys- Specified by:
serializeRouterRequest
in classVeniceMultiKeyPath<MultiGetRouterRequestKeyV1>
- Returns:
-
getVeniceApiVersionHeader
- Specified by:
getVeniceApiVersionHeader
in classVenicePath
-