Class AdminTopicMetadataAccessor

java.lang.Object
com.linkedin.venice.controller.AdminTopicMetadataAccessor
Direct Known Subclasses:
InMemoryAdminTopicMetadataAccessor, ZkAdminTopicMetadataAccessor

public abstract class AdminTopicMetadataAccessor extends Object
  • 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

      public static Pair<Long,Long> getOffsets(Map<String,Long> metadata)
      Returns:
      a pair of values to which the specified keys are mapped to OFFSET_KEY and UPSTREAM_OFFSET_KEY.
    • getExecutionId

      public static long getExecutionId(Map<String,Long> metadata)
      Returns:
      the value to which the specified key is mapped to EXECUTION_ID_KEY.
    • updateMetadata

      public abstract void updateMetadata(String clusterName, Map<String,Long> metadata)
      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

      public abstract Map<String,Long> getMetadata(String clusterName)
      Retrieve the latest metadata map.
      Parameters:
      clusterName - of the cluster at interest.