code: static ClientDatanodeProtocol createClientDatanodeProtocolProxy (
        DatanodeInfo datanodeid, Configuration conf) throws IOException {
      InetSocketAddress addr = NetUtils.createSocketAddr(
        datanodeid.getHost() + ":" + datanodeid.getIpcPort());
      if (ClientDatanodeProtocol.LOG.isDebugEnabled()) {
        ClientDatanodeProtocol.LOG.info("ClientDatanodeProtocol addr=" + addr);
      }
      try {
        return (ClientDatanodeProtocol)RPC.getProxy(ClientDatanodeProtocol.class,
          ClientDatanodeProtocol.versionID, addr, conf);
      } catch (RPC.VersionMismatch e) {
        long clientVersion = e.getClientVersion();
        long datanodeVersion = e.getServerVersion();
        if (clientVersion > datanodeVersion &&
            !ProtocolCompatible.isCompatibleClientDatanodeProtocol(
                clientVersion, datanodeVersion)) {
          throw new RPC.VersionIncompatible(
              ClientDatanodeProtocol.class.getName(), clientVersion, datanodeVersion);
        }
        return (ClientDatanodeProtocol)e.getProxy();
      }
    }
docs: Setup a session with the specified datanode