hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1089282 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Date Wed, 06 Apr 2011 00:01:58 GMT
Author: garyh
Date: Wed Apr  6 00:01:58 2011
New Revision: 1089282

URL: http://svn.apache.org/viewvc?rev=1089282&view=rev
Log:
HBASE-3739  HMaster.getProtocolVersion() should distinguish HMasterInterface and HMasterRegionInterface
versions

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1089282&r1=1089281&r2=1089282&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Wed Apr  6 00:01:58 2011
@@ -63,6 +63,8 @@ Release 0.91.0 - Unreleased
    HBASE-3728  NPE in HTablePool.closeTablePool (Ted Yu via Stack)
    HBASE-3733  MemStoreFlusher.flushOneForGlobalPressure() shouldn't
                be using TreeSet for HRegion (Ted Yu via J-D)
+   HBASE-3739  HMaster.getProtocolVersion() should distinguish
+               HMasterInterface and HMasterRegionInterface versions
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1089282&r1=1089281&r2=1089282&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Wed Apr  6 00:01:58
2011
@@ -485,7 +485,14 @@ implements HMasterInterface, HMasterRegi
   }
 
   public long getProtocolVersion(String protocol, long clientVersion) {
-    return HMasterInterface.VERSION;
+    if (HMasterInterface.class.getName().equals(protocol)) {
+      return HMasterInterface.VERSION;
+    } else if (HMasterRegionInterface.class.getName().equals(protocol)) {
+      return HMasterRegionInterface.VERSION;
+    }
+    // unknown protocol
+    LOG.warn("Version requested for unimplemented protocol: "+protocol);
+    return -1;
   }
 
   /** @return InfoServer object. Maybe null.*/



Mime
View raw message