Class ExternalSortByteArray


  • public class ExternalSortByteArray
    extends java.lang.Object
    Variation of ExternalSort that stores the lines read from intermediate files as byte arrays to avoid the conversion from byte[] to String and then back.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> void mergeSortedFilesBinary​(java.util.List<java.nio.file.Path> files, java.io.OutputStream fbw, java.util.Comparator<T> cmp, boolean distinct, Compression algorithm, java.util.function.Function<T,​byte[]> typeToByteArray, java.util.function.Function<byte[],​T> byteArrayToType)  
      static <T> void mergeSortedFilesBinary​(java.util.List<java.nio.file.Path> files, java.io.OutputStream fbw, java.util.Comparator<T> cmp, boolean distinct, Compression algorithm, java.util.function.Function<T,​byte[]> typeToByteArray, java.util.function.Function<byte[],​T> byteArrayToType, int readBufferSize)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExternalSortByteArray

        public ExternalSortByteArray()
    • Method Detail

      • mergeSortedFilesBinary

        public static <T> void mergeSortedFilesBinary​(java.util.List<java.nio.file.Path> files,
                                                      java.io.OutputStream fbw,
                                                      java.util.Comparator<T> cmp,
                                                      boolean distinct,
                                                      Compression algorithm,
                                                      java.util.function.Function<T,​byte[]> typeToByteArray,
                                                      java.util.function.Function<byte[],​T> byteArrayToType)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • mergeSortedFilesBinary

        public static <T> void mergeSortedFilesBinary​(java.util.List<java.nio.file.Path> files,
                                                      java.io.OutputStream fbw,
                                                      java.util.Comparator<T> cmp,
                                                      boolean distinct,
                                                      Compression algorithm,
                                                      java.util.function.Function<T,​byte[]> typeToByteArray,
                                                      java.util.function.Function<byte[],​T> byteArrayToType,
                                                      int readBufferSize)
                                               throws java.io.IOException
        Throws:
        java.io.IOException