Skip to content

Add numeric ordering and user-defined row delimiters to sort#1

Open
markcusack wants to merge 23 commits intoalexholmes:masterfrom
markcusack:master
Open

Add numeric ordering and user-defined row delimiters to sort#1
markcusack wants to merge 23 commits intoalexholmes:masterfrom
markcusack:master

Conversation

@markcusack
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant