How Hadoop’s CLASSPATH plays a vital role in starting or stopping in Hadoop daemons?
CLASSPATH includes all directories containing jar files required to start/stop Hadoop daemons.
For example- HADOOP_HOME/share/hadoop/common/lib contains all the utility jar files. We cannot start/ stop Hadoop daemons if we don’t set CLASSPATH.
We can set CLASSPATH inside /etc/hadoop/hadoop-env.sh file. The next time you run hadoop, the CLASSPATH will automatically add. That is, you don’t need to add CLASSPATH in the parameters each time you run it.