Class SegmentUtils


  • public class SegmentUtils
    extends Object
    Utility methods useful for implementing deep storage extensions.
    • Method Detail

      • hashIds

        public static String hashIds​(List<DataSegment> segments)
        Hash the IDs of the given segments based on SHA-256 algorithm.
      • 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).