hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Spaggiari <jean-m...@spaggiari.org>
Subject Re: how to get the number of total rows of a table
Date Thu, 22 May 2014 00:47:31 GMT
You are missing the jars in the classpath.

Try something like this:
export CLASSPATH=`hbase classpath`:`hadoop classpath`:.


2014-05-21 20:44 GMT-04:00 ch huang <justlooks@gmail.com>:

> # sudo -u hbase hadoop jar /usr/lib/hbase/hbase.jar rowcounter
> -Dmapred.map.tasks.speculative.execution=false
> -Dhbase.client.scanner.caching=100 dsp_cookie_mapping
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/hadoop/mapreduce/Job
>         at java.lang.Class.getDeclaredMethods0(Native Method)
>         at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
>         at java.lang.Class.getMethod0(Class.java:2774)
>         at java.lang.Class.getMethod(Class.java:1663)
>         at
>
> org.apache.hadoop.util.ProgramDriver$ProgramDescription.<init>(ProgramDriver.java:60)
>         at
> org.apache.hadoop.util.ProgramDriver.addClass(ProgramDriver.java:103)
>         at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:36)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.mapreduce.Job
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>         ... 12 more
> # rpm -qa|grep hbase
> hbase-regionserver-0.94.6+132-1.cdh4.4.0.p0.17.el6.x86_64
> hbase-0.94.6+132-1.cdh4.4.0.p0.17.el6.x86_64
>
>
>
> On Wed, May 21, 2014 at 7:18 PM, Jean-Marc Spaggiari <
> jean-marc@spaggiari.org> wrote:
>
> > You can use the MR method:
> >
> > hadoop jar /home/hbase/hbase-0.94.3/hbase-0.94.19.jar rowcounter
> > -Dmapred.map.tasks.speculative.execution=false
> > -Dhbase.client.scanner.caching=100 work_proposed
> >
> > JM
> >
> >
> > 2014-05-21 7:07 GMT-04:00 ch huang <justlooks@gmail.com>:
> >
> > > hi,maillist:
> > >            i use count 'table' in hbase shell,but it very slow,how can
> i
> > > get rows of a table quickly?
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message