final InetAddress remoteAddress = InetAddress.getByName(request.getRemoteAddr()); final ServletContext context = getServletContext(); final Configuration conf = NameNodeHttpServer.getConfFromContext(context);
@SuppressWarnings("unchecked") public void doGet(HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { Map<String,String[]> pmap = request.getParameterMap(); ServletContext context = getServletContext(); NameNode nn = (NameNode) context.getAttribute("name.node"); Configuration conf = (Configuration) context.getAttribute("name.conf"); NamenodeFsck fscker = new NamenodeFsck(conf, nn, pmap, response); fscker.fsck(); } }
final InetAddress remoteAddress = InetAddress.getByName(request.getRemoteAddr()); final ServletContext context = getServletContext(); final Configuration conf = NameNodeHttpServer.getConfFromContext(context);
@SuppressWarnings("unchecked") public void doGet(HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { Map<String,String[]> pmap = request.getParameterMap(); try { ServletContext context = getServletContext(); NameNode nn = (NameNode) context.getAttribute("name.node"); Configuration conf = (Configuration) context.getAttribute("name.conf"); NamenodeFsck fscker = new NamenodeFsck(conf, nn, pmap, response); fscker.fsck(); } catch (IOException ie) { StringUtils.stringifyException(ie); LOG.warn(ie); String errMsg = "Fsck on path " + pmap.get("path") + " failed."; response.sendError(HttpServletResponse.SC_GONE, errMsg); throw ie; } } }
final InetAddress remoteAddress = InetAddress.getByName(request.getRemoteAddr()); final ServletContext context = getServletContext(); final Configuration conf = NameNodeHttpServer.getConfFromContext(context);