Re: Describing key value pairs

2010-09-07 Thread Harsh J
There's jc.setMapOutput{Key, Value} methods you can use for this. Harsh J http://harshj.com On 8 Sep 2010 10:21, "Clarence Gardner" wrote: I'm writing my first m/r program, and seem to be having problems describing the types of my key-value pairs. I have this mapper public static class Map

Describing key value pairs

2010-09-07 Thread Clarence Gardner
I'm writing my first m/r program, and seem to be having problems describing the types of my key-value pairs. I have this mapper public static class Map extends Mapper and this reducer public static class Reduce extends Reducer and this in my run() method job.setMapperClass

Re: Adding log messages to src files, but they don't appear in logs ...

2010-09-07 Thread Rita Liu
Actually, I did, but still couldn't find my log messages. I'll double check and reply to this thread later tonight, but I am pretty sure that they are not there either :S Please help? Thanks a lot! -Rita :S On Tue, Sep 7, 2010 at 10:46 AM, Owen O'Malley wrote: > > On Sep 7, 2010, at 9:59 AM, R

Understanding FileInputFormat and isSplittable.

2010-09-07 Thread Niels Basjes
Hi, The last few weeks we built an application using Hadoop. Because we're implementing against special logfiles (line oriented, textual and gzipped) and we wanted to extract specific fields from those file before putting it into our mapper. We chose to implement our own derivative of the FileInpu

Re: Adding log messages to src files, but they don't appear in logs ...

2010-09-07 Thread Owen O'Malley
On Sep 7, 2010, at 9:59 AM, Rita Liu wrote: Hi all, I still have the same problem -- So far I've added some log messages to WordCount.java and JobClient.java with "info" level, but none of them shows in any of the logs (JobTracker, TaskTracker, Namenode, Datanode, SecondaryNamenode) unde

Adding log messages to src files, but they don't appear in logs ...

2010-09-07 Thread Rita Liu
Hi all, I still have the same problem -- So far I've added some log messages to WordCount.java and JobClient.java with "info" level, but none of them shows in any of the logs (JobTracker, TaskTracker, Namenode, Datanode, SecondaryNamenode) under logs/. However, when I add a log message with the sa

Re: How to use distributed cache api

2010-09-07 Thread Arun C Murthy
On Sep 7, 2010, at 6:02 AM, Cristi Cioriia wrote: So I guess what I would like to have is something like DistributedCache.addCacheFile(new URI("/user/ccioriia/storage-conf.xml#storage-conf.xml"), conf); which would also add it to the classpath so that the call DatabaseDescriptor.class.getClassLo

Re: Log4j Logger in MapReduce applications

2010-09-07 Thread Rita Liu
Hi :) I did check stdout under userlogs, but it's empty. If I want to see the log messages I add to mapper and reducer, should I check them only in the runtime? Thanks a lot! On Sun, Sep 5, 2010 at 10:59 PM, Rita Liu wrote: > Thanks so much for the kind reply! :) I looked at the web ui of jobtr

Re: How to use distributed cache api

2010-09-07 Thread Ted Yu
Consider using the following to retrieve file: Path[] cacheFiles=DistributedCache.getFileClassPaths(conf); BufferedReader joinReader=new BufferedReader(new FileReader(cacheFiles[0].toString())); On Tue, Sep 7, 2010 at 6:02 AM, Cristi Cioriia < cristian-andrei.cior...@1and1.

How to use distributed cache api

2010-09-07 Thread Cristi Cioriia
Hi guys, I want to distribute an xml file to the tasks of a MR job and then be able to retrieve it using code like this: DatabaseDescriptor.class.getClassLoader().getResource("storage-conf.xml"); where DatabaseDescriptor is a class. In order to do that I added the file to the distributed cache