hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1201400 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
Date Sun, 13 Nov 2011 04:56:27 GMT
Author: stack
Date: Sun Nov 13 04:56:26 2011
New Revision: 1201400

URL: http://svn.apache.org/viewvc?rev=1201400&view=rev
Log:
HBASE-4777 Write back to client 'incompatible' if we show up with wrong version

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1201400&r1=1201399&r2=1201400&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Sun Nov 13 04:56:26 2011
@@ -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

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java?rev=1201400&r1=1201399&r2=1201400&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java Sun Nov 13 04:56:26
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,



Mime
View raw message