Name | Type | Description |
|---|---|---|
sortKeys | String... | The list of fields to sort by. In the case of multiple fields, data is ordered first by the first key, then by the second, and so on. |
sortKeys | SortKey... | The list of sort keys to sort by. A SortKey contains the pair (fieldName, ordering) where fieldName is the name of a field in the input and ordering indicates whether ascending or descending order is required. In the case of multiple fields, data is ordered first by the first key, then by the second, and so on. |
maxMerge | int | Controls the maximum number of run files to merge at one time. Small values will reduce memory usage during the merge phase but can force multiple merge passes over the runs. Large values decrease the number of passes, but at a cost of memory; each run being merged will require a buffer of ioBufferSize bytes. If not set or set to zero, this first defaults to EngineConfig.sort.maxMerge. If that is also unspecified or set to zero, maxMerge is calculated by the following formula: maxMerge = sortBufferSize / ioBufferSize |
sortBuffer | String | Specifies an approximate cap on the amount of memory used by the sort. If the data is unable to fit into memory, it will be written to intermediate storage as required. Values are supplied as number strings, supporting an optional size suffix. The common suffixes K, M, and G are supported, having the expected meaning; suffixes are case-insensitive, so you may use lowercase. Omitting the suffix indicates the value is in bytes. Values are limited to the range from 1M to 2G. Values outside of this range will be adjusted to the nearest limit. If not specified or the value is zero, this first defaults to EngineConfig.sort.getSortBufferSize(). If that is also unspecified or the value is zero, this defaults to 100M. |
sortBufferSize | long | Similar to sortBuffer, the only difference is that the value is specified as a long byte count rather than a string. |
ioBuffer | String | Specifies the size of the memory buffers used for I/O operations on run files during sorting. Note that one buffer is required for each run being merged in the merge phase; this value impacts the total memory used during this phase. Values are supplied as number strings, supporting an optional size suffix. The common suffixes K, M, and G are supported, having the expected meaning; suffixes are case-insensitive. Omitting the suffix indicates the value is in bytes. If not specified or the value is zero, this first defaults to EngineConfig.sort.getIOBufferSize(). If that is also unspecified or its value is zero, this defaults to 64K. |
ioBufferSize | long | Similar to ioBuffer, the only difference is that the value is specified as a long byte count rather than a string. |
Name | Type | Get Method | Description |
input | getInput() | The data to be sorted. |
Name | Type | Get Method | Description |
output | getOutput() | The sorted data. |