Package com.linkedin.venice.router.api
Class VenicePathParser<HTTP_REQUEST extends BasicHttpRequest>
java.lang.Object
com.linkedin.venice.router.api.VenicePathParser<HTTP_REQUEST>
- All Implemented Interfaces:
ExtendedResourcePathParser<VenicePath,
,RouterKey, HTTP_REQUEST> ResourcePathParser<VenicePath,
RouterKey>
public class VenicePathParser<HTTP_REQUEST extends BasicHttpRequest>
extends Object
implements ExtendedResourcePathParser<VenicePath,RouterKey,HTTP_REQUEST>
Inbound single get request to the router will look like:
GET /storage/storeName/key?f=fmt
'storage' is a literal, meaning we will request the value for a single key
storeName will be the name of the requested store
key is the key being looked up
fmt is an optional format parameter, one of 'string' or 'b64'. If omitted, assumed to be 'string'
Batch get requests look like:
POST /storage/storeName
And the keys are concatenated in the POST body.
The VenicePathParser is responsible for looking up the active version of the store, and constructing the store-version
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final int
static final Pattern
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Deprecated.static final String
static final String
static final String
static final String
-
Constructor Summary
ConstructorDescriptionVenicePathParser
(VeniceVersionFinder versionFinder, VenicePartitionFinder partitionFinder, RouterStats<AggRouterHttpRequestStats> routerStats, ReadOnlyStoreRepository storeRepository, VeniceRouterConfig routerConfig, CompressorFactory compressorFactory, io.tehuti.metrics.MetricsRepository metricsRepository, ScheduledExecutorService retryManagerScheduler) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isStoreNameValid
(String storeName) parseResourceUri
(String uri) parseResourceUri
(String uri, HTTP_REQUEST request) substitutePartitionKey
(VenicePath path, RouterKey s) substitutePartitionKey
(VenicePath path, Collection<RouterKey> s)
-
Field Details
-
STORE_PATTERN
-
STORE_MAX_LENGTH
public static final int STORE_MAX_LENGTH- See Also:
-
SEP
- See Also:
-
TYPE_STORAGE
- See Also:
-
TYPE_COMPUTE
- See Also:
-
TASK_READ_QUOTA_THROTTLE
- See Also:
-
ACTION_ENABLE
- See Also:
-
ACTION_DISABLE
- See Also:
-
TYPE_LEADER_CONTROLLER
-
TYPE_LEADER_CONTROLLER_LEGACY
Deprecated. -
TYPE_KEY_SCHEMA
-
TYPE_VALUE_SCHEMA
-
TYPE_GET_UPDATE_SCHEMA
-
TYPE_CLUSTER_DISCOVERY
-
TYPE_REQUEST_TOPIC
-
TYPE_HEALTH_CHECK
-
TYPE_ADMIN
-
TYPE_RESOURCE_STATE
-
TYPE_CURRENT_VERSION
-
TYPE_BLOB_DISCOVERY
-
-
Constructor Details
-
VenicePathParser
public VenicePathParser(VeniceVersionFinder versionFinder, VenicePartitionFinder partitionFinder, RouterStats<AggRouterHttpRequestStats> routerStats, ReadOnlyStoreRepository storeRepository, VeniceRouterConfig routerConfig, CompressorFactory compressorFactory, io.tehuti.metrics.MetricsRepository metricsRepository, ScheduledExecutorService retryManagerScheduler)
-
-
Method Details
-
parseResourceUri
- Specified by:
parseResourceUri
in interfaceExtendedResourcePathParser<VenicePath,
RouterKey, HTTP_REQUEST extends BasicHttpRequest> - Throws:
RouterException
-
parseResourceUri
- Specified by:
parseResourceUri
in interfaceResourcePathParser<VenicePath,
RouterKey> - Throws:
RouterException
-
substitutePartitionKey
- Specified by:
substitutePartitionKey
in interfaceResourcePathParser<VenicePath,
RouterKey>
-
substitutePartitionKey
- Specified by:
substitutePartitionKey
in interfaceResourcePathParser<VenicePath,
RouterKey>
-
isStoreNameValid
-