Reputation:
I am new to apache hadoop. I am installing the multi-node cluster but I am getting two errors. I am not aware about what kind of errors these are and why they have generated.I have googled alot about the errors but I was not able to find out the reason behind the error generation.
Error:Could not find or load main class org.apache.hadoop.util.PlatformName
Error: Could not find or load main class org.apache.hadoop.hdfs.server.datanode.DataNode
Both the errors are generated due to the datanode or slaves. I need to know about the kind of errors, the reason for generation,and how to resolve them. Thank you.
Upvotes: 1
Views: 9707
Reputation: 145
Change folder which stores: hbase.zookeeper.property.dataDir
For example:
sudo mkdir hb
chown hduser:hadoop /home/hduser/hb
And in hbase-site.xml change this property
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hduser/hb/zookeeper</value>
</property>
Upvotes: 2
Reputation: 2574
Error:Could not find or load main class org.apache.hadoop.util.PlatformName
Error: Could not find or load main class org.apache.hadoop.hdfs.server.datanode.DataNode
These errors occur if Hadoop cannot find hadoop-core-1.2.1.jar
file in its classpath.
To rectify this error, you need to add this file in Hadoop classpath.
1. Copy hadoop-core-1.2.1.jar
to $HADOOP_HOME/lib folder
2. Add the following line in hadoop-env.sh
:
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HADOOP_HOME/lib/hadoop-core-1.2.1.jar
NOTE: $HADOOP_HOME should point to hadoop installation folder.
OPTIONAL: If you want to avoid other "Could not find or load main class
" error in future, just do this instead of step 2.
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HADOOP_HOME/lib/*.jar
Upvotes: 2