hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: what is the role of ProtoBuffer while creating of instance of Table/Htable
Date Mon, 04 Dec 2017 22:06:02 GMT
HBase uses pb2.5.0. Is it an incompatibility between 2.4.1 and 2.5.0 pb? If
you look at classpath, is your projects 2.4.1 pb jar coming ahead of the
hbase pb jar?
Thanks,
S

On Sun, Dec 3, 2017 at 10:52 AM, Manjeet Singh <manjeet.chandhok@gmail.com>
wrote:

> Hi All,
>
> I am facing one issue where I have two different DAL in one project i.e.
> 1. DAL simply build using java and Native API.
> 2. Spark Job using Java and Native API. (Also using protocol buffer in this
> project)
>
> In our Project the second one is having ( the spark job one) implementation
> of searching using solr here we are using protocol buffere for some
> different business needs.
> In First it was simple java native code were we are accessing Hbase using
> simple Get by passing Rowkey.
>
> These project also work fine if I run these two sepratlly but when I
> clube thse with from one UI and try to execute our use cases I got below
> exception
>
> It's clear that its something about protocol buffer...
>
> We have compiled classes of protocol buffer using below dependecies
>
>
>         <dependency>
> <groupId>com.google.protobuf</groupId>
> <artifactId>protobuf-java</artifactId>
> <version>2.4.1</version>
> <scope>provided</scope>
> </dependency>
>
>
>
>
> Hbase :-
>
> <dependency>
> <groupId>org.apache.hbase</groupId>
> <artifactId>hbase-client</artifactId>
> <version>1.2.0-cdh5.8.0</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <artifactId>jdk.tools</artifactId>
> <groupId>jdk.tools</groupId>
> </exclusion>
> </exclusions>
> </dependency>
>
>
> java.io.IOException: java.lang.reflect.InvocationTargetException
> at
> org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(
> ConnectionFactory.java:240)
> at
> org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(
> ConnectionFactory.java:218)
> at
> org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(
> ConnectionFactory.java:119)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(
> NativeConstructorAccessorImpl.java:62)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at
> org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(
> ConnectionFactory.java:238)
> ... 15 more
> Caused by: java.lang.VerifyError: class
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$Result overrides
> final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet;
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
> at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at
> org.apache.hadoop.hbase.protobuf.ProtobufUtil.<clinit>
> (ProtobufUtil.java:210)
> at org.apache.hadoop.hbase.ClusterId.parseFrom(ClusterId.java:64)
> at
> org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(
> ZKClusterId.java:75)
> at
> org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(
> ZooKeeperRegistry.java:105)
> at
> org.apache.hadoop.hbase.client.ConnectionManager$
> HConnectionImplementation.retrieveClusterId(ConnectionManager.java:919)
> at
> org.apache.hadoop.hbase.client.ConnectionManager$
> HConnectionImplementation.<init>(ConnectionManager.java:657)
> ... 20 more
>
>
> Can anyone help me to fix this issue using protobuff 2.4.1 version only
>
> Thanks
> Manjeet Singh
>

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