I have added the HADOOP_CLASSPATH variable in hadoop-env.sh (before it has been 
used in the file) and I still get the same error.
Have you got another idea?

On 2018/10/14 16:49:04, ITD <itdir...@mail.ru.INVALID> wrote: 
> It should be possible to add directories to classpath using HADOOP_CLASSPATH, 
> set in etc/hadoop/hadoop-env.sh.
> 
> 
> >Воскресенье, 14 октября 2018, 19:32 +03:00 от r...@post.bgu.ac.il 
> ><r...@post.bgu.ac.il>:
> >
> >So how should I configure it?
> >I looked over here  
> >https://stackoverflow.com/questions/28260653/where-is-the-classpath-set-for-hadoop
> > to Siva's answer and the output of ($HADOOP+HOME/bin/hadoop classpath) is :
> >
> >hadoop2@master:~$ $HADOOP_HOME/bin/hadoop classpath
> >/usr/local/hadoop-2.9.1/etc/hadoop:/usr/local/hadoop-2.9.1/share/hadoop/common/lib/*:/usr/local/hadoop-2.9.1/share/hadoop/common/*:/usr/local/hadoop-2.9.1/share/hadoop/hdfs:/usr/local/hadoop-2.9.1/share/hadoop/hdfs/lib/*:/usr/local/hadoop-2.9.1/share/hadoop/hdfs/*:/usr/local/hadoop-2.9.1/share/hadoop/yarn/lib/*:/usr/local/hadoop-2.9.1/share/hadoop/yarn/*:/usr/local/hadoop-2.9.1/share/hadoop/mapreduce/lib/*:/usr/local/hadoop-2.9.1/share/hadoop/mapreduce/*:/usr/local/hadoop-2.9.1/contrib/capacity-scheduler/*.jar
> >
> >But the problem stayed the same. 
> >How should I configure the classpath to be what you suggested?
> >
> >P.S 
> >hadoop2@master:~$ $HADOOP_HOME/bin/hadoop jar 
> >$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar 
> >org.apache.hadoop.examples.Grep input output 'dfs[a-z.]+'
> >Error: Could not find or load main class org.apache.hadoop.util.RunJar
> >
> >
> >On 2018/10/14 15:55:06, ITD < itdir...@mail.ru.INVALID > wrote: 
> >> Try and check your classpath, it looks a bit strange:
> >> 
> >> /usp/hdfs: what's this?
> >> 
> >> Working classpath is:
> >> /usr/local/hadoop/etc/hadoop:\
> >> /usr/local/hadoop/share/hadoop/common/lib/*:\
> >> /usr/local/hadoop/share/hadoop/common/*:\
> >> /usr/local/hadoop/share/hadoop/hdfs:\
> >> /usr/local/hadoop/share/hadoop/hdfs/lib/*:\
> >> /usr/local/hadoop/share/hadoop/hdfs/*:\
> >> /usr/local/hadoop/share/hadoop/mapreduce/lib/*:\
> >> /usr/local/hadoop/share/hadoop/mapreduce/*:\
> >> /usr/local/hadoop/share/hadoop/yarn:\
> >> /usr/local/hadoop/share/hadoop/yarn/lib/*:\
> >> /usr/local/hadoop/share/hadoop/yarn/*
> >> 
> >> 
> >> 
> >> >Воскресенье, 14 октября 2018, 18:26 +03:00 от  r...@post.bgu.ac.il < 
> >> >r...@post.bgu.ac.il >:
> >> >
> >> >I tried, I still get the same error.
> >> >
> >> >On 2018/10/14 15:18:57, ITD <  itdir...@mail.ru.INVALID > wrote: 
> >> >> Class names are case-sensitive in Java, so try
> >> >> 
> >> >> $HADOOP_HOME/bin/hadoop jar 
> >> >> $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.9.1.jar 
> >> >> Grep input output 'dfs[a-z.]+'
> >> >> 
> >> >> >Воскресенье, 14 октября 2018, 18:04 +03:00 от Or Raz <  
> >> >> >r...@post.bgu.ac.il >:
> >> >> >
> >> >> >I am using Hadoop 2.9.1 standalone (the folder I am using is after 
> >> >> >successful compilation of the source code) and whenever I run a Hadoop 
> >> >> >command such as (where$HADOOP_HOME= /usr/local/hadoop, the directory 
> >> >> >of Hadoop)
> >> >> >$HADOOP_HOME/bin/hadoop jar 
> >> >> >$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.9.1.jar
> >> >> > grep input output 'dfs[a-z.]+'
> >> >> >I get this error :
> >> >> >>Error: Could not find or load main class org.apache.hadoop.util.RunJar
> >> >> >At first, I was thinking that I am missing some environment variables 
> >> >> >but are they necessary for the standalone case? Why did I get this 
> >> >> >error? (I even replaced with another example, I believe it is a 
> >> >> >classpath problem)
> >> >> >
> >> >> >hadoop2@master:/usr/local/hadoop-2.9.1$ bin/hadoop classpath
> >> >> >/usr/local/hadoop-2.9.1/etc/hadoop:/usr/local/hadoop-2.9.1/share/hadoop/common/lib/*:/usr/local/hadoop-2.9.1/share/hadoop/common/*:/usr/local/hadoop-2.9.1/share/hadoop/hdfs:/usp/hdfs/*:/usr/local/hadoop-2.9.1/share/hadoop/yarn/lib/*:/usr/local/hadoop-2.9.1/share/hadoop/yarn/*:/usr/local/hadoop-2.9.1/share/hadoop/mapreduce/lib/*:/usr/local/hadoop-2.9.jar
> >> >> 
> >> >> 
> >> >> 
> >> >> 
> >> >
> >> >---------------------------------------------------------------------
> >> >To unsubscribe, e-mail:  user-unsubscr...@hadoop.apache.org
> >> >For additional commands, e-mail:  user-h...@hadoop.apache.org
> >> >
> >> 
> >> 
> >> 
> >> 
> >> 
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail:  user-unsubscr...@hadoop.apache.org
> >For additional commands, e-mail:  user-h...@hadoop.apache.org
> >
> 
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@hadoop.apache.org
For additional commands, e-mail: user-h...@hadoop.apache.org

Reply via email to