Package org.apache.druid.segment
Class SegmentUtils
java.lang.Object
org.apache.druid.segment.SegmentUtils
Utility methods useful for implementing deep storage extensions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectcommaSeparatedIdentifiers(Collection<DataSegment> segments) Returns an object whose toString() returns a String with identifiers of the given segments, comma-separated.static intgetVersionFromDir(File inDir) static Map<org.joda.time.Interval,List<DataSegment>> groupSegmentsByInterval(Collection<DataSegment> segments) static StringhashIds(List<DataSegment> segments) Hash the IDs of the given segments based on SHA-256 algorithm.
-
Method Details
-
hashIds
Hash the IDs of the given segments based on SHA-256 algorithm. -
getVersionFromDir
- Throws:
IOException
-
commaSeparatedIdentifiers
@Nullable public static Object commaSeparatedIdentifiers(@Nullable Collection<DataSegment> segments) Returns an object whose toString() returns a String with identifiers of the given segments, comma-separated. Useful for log messages. Not useful for anything else, because this doesn't take special effort to escape commas that occur in identifiers (not common, but could potentially occur in a datasource name). -
groupSegmentsByInterval
public static Map<org.joda.time.Interval,List<DataSegment>> groupSegmentsByInterval(Collection<DataSegment> segments)
-