Re: Creation of an empty output directory in hadoop filesystem

2015-01-12 Thread meenakshi Lakshmanan
This causes ArrayIndexOutOfBound Exception which was the reason to  generate empty directory  line.substring(i,2) should be line.substring(i,i+2); as substring takes start and end index as parameters Thanks,   L.Meenakshi On Wednesday, January 7, 2015 7:42 PM, Vandana kumari

Creation of an empty output directory in hadoop filesystem

2015-01-07 Thread Vandana kumari
Hello all, I had written a kmer mapreduce program in java. There is no error in the program and while running it creates an output directory in hadoop file system but that directory is empty. Please help to resolve this issue. Input file(test.txt) and kmer.java is attached herewith. -- Thanks

Re: Creation of an empty output directory in hadoop filesystem

2015-01-07 Thread saurabh chhajed
Can you attach .java file instead of .class ? On Wed, Jan 7, 2015 at 4:04 PM, Vandana kumari kvandana1...@gmail.com wrote: Hello all, I had written a kmer mapreduce program in java. There is no error in the program and while running it creates an output directory in hadoop file system but

Re: Creation of an empty output directory in hadoop filesystem

2015-01-07 Thread Shahab Yunus
First try: You should use @Override annotation before map and reduce methods so they are actually called. Like this: *@Override* public void map(LongWritable k,Text v,Context con)throws IOException,InterruptedException {... Do same for 'reduce' method. Regards, Shahab On Wed, Jan 7,

Re: Creation of an empty output directory in hadoop filesystem

2015-01-07 Thread Vandana kumari
I had made changes in the file but still nothing happens. Please help i am beginner in this. kmer.java is attached herewith. On Wed, Jan 7, 2015 at 7:03 PM, Vandana kumari kvandana1...@gmail.com wrote: yes, there is no compilation error. But thank you for finding mistakes, i will make the

Re: Creation of an empty output directory in hadoop filesystem

2015-01-07 Thread Vandana kumari
yes, there is no compilation error. But thank you for finding mistakes, i will make the above changes and let you all know. On Wed, Jan 7, 2015 at 6:52 PM, Shahab Yunus shahab.yu...@gmail.com wrote: Vandana, Also, in the code that you attached, I see 2 compilation errors. How is it even

Re: Creation of an empty output directory in hadoop filesystem

2015-01-07 Thread Vandana kumari
On Wed, Jan 7, 2015 at 4:16 PM, saurabh chhajed schhajed@gmail.com wrote: Can you attach .java file instead of .class ? On Wed, Jan 7, 2015 at 4:04 PM, Vandana kumari kvandana1...@gmail.com wrote: Hello all, I had written a kmer mapreduce program in java. There is no error in the

Re: Creation of an empty output directory in hadoop filesystem

2015-01-07 Thread Shahab Yunus
Vandana, Also, in the code that you attached, I see 2 compilation errors. How is it even compiling? Or am I missing something here? 1- The 'sum' is not declared in the Map class. 2- The 'sum' in the Reduce class, when written to the context needs to be IntWritable and not directly an int.

Re: Creation of an empty output directory in hadoop filesystem

2015-01-07 Thread Dieter De Witte
Hi, Does this even compile? In the mapper the variable sum doesn't seem to be defined? con.write(new Text(y), new IntWritable(sum)); 2015-01-07 13:58 GMT+01:00 Vandana kumari kvandana1...@gmail.com: On Wed, Jan 7, 2015 at 4:16 PM, saurabh chhajed schhajed@gmail.com wrote: Can you