I am running hadoop wordcount example in single node environment on ubuntu 12.04 in vmware. i running the example like this:--
hadoop@master:~/hadoop$ hadoop
If you've created your own .jar and is trying to run it, pay attention:
In order the run your job, you had to have written something like this:
hadoop jar
But if you take a closer look to your driver code, you'll see that you have set arg[0]
as your input and arg[1]
as your output... I'll show it:
FileInputFormart.addInputPath(conf, new Path(args[0]));
FileOutFormart.setOutputPath(conf, new Path(args[1]));
But, hadoop is taking arg[0
] as
instead of
and arg[1] as
instead of
So, in order to make it work, you should use:
FileInputFormart.addInputPath(conf, new Path(args[1]));
FileOutFormart.setOutputPath(conf, new Path(args[2]));
With arg[1]
and arg[2]
, so it'll get the right things! :)
Hope it helped. Cheers.