Package com.linkedin.venice.controller
Class AdminTopicMetadataAccessor
java.lang.Object
com.linkedin.venice.controller.AdminTopicMetadataAccessor
- Direct Known Subclasses:
InMemoryAdminTopicMetadataAccessor,ZkAdminTopicMetadataAccessor
This class provides a set of methods to access and update metadata for admin topics.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Longstatic final StringWhen remote consumption is enabled, child controller will consume directly from the source admin topic; an extra metadata called upstream offset will be maintained, which indicate the last offset in the source admin topic that gets processed successfully. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longstatic longgetExecutionId(AdminMetadata metadata) abstract AdminMetadatagetMetadata(String clusterName) Retrieve the latest metadata.static Pair<PubSubPosition,PubSubPosition> getPositions(AdminMetadata metadata) abstract voidupdateMetadata(String clusterName, AdminMetadata metadata) Update specific metadata for a given cluster in a single transaction with information provided in metadata.
-
Field Details
-
POSITION_KEY
- See Also:
-
UPSTREAM_POSITION_KEY
When remote consumption is enabled, child controller will consume directly from the source admin topic; an extra metadata called upstream offset will be maintained, which indicate the last offset in the source admin topic that gets processed successfully.- See Also:
-
EXECUTION_ID_KEY
- See Also:
-
ADMIN_OPERATION_PROTOCOL_VERSION_KEY
- See Also:
-
UNDEFINED_VALUE
-
-
Constructor Details
-
AdminTopicMetadataAccessor
public AdminTopicMetadataAccessor()
-
-
Method Details
-
getPositions
-
getAdminOperationProtocolVersion
- Returns:
- the value to which the specified key is mapped to ADMIN_OPERATION_PROTOCOL_VERSION_KEY.
-
getExecutionId
- Returns:
- the execution ID from the metadata
-
updateMetadata
Update specific metadata for a given cluster in a single transaction with information provided in metadata.- Parameters:
clusterName- of the cluster at interest.metadata- AdminMetadata containing relevant information.
-
getMetadata
Retrieve the latest metadata.- Parameters:
clusterName- of the cluster at interest.- Returns:
- AdminMetadata containing all metadata information
-