code: public static DFSClient getDFSClient(final HttpServletRequest request,
        final Configuration conf) throws IOException, InterruptedException {
      final String nnAddr = request.getParameter(JspHelper.NAMENODE_ADDRESS);
      return new DFSClient(DFSUtil.getSocketAddress(nnAddr), conf);
    }
docs: Get DFSClient for a namenode corresponding to the BPID from a datanode