I am trying to run the sample provided in the alex holmes book https://github.com/alexholmes/hadoop-book/blob/master/src/main/java/com/manning/hip/ch4/sort/total/TotalSortMapReduce.java
However when I run the same program after making as a jar, I am getting an exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.hadoop.mapred.lib.InputSampler.writePartitionFile(InputSampler.java:338) at com.manning.hip.ch4.sort.total.TotalSortMapReduce.runSortJob(TotalSortMapReduce.java:44) at com.manning.hip.ch4.sort.total.TotalSortMapReduce.main(TotalSortMapReduce.java:12)
Can someone please help me in understanding how to run the code. I have provided the following arguments. args[0] --> the input path to names.txt(file which needs to be sorted). Its in hadoop.
args[1]--> the sample partition file which should be generated. Path of hadoop.
args[2]--> the output directory where the sorted file shold be genrated.
Please guide me the way I need to run this code.