Package org.apache.pinot.common.minion
Class MinionTaskMetadataUtils
- java.lang.Object
-
- org.apache.pinot.common.minion.MinionTaskMetadataUtils
-
public final class MinionTaskMetadataUtils extends Object
Helper methods to fetch/persist ZNRecord for minion task metadata
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddeleteTaskMetadata(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/tableNameWthTypestatic org.apache.helix.ZNRecordfetchTaskMetadata(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/tableNameWthTypestatic voidpersistTaskMetadata(org.apache.helix.store.HelixPropertyStore<org.apache.helix.ZNRecord> propertyStore, String taskType, BaseTaskMetadata taskMetadata, int expectedVersion)Generic method for persistingBaseTaskMetadatato 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 persistingBaseTaskMetadatato 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.
-
-