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
FieldsFields inherited from class com.linkedin.venice.router.api.path.VeniceMultiKeyPath
routerKeyMapFields inherited from class com.linkedin.venice.router.api.path.VenicePath
retryConfig, retryManager, storeVersionName -
Constructor Summary
ConstructorsConstructorDescriptionVeniceMultiGetPath(StoreVersionName storeVersionName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, AggRouterHttpRequestStats stats, RouterRetryConfig retryConfig, RetryManager retryManager, VeniceResponseDecompressor responseDecompressor, String clientComputeHeader) -
Method Summary
Modifier and TypeMethodDescriptionprotected MultiGetRouterRequestKeyV1createRouterRequestKey(ByteBuffer key, int keyIdx, int partitionId) Create a router request key.protected VeniceMultiGetPathfixRetryRequestForSubPath(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 RequestTypefinal RequestTypeprotected 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, getChunkedResponse, getHelixGroupId, getHttpMethod, getLongTailRetryMaxRouteForMultiKeyReq, getLongTailRetryThresholdMs, getRequestId, getSmartLongTailRetryAbortThresholdMs, initialize, isLongTailRetryAllowedForNewRequest, isSmartLongTailRetryEnabled, setChunkedWriteHandler, setHelixGroupId, setupRetryRelatedInfo, substitutePartitionKey, substitutePartitionKeyMethods inherited from class com.linkedin.venice.router.api.path.VenicePath
canRequestStorageNode, composeRouterRequest, getOriginalRequestStartTs, getPartitionKeys, getRequestSize, getResourceName, getResponseDecompressor, getStoreName, getTime, getVersionNumber, isLongTailRetryWithinBudget, isRetryRequest, isRetryRequestTooLate, isStreamingRequest, markStorageNodeAsFast, recordOriginalRequestStartTimestamp, recordRequest, requestStorageNode, setPartitionKeys, setRetryRequest, setRetryRequest, setupVeniceHeadersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.alpini.router.api.ResourcePath
getPartitionKey
-
Field Details
-
EXPECTED_PROTOCOL
-
-
Constructor Details
-
VeniceMultiGetPath
public VeniceMultiGetPath(StoreVersionName storeVersionName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, AggRouterHttpRequestStats stats, RouterRetryConfig retryConfig, RetryManager retryManager, VeniceResponseDecompressor responseDecompressor, String clientComputeHeader) throws RouterException - Throws:
RouterException
-
-
Method Details
-
getLocation
-
getRequestType
- Specified by:
getRequestTypein classVenicePath
-
getStreamingRequestType
- Overrides:
getStreamingRequestTypein 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:
fixRetryRequestForSubPathin classVeniceMultiKeyPath<MultiGetRouterRequestKeyV1>- Parameters:
routerKeyMap-- Returns:
-
createRouterRequestKey
protected MultiGetRouterRequestKeyV1 createRouterRequestKey(ByteBuffer key, int keyIdx, int partitionId) Description copied from class:VeniceMultiKeyPathCreate a router request key.- Specified by:
createRouterRequestKeyin 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:VeniceMultiKeyPathFor 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:
serializeRouterRequestin classVeniceMultiKeyPath<MultiGetRouterRequestKeyV1>- Returns:
-
getVeniceApiVersionHeader
- Specified by:
getVeniceApiVersionHeaderin classVenicePath
-
getClientComputeHeader
- Overrides:
getClientComputeHeaderin classVenicePath
-