Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0AC51200C4B for ; Mon, 20 Mar 2017 15:33:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 09564160B81; Mon, 20 Mar 2017 14:33:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5451A160B76 for ; Mon, 20 Mar 2017 15:33:06 +0100 (CET) Received: (qmail 69187 invoked by uid 500); 20 Mar 2017 14:33:00 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 69176 invoked by uid 99); 20 Mar 2017 14:33:00 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2017 14:33:00 +0000 Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id C737B1A0193 for ; Mon, 20 Mar 2017 14:32:59 +0000 (UTC) Received: by mail-qk0-f170.google.com with SMTP id y76so111436082qkb.0 for ; Mon, 20 Mar 2017 07:32:59 -0700 (PDT) X-Gm-Message-State: AFeK/H1sphWdpkfMvAS97WEvVd2rJomHb1i3OMB3AGCcPcSw3E7XlCjZLTyvE3b6mXCeIpe8NnX6QQNfmXVrpQ== X-Received: by 10.55.185.70 with SMTP id j67mr27709957qkf.4.1490020378735; Mon, 20 Mar 2017 07:32:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.148.243 with HTTP; Mon, 20 Mar 2017 07:32:38 -0700 (PDT) In-Reply-To: <58CEBA2E.7040103@apache.org> References: <58CEBA2E.7040103@apache.org> From: Sean Busbey Date: Mon, 20 Mar 2017 09:32:38 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Incompatible ProtocolBuffers version for HBase-client 1.0 To: user@hbase.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Mon, 20 Mar 2017 14:33:07 -0000 If upgrading is an option, for HBase 1.1+ applications you can use a newer Protocol Buffers by relying on hbase-shaded-client as a dependency. On Sun, Mar 19, 2017 at 12:04 PM, Josh Elser wrote: > With Apache HBase 1.0-based applications, you must use Protocol Buffers 2.5 > in its standard package (e.g. com.google.protobuf). If you want to use > another version of protobuf, you would have to shade and relocate that > dependency. > > In newer versions of HBase (2.0 I believe it will land), does the above > recommendation (shade+relocate) internally. This would let you use whatever > version of Protobuf you'd like, regardless of what HBase is using. > > > Hef wrote: >> >> I change my application to use ProtocolBuffers 2.5 then this issue >> resolved. >> >> >> On Fri, Mar 17, 2017 at 12:36 PM, Hef wrote: >> >>> Hi group, >>> I have a problem using ProtocolBuffers 3 in my application with CDH5.6 >>> HBase 1.0. >>> >>> When creating BufferedMutator and flush data into HBase, it shows an >>> error >>> as below: >>> >>> java.lang.NoClassDefFoundError: Could not initialize class >>> org.apache.hadoop.hbase.util.ByteStringer >>> at >>> org.apache.hadoop.hbase.protobuf.RequestConverter.buildRegionSpecifier( >>> RequestConverter.java:995) >>> at org.apache.hadoop.hbase.protobuf.RequestConverter. >>> buildGetRowOrBeforeRequest(RequestConverter.java:138) >>> at org.apache.hadoop.hbase.protobuf.ProtobufUtil. >>> getRowOrBefore(ProtobufUtil.java:1579) >>> at org.apache.hadoop.hbase.client.ConnectionManager$ >>> HConnectionImplementation.locateRegionInMeta(ConnectionManager.java:1293) >>> at org.apache.hadoop.hbase.client.ConnectionManager$ >>> HConnectionImplementation.locateRegion(ConnectionManager.java:1125) >>> at org.apache.hadoop.hbase.client.AsyncProcess.submit( >>> AsyncProcess.java:369) >>> at org.apache.hadoop.hbase.client.AsyncProcess.submit( >>> AsyncProcess.java:320) >>> at org.apache.hadoop.hbase.client.BufferedMutatorImpl. >>> backgroundFlushCommits(BufferedMutatorImpl.java:198) >>> at org.apache.hadoop.hbase.client.BufferedMutatorImpl. >>> doMutate(BufferedMutatorImpl.java:141) >>> at org.apache.hadoop.hbase.client.BufferedMutatorImpl. >>> mutate(BufferedMutatorImpl.java:105) >>> >>> It looks like HBase is using ProtocolBuffers2.5, which cause the bytecode >>> incompatible. >>> >>> Does anyone has experience of resolving this problem? Or I have to switch >>> back to protocol 2.5. >>> >>> >>> >>> >> >