Class MinionTaskMetadataUtils


  • public final class MinionTaskMetadataUtils
    extends Object
    Helper methods to fetch/persist ZNRecord for minion task metadata
    • Method Detail

      • fetchTaskMetadata

        @Nullable
        public static org.apache.helix.ZNRecord fetchTaskMetadata​(org.apache.helix.store.HelixPropertyStore<org.apache.helix.ZNRecord> propertyStore,
                                                                  String taskType,
                                                                  String tableNameWithType)
        Fetches the ZNRecord for the given minion task and tableName, from MINION_TASK_METADATA/taskName/tableNameWthType
      • deleteTaskMetadata

        public static void deleteTaskMetadata​(org.apache.helix.store.HelixPropertyStore<org.apache.helix.ZNRecord> propertyStore,
                                              String taskType,
                                              String tableNameWithType)
        Deletes the ZNRecord for the given minion task and tableName, from MINION_TASK_METADATA/taskName/tableNameWthType
      • persistTaskMetadata

        public static void persistTaskMetadata​(org.apache.helix.store.HelixPropertyStore<org.apache.helix.ZNRecord> propertyStore,
                                               String taskType,
                                               BaseTaskMetadata taskMetadata,
                                               int expectedVersion)
        Generic method for persisting BaseTaskMetadata to MINION_TASK_METADATA. The metadata will be saved in the ZNode under the path: /MINION_TASK_METADATA/${taskType}/${tableNameWithType} Will fail if expectedVersion does not match. Set expectedVersion -1 to override version check.