code: public long getProtocolVersion(String protocol,
                                   long clientVersion) throws IOException {
      if (protocol.equals(AvatarProtocol.class.getName())) {
        return AvatarProtocol.versionID;
      } else {
        return super.getProtocolVersion(protocol, clientVersion);
      } 
    }
docs: If the specified protocol is AvatarProtocol, then return the
  AvatarProtocol version id, otherwise delegate to the underlying
  namenode.