code: public long getProtocolVersion(String protocol,
                                   long clientVersion) throws IOException {
      IOException last = new IOException("No DatanodeProtocol found.");
      long lastProt = -1;
      for (int i = 0; i < numProtocol; i++) {
        try {
          if (node[i] != null) {
            long prot =  node[i].getProtocolVersion(protocol, clientVersion);
            if (lastProt != -1) {
              if (prot != lastProt) {
                throw new IOException("Versions of DatanodeProtocol " +
                                      " objects have to be same." +
                                      " Found version " + prot +
                                      " does not match with " + lastProt);
              }
              lastProt = prot;
            }
          }
        } catch (IOException e) {
          last = e;
          LOG.info("Server " + i + " failed at getProtocolVersion.", e);
        }
      }
      if (lastProt == -1) {
        throw last; // fail if all DatanodeProtocol object failed.
      }
      return lastProt; // all objects have the same version
    }
docs: {@inheritDoc}