Class ExternalSortByteArray
java.lang.Object
org.apache.jackrabbit.oak.commons.sort.ExternalSortByteArray
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
mergeSortedFilesBinary
(List<Path> files, OutputStream fbw, Comparator<T> cmp, boolean distinct, Compression algorithm, Function<T, byte[]> typeToByteArray, Function<byte[], T> byteArrayToType) static <T> void
mergeSortedFilesBinary
(List<Path> files, OutputStream fbw, Comparator<T> cmp, boolean distinct, Compression algorithm, Function<T, byte[]> typeToByteArray, Function<byte[], T> byteArrayToType, int readBufferSize)
-
Constructor Details
-
ExternalSortByteArray
public ExternalSortByteArray()
-
-
Method Details
-
mergeSortedFilesBinary
public static <T> void mergeSortedFilesBinary(List<Path> files, OutputStream fbw, Comparator<T> cmp, boolean distinct, Compression algorithm, Function<T, byte[]> typeToByteArray, Function<byte[], throws IOExceptionT> byteArrayToType) - Throws:
IOException
-
mergeSortedFilesBinary
public static <T> void mergeSortedFilesBinary(List<Path> files, OutputStream fbw, Comparator<T> cmp, boolean distinct, Compression algorithm, Function<T, byte[]> typeToByteArray, Function<byte[], throws IOExceptionT> byteArrayToType, int readBufferSize) - Throws:
IOException
-