You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Marcos Ortiz <ml...@uci.cu> on 2012/02/29 15:14:07 UTC

Re: Hadoop 0.23.1 installation

On 03/01/2012 04:48 AM, raghavendhra rahul wrote:
> Hi,
>        I tried to configure hadoop 0.23.1.I added all libs from share 
> folder to lib directory.But still i get the error while formating the 
> namenode
>
>
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/apache/hadoop/hdfs/server/namenode/NameNode
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.hadoop.hdfs.server.namenode.NameNode
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> Could not find the main class: 
> org.apache.hadoop.hdfs.server.namenode.NameNode. Program will exit.
>
>
> Any help???
Can you show us here your .conf files?
core-site.xml
mapred-site.xml
hdfs-site.xml

Which is your configuration for your conf/hadoop-env.sh?

Regards

-- 
Marcos Luis Ortíz Valmaseda
  Sr. Software Engineer (UCI)
  http://marcosluis2186.posterous.com
  http://postgresql.uci.cu/blog/38



Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com

Re: Hadoop 0.23.1 installation

Posted by raghavendhra rahul <ra...@gmail.com>.
I have made simple configurations for testing

core-site.xml
<?xml version="1.0"?>
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>

mapred-site.xml
<?xml version="1.0"?>
<configuration>
<property>
<name> mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

hdfs-site.xml
<?xml version="1.0"?>
<?xml-stylesheet href="configuration.xsl"?>
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
</configuration>

hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
export HADOOP_DEV_HOME=/home/hadoop1/hadoop-0.23.1
export HADOOP_MAPRED_HOME=${HADOOP_DEV_HOME}
export HADOOP_COMMON_HOME=${HADOOP_DEV_HOME}
export HADOOP_HDFS_HOME=${HADOOP_DEV_HOME}
export YARN_HOME=${HADOOP_DEV_HOME}
export HADOOP_CONF_DIR=${HADOOP_DEV_HOME}/conf/
export YARN_CONF_DIR=${HADOOP_DEV_HOME}/conf/


I tried to format using the command bin/hadoop namenode -format



On Fri, Mar 2, 2012 at 7:56 AM, Wellington Chevreuil <
wellington.chevreuil@gmail.com> wrote:

> Hi,
>
> can you tell us how are you trying to format your hdfs? As it´s a
> NoClassDefFoundError, probably your hadoop lib is not on your
> classpath.
>
> Thanks,
> Wellington.
>
> 2012/2/29 Marcos Ortiz <ml...@uci.cu>:
> > On 03/01/2012 04:48 AM, raghavendhra rahul wrote:
> >>
> >> Hi,
> >>       I tried to configure hadoop 0.23.1.I added all libs from share
> >> folder to lib directory.But still i get the error while formating the
> >> namenode
> >>
> >>
> >> Exception in thread "main" java.lang.NoClassDefFoundError:
> >> org/apache/hadoop/hdfs/server/namenode/NameNode
> >> Caused by: java.lang.ClassNotFoundException:
> >> org.apache.hadoop.hdfs.server.namenode.NameNode
> >>    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> >>    at java.security.AccessController.doPrivileged(Native Method)
> >>    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> >>    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> >>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> >>    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> >> Could not find the main class:
> >> org.apache.hadoop.hdfs.server.namenode.NameNode. Program will exit.
> >>
> >>
> >> Any help???
> >
> > Can you show us here your .conf files?
> > core-site.xml
> > mapred-site.xml
> > hdfs-site.xml
> >
> > Which is your configuration for your conf/hadoop-env.sh?
> >
> > Regards
> >
> > --
> > Marcos Luis Ortíz Valmaseda
> >  Sr. Software Engineer (UCI)
> >  http://marcosluis2186.posterous.com
> >  http://postgresql.uci.cu/blog/38
> >
> >
> >
> > Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE
> > ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
> > http://www.antiterroristas.cu
> > http://justiciaparaloscinco.wordpress.com
>

Re: Hadoop 0.23.1 installation

Posted by Wellington Chevreuil <we...@gmail.com>.
Hi,

can you tell us how are you trying to format your hdfs? As it´s a
NoClassDefFoundError, probably your hadoop lib is not on your
classpath.

Thanks,
Wellington.

2012/2/29 Marcos Ortiz <ml...@uci.cu>:
> On 03/01/2012 04:48 AM, raghavendhra rahul wrote:
>>
>> Hi,
>>       I tried to configure hadoop 0.23.1.I added all libs from share
>> folder to lib directory.But still i get the error while formating the
>> namenode
>>
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/hadoop/hdfs/server/namenode/NameNode
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.hadoop.hdfs.server.namenode.NameNode
>>    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>>    at java.security.AccessController.doPrivileged(Native Method)
>>    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>>    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>>    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>> Could not find the main class:
>> org.apache.hadoop.hdfs.server.namenode.NameNode. Program will exit.
>>
>>
>> Any help???
>
> Can you show us here your .conf files?
> core-site.xml
> mapred-site.xml
> hdfs-site.xml
>
> Which is your configuration for your conf/hadoop-env.sh?
>
> Regards
>
> --
> Marcos Luis Ortíz Valmaseda
>  Sr. Software Engineer (UCI)
>  http://marcosluis2186.posterous.com
>  http://postgresql.uci.cu/blog/38
>
>
>
> Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE
> ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
> http://www.antiterroristas.cu
> http://justiciaparaloscinco.wordpress.com