You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Dhaval Shah <pr...@yahoo.co.in> on 2012/06/25 01:43:09 UTC
Re:: Rows count
Instead of the shell rowcount you can use the MR job for rowcount.. something like
hadoop jar path_to_hbase.jar rowcount your_table
The MR job is much faster than the shell
------------------------------
On Mon 25 Jun, 2012 4:52 AM IST Jean-Marc Spaggiari wrote:
>Hi,
>
>In HBASE-1512 (https://issues.apache.org/jira/browse/HBASE-1512) there
>is the implementation of co-processor for count and others.
>
>Is there anywhere an example of the way to use them? Because the shell
>count is very slow with there is to many rows.
>
>Thanks,
>
>JM
Re: : Rows count
Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Ok. I just found.
I had to copy "protobuf-java-2.4.0a.jar", "zookeeper-3.4.3.jar" and
"guava-r09.jar" from HBase and ZooKeeper and I had to change
"rowcount" by "rowcounter".
But it's still not working because I don't have any DNS, I have all
the servers in the hosts file and the MR is looking for the DNS.
12/06/24 20:55:19 ERROR mapreduce.TableInputFormatBase: Cannot resolve
the host name for /192.168.1.4 because of
javax.naming.NameNotFoundException: DNS name not found [response code
3]; remaining name '4.1.168.192.in-addr.arpa'
I might have to work on that...
2012/6/24, Jean-Marc Spaggiari <je...@spaggiari.org>:
> Seems that I'm missing something. I'm running HBase and Hadoop
> separatly. How can I give to Hadoop the HBase jars? I'm not sure about
> the right way to do it...
>
> hadoop@latitude:~/hadoop-1.0.3$ ./bin/hadoop jar
> /home/hbase/hbase-0.94.0/hbase-0.94.0.jar rowcount test3
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/google/common/collect/Multimap
> at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:43)
> 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:601)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: java.lang.ClassNotFoundException:
> com.google.common.collect.Multimap
> 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:423)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
> ... 6 more
>
>
>
> 2012/6/24, Dhaval Shah <pr...@yahoo.co.in>:
>>
>> Instead of the shell rowcount you can use the MR job for rowcount..
>> something like
>> hadoop jar path_to_hbase.jar rowcount your_table
>>
>> The MR job is much faster than the shell
>>
>>
>> ------------------------------
>> On Mon 25 Jun, 2012 4:52 AM IST Jean-Marc Spaggiari wrote:
>>
>>>Hi,
>>>
>>>In HBASE-1512 (https://issues.apache.org/jira/browse/HBASE-1512) there
>>>is the implementation of co-processor for count and others.
>>>
>>>Is there anywhere an example of the way to use them? Because the shell
>>>count is very slow with there is to many rows.
>>>
>>>Thanks,
>>>
>>>JM
>>
>>
>
Re: : Rows count
Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Seems that I'm missing something. I'm running HBase and Hadoop
separatly. How can I give to Hadoop the HBase jars? I'm not sure about
the right way to do it...
hadoop@latitude:~/hadoop-1.0.3$ ./bin/hadoop jar
/home/hbase/hbase-0.94.0/hbase-0.94.0.jar rowcount test3
Exception in thread "main" java.lang.NoClassDefFoundError:
com/google/common/collect/Multimap
at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:43)
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:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Multimap
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:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 6 more
2012/6/24, Dhaval Shah <pr...@yahoo.co.in>:
>
> Instead of the shell rowcount you can use the MR job for rowcount..
> something like
> hadoop jar path_to_hbase.jar rowcount your_table
>
> The MR job is much faster than the shell
>
>
> ------------------------------
> On Mon 25 Jun, 2012 4:52 AM IST Jean-Marc Spaggiari wrote:
>
>>Hi,
>>
>>In HBASE-1512 (https://issues.apache.org/jira/browse/HBASE-1512) there
>>is the implementation of co-processor for count and others.
>>
>>Is there anywhere an example of the way to use them? Because the shell
>>count is very slow with there is to many rows.
>>
>>Thanks,
>>
>>JM
>
>