Package com.linkedin.venice.controller
Class AdminTopicMetadataAccessor
java.lang.Object
com.linkedin.venice.controller.AdminTopicMetadataAccessor
- Direct Known Subclasses:
InMemoryAdminTopicMetadataAccessor
,ZkAdminTopicMetadataAccessor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateMetadataMap
(long localOffset, long upstreamOffset, long executionId) static long
getExecutionId
(Map<String, Long> metadata) getMetadata
(String clusterName) Retrieve the latest metadata map.getOffsets
(Map<String, Long> metadata) abstract void
updateMetadata
(String clusterName, Map<String, Long> metadata) Update all relevant metadata for a given cluster in a single transaction.
-
Constructor Details
-
AdminTopicMetadataAccessor
public AdminTopicMetadataAccessor()
-
-
Method Details
-
generateMetadataMap
public static Map<String,Long> generateMetadataMap(long localOffset, long upstreamOffset, long executionId) - Returns:
- a map with OFFSET_KEY, UPSTREAM_OFFSET_KEY, EXECUTION_ID_KEY specified to input values.
-
getOffsets
- Returns:
- a pair of values to which the specified keys are mapped to OFFSET_KEY and UPSTREAM_OFFSET_KEY.
-
getExecutionId
- Returns:
- the value to which the specified key is mapped to EXECUTION_ID_KEY.
-
updateMetadata
Update all relevant metadata for a given cluster in a single transaction.- Parameters:
clusterName
- of the cluster at interest.metadata
- map containing relevant information.
-
getMetadata
Retrieve the latest metadata map.- Parameters:
clusterName
- of the cluster at interest.
-