Add numeric ordering and user-defined row delimiters to sort#1
Open
markcusack wants to merge 23 commits intoalexholmes:masterfrom
Open
Add numeric ordering and user-defined row delimiters to sort#1markcusack wants to merge 23 commits intoalexholmes:masterfrom
markcusack wants to merge 23 commits intoalexholmes:masterfrom
Conversation
…ger sort ordering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Alex,
I've extended your sort command to include the ability to specify the row delimiter string, and also to provide support for numeric rather than lexicographic ordering.
The most significant change is the switch to ArrayWritables as map output keys from Text: each element of the array being a column value in the key. This allows numeric ordering to proceed in the event of ties.
I've only added support for sorting Longs, as this fits my requirements right now in terms of precision and scale. I did consider using BigDecimal to extend the support to fractional digits of precision, but I didn't want to compromise on performance.
I also added a switch for setting the mapred.task.timeout property, as I've seen reducer timeout issues on sorting larger files ~200GB on a single 8-core older machine.
Btw, I noticed that umask 022 needs to be set in the session prior to running the tests in order for the total order sort tests to complete.
Cheers,
Mark