You can reference the below steps:
Step 1: Copy the code to you eclipse and export the jar.
Now for exporting the jar part, you should do this:
Now, browse to where you want to save the jar file.
Step 2: Copy the dataset to the hdfs using the below command:
hadoop fs -put wordcountproblem
Step 3: Check if dataset was stored in hdfs:
Step 4: Execute the MapReduce code:
Syntax:
hadoop jar jar_name package_name.class_name input_path_in_hdfs output_path_in_hdfs
Step 8: Check the output directory for your output