Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> How can I sort a file with pairs <Key Value> in reverse order?


Copy link to this message
-
How can I sort a file with pairs <Key Value> in reverse order?
I created a MapReduce job example that that uses the sort mechanism of
hadoop to sort a file by the key in ascending order. This is an example of
the data:

7    vim
2    emacs
9    firefox

At the end, I get the result:

2    emacs
7    vim
 9    firefox

Now I want to sort in reverse order, for the result be:
9    firefox
7    vim
2    emacs

How can I sort a file with pairs <Key Value> in reverse order?

--
Best regards,
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB