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
keyNum, routerKeyMap
Fields inherited from class com.linkedin.venice.router.api.path.VenicePath
retryManager, storeName, versionNumber
-
Constructor Summary
ConstructorDescriptionVeniceComputePath
(String storeName, int versionNumber, String resourceName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, boolean smartLongTailRetryEnabled, int smartLongTailRetryAbortThresholdMs, int longTailRetryMaxRouteForMultiKeyReq, RetryManager retryManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected ComputeRouterRequestKeyV1
createRouterRequestKey
(ByteBuffer key, int keyIdx, int partitionId) Create a router request key.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.protected int
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 keysvoid
setupVeniceHeaders
(BiConsumer<String, String> setupHeaderFunc) Methods 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
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
-
Constructor Details
-
VeniceComputePath
public VeniceComputePath(String storeName, int versionNumber, String resourceName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, boolean smartLongTailRetryEnabled, int smartLongTailRetryAbortThresholdMs, int longTailRetryMaxRouteForMultiKeyReq, RetryManager retryManager) throws RouterException - Throws:
RouterException
-
-
Method Details
-
getLocation
-
getRequestType
- Specified by:
getRequestType
in classVenicePath
-
getStreamingRequestType
- Overrides:
getStreamingRequestType
in 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:
fixRetryRequestForSubPath
in classVeniceMultiKeyPath<ComputeRouterRequestKeyV1>
- Parameters:
routerKeyMap
-- Returns:
-
createRouterRequestKey
protected ComputeRouterRequestKeyV1 createRouterRequestKey(ByteBuffer key, int keyIdx, int partitionId) Description copied from class:VeniceMultiKeyPath
Create a router request key.- Specified by:
createRouterRequestKey
in 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: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<ComputeRouterRequestKeyV1>
- Returns:
-
setupVeniceHeaders
- Overrides:
setupVeniceHeaders
in classVenicePath
-
getVeniceApiVersionHeader
- Specified by:
getVeniceApiVersionHeader
in classVenicePath
-
getComputeRequestLengthInBytes
protected int getComputeRequestLengthInBytes()
-