• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

expected output not resulted after execution of a mapreduce job. How to get the required output?

 
somasekhar giddaluri
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



input file( dilinput.txt):


Execution:


OUTPUT I GOT:



ACCORDING TO LOGIC IN THE PROGRAM, IT HAS TO GIVE OUTPUT AS

good 7.000000 15.000000 12.000000
(label) (avg of 8,6) (max of 11,15) (min of 12,14,17)
(Here first one is label , second one is average, third one is maximum, fourth one is minimum)


for a line below:

8,6 11,15 12,14,17 good


IT SHOULD GIVE OUTPUT SAME AS ABOVE FOR ALL THE LINES.


SO, PL. RECTIFY THE PROBLEM AND SUGGEST SOMETHING to get the required output.
*/

 
abhi k tripathi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I understand correct. Your program using the "," and "\t" to delimit the fields.
scanner.useDelimiter("\t");

If you see your input the data, there are some data which are not follow the syntax.
1,2 23,17,15 11,9 good
12 11,8 12,7,8 ill
14,12,9 8,6,4 24,18 ill


First you have write the command to filter the data from the input file first. You can use hasNextInt() function to filter the numeric values.

Hope this helpful for you.

You can learn more about mapreduce working. Here are some free tutorials you can look:
https://www.dezyre.com//hadoop-tutorial/hadoop-mapreduce-tutorial
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic