Class VeniceComputePath
java.lang.Object
com.linkedin.venice.router.api.path.VenicePath
com.linkedin.venice.router.api.path.VeniceMultiKeyPath<ComputeRouterRequestKeyV1>
com.linkedin.venice.router.api.path.VeniceComputePath
- All Implemented Interfaces:
ResourcePath<RouterKey>
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionVeniceComputePath(StoreVersionName storeVersionName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, AggRouterHttpRequestStats stats, RouterRetryConfig retryConfig, RetryManager retryManager, VeniceResponseDecompressor responseDecompressor) -
Method Summary
Modifier and TypeMethodDescriptionprotected ComputeRouterRequestKeyV1createRouterRequestKey(ByteBuffer key, int keyIdx, int partitionId) Create a router request key.protected VeniceComputePathfixRetryRequestForSubPath(Map<RouterKey, ComputeRouterRequestKeyV1> routerKeyMap) If the parent request is a retry request, the sub-request generated by scattering-gathering logic should be retry request as well.protected intfinal 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 keysvoidsetupVeniceHeaders(BiConsumer<String, String> setupHeaderFunc) Methods 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, getClientComputeHeader, getOriginalRequestStartTs, getPartitionKeys, getRequestSize, getResourceName, getResponseDecompressor, getStoreName, getTime, getVersionNumber, isLongTailRetryWithinBudget, isRetryRequest, isRetryRequestTooLate, isStreamingRequest, markStorageNodeAsFast, recordOriginalRequestStartTimestamp, recordRequest, requestStorageNode, setPartitionKeys, setRetryRequest, setRetryRequestMethods 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
-
Constructor Details
-
VeniceComputePath
public VeniceComputePath(StoreVersionName storeVersionName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, AggRouterHttpRequestStats stats, RouterRetryConfig retryConfig, RetryManager retryManager, VeniceResponseDecompressor responseDecompressor) throws RouterException - Throws:
RouterException
-
-
Method Details
-
getLocation
-
getRequestType
- Specified by:
getRequestTypein classVenicePath
-
getStreamingRequestType
- Overrides:
getStreamingRequestTypein classVenicePath
-
toMultiGetPath
-
fixRetryRequestForSubPath
protected VeniceComputePath fixRetryRequestForSubPath(Map<RouterKey, ComputeRouterRequestKeyV1> 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<ComputeRouterRequestKeyV1>- Parameters:
routerKeyMap-- Returns:
-
createRouterRequestKey
protected ComputeRouterRequestKeyV1 createRouterRequestKey(ByteBuffer key, int keyIdx, int partitionId) Description copied from class:VeniceMultiKeyPathCreate a router request key.- Specified by:
createRouterRequestKeyin classVeniceMultiKeyPath<ComputeRouterRequestKeyV1>- 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<ComputeRouterRequestKeyV1>- Returns:
-
setupVeniceHeaders
- Overrides:
setupVeniceHeadersin classVenicePath
-
getVeniceApiVersionHeader
- Specified by:
getVeniceApiVersionHeaderin classVenicePath
-
getComputeRequestLengthInBytes
protected int getComputeRequestLengthInBytes()
-