java - Which key class is suitable for secondary sort? -


In Hadop, you can use the Directory Sort Mechanism to sort prices before being sent to the Reduce.

The way this is done in Hadop, it is that you add values ​​to sort by key, and after that there are some custom groups and compare key methods in the sorting system. There are hooks.

A key is needed which is essentially ordered by the actual key and value. To do this fast enough, I want a method of making an overall key that is necessary for the group to separate the parts It's easy to decompose and compare key methods.

What is the fastest way to do this. Is there a "out-the-box" hatop class which can help me in this or do I want to create a separate key for each map - to reduce the steps?

How can I do this if the key is actually a composite that has many parts (different reasons also need to be split)?

What do you guys suggest?

PS I wanted to add the "secondary-type" tag, but I do not have enough representatives to do this.

I was running in this situation all the time and I was tired of writing custom composite key classes A typical Tupal class was written, which is a list of objects and can act as a composite key. The list may include arbitrary number of Java primitive cover type objects. This WritableComparable application implements can be found here


Comments