I am getting - Cannot initialize Cluster

Hi, I am trying to run my map reduce program. However, getting the following error.

[dataengineer7306@cxln5 ~]$ java -jar first-hadoop-program-jar-with-dependencies.jar /home/dataengineer7306/BigData/InputFolder/inputfile.txt /home/dataengineer7306/BigData/OutputFolder/
log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses.
	at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:116)
	at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:109)
	at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:102)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1540)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1536)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1729)
	at org.apache.hadoop.mapreduce.Job.connect(Job.java:1536)
	at org.apache.hadoop.mapreduce.Job.submit(Job.java:1564)
	at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1588)
	at com.itversity.Main.run(Main.java:43)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
	at com.itversity.Main.main(Main.java:17)```

Hi Azhar,

The input and output paths should be specified using HDFS (Hadoop Distributed File System) paths rather than local file system paths.

So first you’ll need to upload the file inputfile.txt to the HDFS cluster. For that, you can refer to FAQ - How should I upload files from my local machine to CloudxLab? | CloudxLab.

Also, note that when you’ll upload the file to HDFS, it will be uploaded to your HDFS home directory until you provide the output path explicitly. So, make sure to provide the correct input path in the command.

Hope this helps! Feel free to contact us for your further queries.

Thanks&Regards,
Shubh