code: private ClientDatanodeProtocol getClientDatanodeProtocol(String dnAddr)
         throws IOException {
       String hostname = null;
       int port;
       int index;
       Configuration conf = getConf();
       
       if (dnAddr == null) {
         // Defaulting the configured address for the port
         dnAddr = conf.get(FSConstants.DFS_DATANODE_IPC_ADDRESS_KEY);
         hostname = "localhost";
       }
       index = dnAddr.indexOf(':');
       if (index < 0) {
         return null;
       }
  
       port = Integer.parseInt(dnAddr.substring(index+1));
       if (hostname == null) {
         hostname = dnAddr.substring(0, index);
       }
  
       InetSocketAddress addr = NetUtils.createSocketAddr(hostname + ":" + port);
       if (ClientDatanodeProtocol.LOG.isDebugEnabled()) {
         ClientDatanodeProtocol.LOG.debug("ClientDatanodeProtocol addr=" + addr);
       }
       return (ClientDatanodeProtocol)RPC.getProxy(ClientDatanodeProtocol.class,
           ClientDatanodeProtocol.versionID, addr, conf);
     }
docs: Gets a new ClientDataNodeProtocol object.
  @param dnAddr The address of the DataNode or null for the default value
  (connecting to localhost).
  @return the initialized ClientDatanodeProtocol object or null on failure