HBASE-3739 HMaster.getProtocolVersion() should distinguish HMasterInterface and HMasterRegionInterface versions

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1089282 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Helmling 2011-04-06 00:01:58 +00:00
parent dd6dca4d94
commit 82ffa80bd9
2 changed files with 10 additions and 1 deletions

View File

@ -63,6 +63,8 @@ Release 0.91.0 - Unreleased
HBASE-3728 NPE in HTablePool.closeTablePool (Ted Yu via Stack) HBASE-3728 NPE in HTablePool.closeTablePool (Ted Yu via Stack)
HBASE-3733 MemStoreFlusher.flushOneForGlobalPressure() shouldn't HBASE-3733 MemStoreFlusher.flushOneForGlobalPressure() shouldn't
be using TreeSet for HRegion (Ted Yu via J-D) be using TreeSet for HRegion (Ted Yu via J-D)
HBASE-3739 HMaster.getProtocolVersion() should distinguish
HMasterInterface and HMasterRegionInterface versions
IMPROVEMENTS IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack) HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)

View File

@ -485,7 +485,14 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server {
} }
public long getProtocolVersion(String protocol, long clientVersion) { public long getProtocolVersion(String protocol, long clientVersion) {
if (HMasterInterface.class.getName().equals(protocol)) {
return HMasterInterface.VERSION; 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.*/ /** @return InfoServer object. Maybe null.*/