If you created your own .jar and are trying to run it, note:
To do your job, you had to write something like this:
hadoop jar <jar-path> <package-path> <input-in-hdfs-path> <output-in-hdfs-path>
But if you take a closer look at your driver code , you will see that you set arg[0] and arg[1] as the output as your input ... I will show this:
FileInputFormart.addInputPath(conf, new Path(args[0])); FileOutFormart.setOutputPath(conf, new Path(args[1]));
But hasoop accepts arg[0 ] as <package-path> instead of <input-in-hdfs-path> and arg [1] as <input-in-hdfs-path> instead of <output-in-hdfs-path>
So, 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 will get the right things! :) Hope this helps. Greetings.
source share