HBASE-4777 Write back to client 'incompatible' if we show up with wrong version
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1201400 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
62b5c04786
commit
94a06fb391
|
@ -426,6 +426,7 @@ Release 0.92.0 - Unreleased
|
|||
storefileUncompressedSizeMB (gaojinchao)
|
||||
HBASE-4478 Improve AssignmentManager.handleRegion so that it can process certain ZK state
|
||||
in the case of RS offline
|
||||
HBASE-4777 Write back to client 'incompatible' if we show up with wrong version
|
||||
|
||||
TESTS
|
||||
HBASE-4450 test for number of blocks read: to serve as baseline for expected
|
||||
|
|
|
@ -90,7 +90,7 @@ public abstract class HBaseServer implements RpcServer {
|
|||
* The first four bytes of Hadoop RPC connections
|
||||
*/
|
||||
public static final ByteBuffer HEADER = ByteBuffer.wrap("hrpc".getBytes());
|
||||
public static final byte CURRENT_VERSION = 4;
|
||||
public static final byte CURRENT_VERSION = 3;
|
||||
|
||||
/**
|
||||
* How many calls/handler are allowed in the queue.
|
||||
|
@ -1185,7 +1185,12 @@ public abstract class HBaseServer implements RpcServer {
|
|||
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
|
||||
|
||||
if (clientVersion >= 3) {
|
||||
Call fakeCall = new Call(-1, null, this, responder);
|
||||
// We used to return an id of -1 which caused server to close the
|
||||
// connection without telling the client what the problem was. Now
|
||||
// we return 0 which will keep the socket up -- bad clients, unless
|
||||
// they switch to suit the running server -- will fail later doing
|
||||
// getProtocolVersion.
|
||||
Call fakeCall = new Call(0, null, this, responder);
|
||||
// Versions 3 and greater can interpret this exception
|
||||
// response in the same manner
|
||||
setupResponse(buffer, fakeCall, Status.FATAL,
|
||||
|
|
Loading…
Reference in New Issue