You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2011/11/13 05:57:38 UTC
svn commit: r1201401 - in /hbase/branches/0.92: CHANGES.txt
src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
Author: stack
Date: Sun Nov 13 04:57:37 2011
New Revision: 1201401
URL: http://svn.apache.org/viewvc?rev=1201401&view=rev
Log:
HBASE-4777 Write back to client 'incompatible' if we show up with wrong version
Modified:
hbase/branches/0.92/CHANGES.txt
hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1201401&r1=1201400&r2=1201401&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Sun Nov 13 04:57:37 2011
@@ -421,6 +421,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-4492 TestRollingRestart fails intermittently
Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java?rev=1201401&r1=1201400&r2=1201401&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java Sun Nov 13 04:57:37 2011
@@ -90,7 +90,7 @@ public abstract class HBaseServer implem
* 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 implem
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,