Package org.apache.druid.common.utils
Class IdUtils
java.lang.Object
org.apache.druid.common.utils.IdUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringgetRandomIdWithPrefix(String prefix) static SegmentIdgetValidSegmentId(String dataSource, String serializedSegmentId) Tries to parse the serialized ID as aSegmentIdof the given datasource.getValidSegmentIds(String dataSource, Set<String> serializedIds) Tries to parse the given serialized IDs asSegmentIds of the given datasource.static Stringstatic Stringstatic StringvalidateId(String thingToValidate, String stringToValidate)
-
Constructor Details
-
IdUtils
public IdUtils()
-
-
Method Details
-
validateId
-
getRandomId
-
getRandomIdWithPrefix
-
newTaskId
-
newTaskId
-
getValidSegmentId
Tries to parse the serialized ID as aSegmentIdof the given datasource.- Throws:
DruidException- if the segment ID could not be parsed.
-
getValidSegmentIds
Tries to parse the given serialized IDs asSegmentIds of the given datasource.- Returns:
- Set containing valid segment IDs.
- Throws:
DruidException- if any of the given segment IDs is invalid
-