code: public int refreshNamenodes(String[] argv, int i) throws IOException {
       ClientDatanodeProtocol datanode = null;
       String dnAddr = (argv.length == 2) ? argv[i] : null;
       try {
         datanode = getClientDatanodeProtocol(dnAddr);
         if (datanode != null) {
           datanode.refreshNamenodes();
           return 0;
         } else {
           return -1;
         }
        } finally {
         if (datanode != null && Proxy.isProxyClass(datanode.getClass())) {
           RPC.stopProxy(datanode);
         }
       }
     }
docs: Refresh the namenodes served by the {@link DataNode}.
  Usage: java DFSAdmin -refreshNamenodes datanodehost:port
  @param argv List of of command line parameters.
  @param idx The index of the command that is being processed.
  @exception IOException if an error accoured wile accessing
  the file or path.
  @return exitcode 0 on success, non-zero on failure