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 Plain View
Hadoop >> mail # user >> how to sort the output by vlaue in reduce instead of by key?


+
leibnitz 2011-04-11, 06:32
Copy link to this message
-
Re: how to sort the output by vlaue in reduce instead of by key?
Your field1 data can be split over multiple reducers. Is it possible to emit
field1 as the key from the reducer (in case you do not need the ip anymore)?
________________________________
From: leibnitz <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Mon, 11 April, 2011 12:02:46 PM
Subject: how to sort the output by vlaue in reduce instead of by key?

yes,my key is ip,and value is a object(which inherited hadoop Record
class,and will be converted
a visualized data),e.g.:
key                   field1,field2,field3(these are properties belong to
object)
12.121.23.121 121,11,/img/dd.jpg
32.121.23.222 221,11,/img/xx.jpg

1.i want to sort by field1 ,but it is sorted by key in reduce by default,how
to do?
2.by the way,when my value(object) inherited to the Record,why the output
sequence are:
data1

data2
...
--
View this message in context:
http://lucene.472066.n3.nabble.com/how-to-sort-the-output-by-vlaue-in-reduce-instead-of-by-key-tp2805541p2805541.html

Sent from the Hadoop lucene-users mailing list archive at Nabble.com.
+
sumit ghosh 2011-04-11, 09:33
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