You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Sznajder ForMailingList <bs...@gmail.com> on 2013/10/30 11:36:27 UTC
'$HADOOP_HOME/bin/hadoop jar hbase.jar rowcount
Hi
I tried to run the hadoop rowcount job
First at all, I just notice that the command is rowcounter and not rowcount.
secondly, I got the following error when running it:
hadoop jar hbase-0.90.4.jar rowcounter ProcessedUrlsDataBase
Exception in thread "main" java.lang.NoClassDefFoundError:
org.apache.zookeeper.ZooKeeper
at
org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(TableMapReduceUtil.java:319)
at
org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:109)
at
org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:75)
at
org.apache.hadoop.hbase.mapreduce.RowCounter.createSubmittableJob(RowCounter.java:113)
at
org.apache.hadoop.hbase.mapreduce.RowCounter.main(RowCounter.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at
org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.ZooKeeper
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
Where should I define the used classpath?
Benjamin
Re: '$HADOOP_HOME/bin/hadoop jar hbase.jar rowcount
Posted by Shakti garg <sh...@gmail.com>.
Hi
Add zookeeper jar to classpath. There are two ways of adding zookeeper jar
1. Add zookeeper jar to $(HADOOP-HOME)/lib
2. As hadoop command is an abstraction over java command, use -cp option as
in java
Thanks
On Oct 30, 2013 4:07 PM, "Sznajder ForMailingList" <bs...@gmail.com>
wrote:
> Hi
>
> I tried to run the hadoop rowcount job
>
>
> First at all, I just notice that the command is rowcounter and not
> rowcount.
>
> secondly, I got the following error when running it:
>
> hadoop jar hbase-0.90.4.jar rowcounter ProcessedUrlsDataBase
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org.apache.zookeeper.ZooKeeper
> at
>
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(TableMapReduceUtil.java:319)
> at
>
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:109)
> at
>
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:75)
> at
>
> org.apache.hadoop.hbase.mapreduce.RowCounter.createSubmittableJob(RowCounter.java:113)
> at
> org.apache.hadoop.hbase.mapreduce.RowCounter.main(RowCounter.java:133)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:611)
> at
>
> org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
> at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
> at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:49)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:611)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.ZooKeeper
> at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
>
>
>
>
> Where should I define the used classpath?
>
> Benjamin
>
Re: '$HADOOP_HOME/bin/hadoop jar hbase.jar rowcount
Posted by Ted Yu <yu...@gmail.com>.
Have you tried prefixing your command with HADOOP_CLASSPATH=`hbase
classpath` ?
DebugURL, I assume, is a table in your cluster.
BTW 0.90.4 is really old and not actively supported.
On Tue, Nov 12, 2013 at 8:21 AM, Sznajder ForMailingList <
bs4mailinglist@gmail.com> wrote:
> Hi,
>
> Finally, I reached the following:
>
> Typing
> hadoop jar hbase-0.90.4 rowcounter
>
> prints the expected error message:
> ERROR: Wrong number of parameters: 0
> Usage: RowCounter <tablename> [<column1> <column2>...]
>
>
> However, when I call
> hadoop jar hbase-0.90.4.jar rowcounter DebugURL
>
> The process does not do anything....
>
> Benjamin
>
>
> On Wed, Oct 30, 2013 at 3:55 PM, Ted Yu <yu...@gmail.com> wrote:
>
> > See http://hbase.apache.org/book.html#trouble.mapreduce.local for sample
> > command line.
> >
> > Cheers
> >
> >
> > On Wed, Oct 30, 2013 at 3:36 AM, Sznajder ForMailingList <
> > bs4mailinglist@gmail.com> wrote:
> >
> > > Hi
> > >
> > > I tried to run the hadoop rowcount job
> > >
> > >
> > > First at all, I just notice that the command is rowcounter and not
> > > rowcount.
> > >
> > > secondly, I got the following error when running it:
> > >
> > > hadoop jar hbase-0.90.4.jar rowcounter ProcessedUrlsDataBase
> > > Exception in thread "main" java.lang.NoClassDefFoundError:
> > > org.apache.zookeeper.ZooKeeper
> > > at
> > >
> > >
> >
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(TableMapReduceUtil.java:319)
> > > at
> > >
> > >
> >
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:109)
> > > at
> > >
> > >
> >
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:75)
> > > at
> > >
> > >
> >
> org.apache.hadoop.hbase.mapreduce.RowCounter.createSubmittableJob(RowCounter.java:113)
> > > at
> > > org.apache.hadoop.hbase.mapreduce.RowCounter.main(RowCounter.java:133)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
> > >
> > >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> > > at
> > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> > > at java.lang.reflect.Method.invoke(Method.java:611)
> > > at
> > >
> > >
> >
> org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
> > > at
> > org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
> > > at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:49)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
> > >
> > >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> > > at
> > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> > > at java.lang.reflect.Method.invoke(Method.java:611)
> > > at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> > > Caused by: java.lang.ClassNotFoundException:
> > org.apache.zookeeper.ZooKeeper
> > > at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
> > >
> > >
> > >
> > >
> > > Where should I define the used classpath?
> > >
> > > Benjamin
> > >
> >
>
Re: '$HADOOP_HOME/bin/hadoop jar hbase.jar rowcount
Posted by Sznajder ForMailingList <bs...@gmail.com>.
Hi,
Finally, I reached the following:
Typing
hadoop jar hbase-0.90.4 rowcounter
prints the expected error message:
ERROR: Wrong number of parameters: 0
Usage: RowCounter <tablename> [<column1> <column2>...]
However, when I call
hadoop jar hbase-0.90.4.jar rowcounter DebugURL
The process does not do anything....
Benjamin
On Wed, Oct 30, 2013 at 3:55 PM, Ted Yu <yu...@gmail.com> wrote:
> See http://hbase.apache.org/book.html#trouble.mapreduce.local for sample
> command line.
>
> Cheers
>
>
> On Wed, Oct 30, 2013 at 3:36 AM, Sznajder ForMailingList <
> bs4mailinglist@gmail.com> wrote:
>
> > Hi
> >
> > I tried to run the hadoop rowcount job
> >
> >
> > First at all, I just notice that the command is rowcounter and not
> > rowcount.
> >
> > secondly, I got the following error when running it:
> >
> > hadoop jar hbase-0.90.4.jar rowcounter ProcessedUrlsDataBase
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > org.apache.zookeeper.ZooKeeper
> > at
> >
> >
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(TableMapReduceUtil.java:319)
> > at
> >
> >
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:109)
> > at
> >
> >
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:75)
> > at
> >
> >
> org.apache.hadoop.hbase.mapreduce.RowCounter.createSubmittableJob(RowCounter.java:113)
> > at
> > org.apache.hadoop.hbase.mapreduce.RowCounter.main(RowCounter.java:133)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> > at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> > at java.lang.reflect.Method.invoke(Method.java:611)
> > at
> >
> >
> org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
> > at
> org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
> > at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:49)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> > at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> > at java.lang.reflect.Method.invoke(Method.java:611)
> > at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> > Caused by: java.lang.ClassNotFoundException:
> org.apache.zookeeper.ZooKeeper
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
> >
> >
> >
> >
> > Where should I define the used classpath?
> >
> > Benjamin
> >
>
Re: '$HADOOP_HOME/bin/hadoop jar hbase.jar rowcount
Posted by Ted Yu <yu...@gmail.com>.
See http://hbase.apache.org/book.html#trouble.mapreduce.local for sample
command line.
Cheers
On Wed, Oct 30, 2013 at 3:36 AM, Sznajder ForMailingList <
bs4mailinglist@gmail.com> wrote:
> Hi
>
> I tried to run the hadoop rowcount job
>
>
> First at all, I just notice that the command is rowcounter and not
> rowcount.
>
> secondly, I got the following error when running it:
>
> hadoop jar hbase-0.90.4.jar rowcounter ProcessedUrlsDataBase
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org.apache.zookeeper.ZooKeeper
> at
>
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(TableMapReduceUtil.java:319)
> at
>
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:109)
> at
>
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:75)
> at
>
> org.apache.hadoop.hbase.mapreduce.RowCounter.createSubmittableJob(RowCounter.java:113)
> at
> org.apache.hadoop.hbase.mapreduce.RowCounter.main(RowCounter.java:133)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:611)
> at
>
> org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
> at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
> at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:49)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:611)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.ZooKeeper
> at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
>
>
>
>
> Where should I define the used classpath?
>
> Benjamin
>