You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Demai Ni <ni...@gmail.com> on 2013/11/14 01:35:29 UTC

how to add a field in HServerLoad (readFields() and write()) without break compatibility within same major release?

hi, folks,

I encountered a similar problem that fixed by
HBASE-5795<https://issues.apache.org/jira/browse/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)