hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: Importing to HBase from Java problem
Date Mon, 06 Dec 2010 17:54:50 GMT
That looks like a mismatch between client and server hbase versions.
Ensure you have same running all over your cluster.  Make sure you
don't have a mix of 0.20.x and 0.89... or 0.90 release candidates.

You seem to be feeling your way.  Have you seen
https://hudson.apache.org/hudson/view/G-L/view/HBase/job/hbase-0.90/ws/trunk/target/site/apidocs/org/apache/hadoop/hbase/mapreduce/package-summary.html#package_description?

You added zookeeper.  Be sure to add the hbase conf directory to your
MapReduce CLASSPATH.

St.Ack


On Mon, Dec 6, 2010 at 8:12 AM, Gökhan Çapan <gkhncpn@gmail.com> wrote:
> Hi,
>
> I am facing with some issues when I try to write the results of my Reducer
> to an HBase table, in pseudo-distributed mode.
>
> HBase version: 0.20.6
> Hadoop version: 0.20.2
>
> I let HBase manage Zookeeper.
>
> After starting HBase, I can successfully start HBase shell, and create a
> table.
>
> In my MapReduce app, I have a dependency to HBase 0.20.2.
>
> However, it gave me the following error:
> Error: java.lang.ClassNotFoundException: org.apache.zookeeper.Watcher
>    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>    at java.lang.ClassLoader.defineClass1(Native Method)
>    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>    at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:93)
>    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:119)
>    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:101)
>    at
> org.apache.hadoop.hbase.mapreduce.TableOutputFormat.getRecordWriter(TableOutputFormat.java:116)
>    at
> org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:553)
>    at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:408)
>    at org.apache.hadoop.mapred.Child.main(Child.java:170)
> .
> .
> .
>
>
>
> So I have added ZooKeeper as a dependency. Now it throws the following
> Exception for ZooKeeper 3.2.2, 3.3.0, and 3.3.1:
>
> 10/12/06 17:51:53 INFO mapred.JobClient:  map 100% reduce 27%
> 10/12/06 17:51:58 INFO mapred.JobClient: Task Id :
> attempt_201012061721_0002_r_000000_2, Status : FAILED
> java.lang.reflect.UndeclaredThrowableException
>    at $Proxy2.getRegionInfo(Unknown Source)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRootRegion(HConnectionManager.java:874)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:515)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:491)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:565)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:524)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:491)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:565)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:528)
>    at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:491)
>    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:123)
>    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:101)
>    at
> org.apache.hadoop.hbase.mapreduce.TableOutputFormat.getRecordWriter(TableOutputFormat.java:116)
>    at
> org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:553)
>    at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:408)
>    at org.apache.hadoop.mapred.Child.main(Child.java:170)
> Caused by: org.apache.hadoop.ipc.RemoteException: java.io.IOException:
> java.io.IOException: Could not find requested method, the usual cause is a
> version mismatch between client and server.
>    at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:648)
>    at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:915)
>
>    at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:723)
>    at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:328)
>    ... 16 more
>
>
> I guess this is a compatibility issue between HBase and ZooKeeper, but I
> couldn't find the right version of ZooKeeper to add as a dependency.
>
>
> Thanks in advance,
>
> Gokhan
>

Mime
View raw message