hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen O'Malley <omal...@apache.org>
Subject Re: OutputCollector to print only keys
Date Thu, 08 Jan 2009 16:37:46 GMT
On Jan 8, 2009, at 4:13 AM, Sandhya E wrote:

> Does Hadoop 0.18 have an outputcollector that can print out only the
> keys and supress the values. In our case we need only the keys, and
> hence we do output.collect(key, blank) and then reprocess the entire
> output file to remove trailing tabs.

If you are using TextOutputFormat, you can either emit NullWritables  
or null. So do:

output.collect(key, null);

and it should work fine.

-- Owen

View raw message