Dear Learner,
We hope you are doing good.
Please follow the steps to execute the program:
(i) Create a directory in hdfs using the following command: hadoop fs -mkdir /<dir name>
(ii) Transfer the images into that directory by using the below command:
hadoop fs -put <path of the image> /<dir name>
(iii) Now create a text file and put the path of the images and transfer it to hdfs. For ex: in my case the directory name is seq and the name of the image is Edureka1.gif. So, in the text file we have to mention as : /seq/Edureka1.gif
Similarly for second and third image mention the directory name and file name.
(iv) Now create the jar file of BinaryFilesToHadoopSequenceFile program and execute the below command:
hadoop jar <jar name> <name of text file> <output file>
The output file which you will get will be in binary format.
(v) Now import the ImageDriver.java , ImageDuplicatesMapper.java and ImageDupsReducer.java into Eclipse and create the jar file and give the input file which we have got as the output of BinaryFilesToHadoopSequenceFile program and give the below command:
hadoop jar <jar name> <output of BinaryFilesToHadoopSequenceFile program > <output file>
Please try this and let us know if you face any issue.