Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C33921056A for ; Thu, 14 Nov 2013 00:35:58 +0000 (UTC) Received: (qmail 51123 invoked by uid 500); 14 Nov 2013 00:35:58 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 51055 invoked by uid 500); 14 Nov 2013 00:35:57 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 51047 invoked by uid 99); 14 Nov 2013 00:35:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 00:35:57 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nidmgg@gmail.com designates 209.85.128.174 as permitted sender) Received: from [209.85.128.174] (HELO mail-ve0-f174.google.com) (209.85.128.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 00:35:50 +0000 Received: by mail-ve0-f174.google.com with SMTP id cz12so1028177veb.5 for ; Wed, 13 Nov 2013 16:35:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=5CBQwuE9vZTe+tE3kvKsaw+aKlK/iVpkKMoIOtc18Q4=; b=rAxduqdFzesKYmHDR/giM8gP/bu/gmU0LtdtFZ0GBwaEyyXjldIakyRWgXiuIY2Vq4 pKBtkJivFUb+TGyWDdeK2DMgstMRNaaybBYK00cpQ/DvuCKKOZS49dJjvx2c3eGboNCI YsMpUUZC6a6gf1pWqCjjF8Yc8xntCy/E5a97qTV4KBNWF47q1OL+zSoaMiWBnk6l8fyk nXwQey8hmm2tkLEYUeLR1R9JarW0O6GlKUTwWebSnRYR3nOxuFJj5UJtyTVTstafWCfS mhkTC9KHP03lHs0dueFyJ++HpBgmZYSvlBOGKnSUwA/p4Vq+FA9SPCkCjnrBFuM1tpt1 Tp+g== MIME-Version: 1.0 X-Received: by 10.52.33.147 with SMTP id r19mr2439049vdi.37.1384389329787; Wed, 13 Nov 2013 16:35:29 -0800 (PST) Received: by 10.221.28.136 with HTTP; Wed, 13 Nov 2013 16:35:29 -0800 (PST) Date: Wed, 13 Nov 2013 16:35:29 -0800 Message-ID: Subject: how to add a field in HServerLoad (readFields() and write()) without break compatibility within same major release? From: Demai Ni To: "dev@hbase.apache.org" Content-Type: multipart/alternative; boundary=20cf307d064a3bbbba04eb1842ee X-Virus-Checked: Checked by ClamAV on apache.org --20cf307d064a3bbbba04eb1842ee Content-Type: text/plain; charset=ISO-8859-1 hi, folks, I encountered a similar problem that fixed by HBASE-5795. But in this case, the cluster is hbase 0.94.9, and the downlevel client is 0.94.3. Does this mean that we cannot add additional field within the same major release? thanks. The following is the scenario: first, on the 94.9 cluster(as Master Sever), I modified HServerLoad.java by adding the following two lines inside readFields() and write(). public void readFields(DataInput in) throws IOException { .... * String rlsHashKey = in.readUTF();* } public void write(DataOutput out) throws IOException { .... * out.writeUTF("testing version");* } Then, on a 0.94.3 cluster as client with zookeeper.quorum pointing to the above 94.9 master. The following error occured when using 'status' in 'hbase shell' hbase(main):006:0> status 13/11/13 16:20:17 ERROR io.HbaseObjectWritable: Error in readFields A record version mismatch occured. *Expecting v2, found v15* at org.apache.hadoop.io.VersionedWritable.readFields(VersionedWritable.java:46) at org.apache.hadoop.hbase.HServerLoad.readFields(HServerLoad.java:711) at org.apache.hadoop.hbase.ClusterStatus.readFields(ClusterStatus.java:308) at org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:688) at org.apache.hadoop.hbase.io.HbaseObjectWritable.readFields(HbaseObjectWritable.java:329) at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.receiveResponse(HBaseClient.java:694) at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.run(HBaseClient.java:606) --20cf307d064a3bbbba04eb1842ee--