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>
public class VeniceMultiGetPath extends VeniceMultiKeyPath<MultiGetRouterRequestKeyV1>
-
-
Field Summary
Fields Modifier and Type Field Description protected static ReadAvroProtocolDefinition
EXPECTED_PROTOCOL
-
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
Constructors Constructor Description VeniceMultiGetPath(java.lang.String storeName, int versionNumber, java.lang.String resourceName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, boolean smartLongTailRetryEnabled, int smartLongTailRetryAbortThresholdMs, RouterStats<AggRouterHttpRequestStats> stats, int longTailRetryMaxRouteForMultiKeyReq, RetryManager retryManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MultiGetRouterRequestKeyV1
createRouterRequestKey(java.nio.ByteBuffer key, int keyIdx, int partitionId)
Create a router request key.protected VeniceMultiGetPath
fixRetryRequestForSubPath(java.util.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.java.lang.String
getLocation()
RequestType
getRequestType()
RequestType
getStreamingRequestType()
java.lang.String
getVeniceApiVersionHeader()
protected byte[]
serializeRouterRequest()
For multi-get requests, simply serialize the set of RouterKey to bytes; for read compute requests, concatenate the compute request and the serialized keys-
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, 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, hasMultiplePartitionKeys
-
-
-
-
Field Detail
-
EXPECTED_PROTOCOL
protected static final ReadAvroProtocolDefinition EXPECTED_PROTOCOL
-
-
Constructor Detail
-
VeniceMultiGetPath
public VeniceMultiGetPath(java.lang.String storeName, int versionNumber, java.lang.String resourceName, BasicFullHttpRequest request, VenicePartitionFinder partitionFinder, int maxKeyCount, boolean smartLongTailRetryEnabled, int smartLongTailRetryAbortThresholdMs, RouterStats<AggRouterHttpRequestStats> stats, int longTailRetryMaxRouteForMultiKeyReq, RetryManager retryManager) throws RouterException
- Throws:
RouterException
-
-
Method Detail
-
getLocation
@Nonnull public java.lang.String getLocation()
-
getRequestType
public final RequestType getRequestType()
- Specified by:
getRequestType
in classVenicePath
-
getStreamingRequestType
public final RequestType getStreamingRequestType()
- Overrides:
getStreamingRequestType
in classVenicePath
-
fixRetryRequestForSubPath
protected VeniceMultiGetPath fixRetryRequestForSubPath(java.util.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(java.nio.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
public java.lang.String getVeniceApiVersionHeader()
- Specified by:
getVeniceApiVersionHeader
in classVenicePath
-
-