/** * Get the proxied path for an application. * * @param id the application id to use * @return the base path to that application through the proxy */ public static String getPath(ApplicationId id) { return getPath(id, false); }
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { methodAction(req, resp, HTTP.GET); }
/** * Output 404 with appropriate message. * @param resp the http response. * @param message the message to include on the page. * @throws IOException on any error. */ private static void notFound(HttpServletResponse resp, String message) throws IOException { ProxyUtils.notFound(resp, message); }
private FetchedAppReport getApplicationReport(ApplicationId id) throws IOException, YarnException { return ((AppReportFetcher) getServletContext() .getAttribute(WebAppProxy.FETCHER_ATTRIBUTE)).getApplicationReport(id); }
private static Cookie makeCheckCookie(ApplicationId id, boolean isSet) { Cookie c = new Cookie(getCheckCookieName(id),String.valueOf(isSet)); c.setPath(ProxyUriUtils.getPath(id)); c.setMaxAge(60 * 60 * 2); //2 hours in seconds return c; }
@Override public synchronized void serviceInit(Configuration conf) throws Exception { proxy = new WebAppProxyForTest(); addService(proxy); super.serviceInit(conf); }
private FetchedAppReport getDefaultApplicationReport(ApplicationId appId) { return getDefaultApplicationReport(appId, true); } }
private FetchedAppReport getApplicationReport(ApplicationId id) throws IOException, YarnException { return ((AppReportFetcher) getServletContext() .getAttribute(WebAppProxy.FETCHER_ATTRIBUTE)).getApplicationReport(id); }
private static Cookie makeCheckCookie(ApplicationId id, boolean isSet) { Cookie c = new Cookie(getCheckCookieName(id),String.valueOf(isSet)); c.setPath(ProxyUriUtils.getPath(id)); c.setMaxAge(60 * 60 * 2); //2 hours in seconds return c; }
/** * Get the proxied path for an application. * * @param id the application id to use * @param path the rest of the path to the application * @return the base path to that application through the proxy */ public static String getPath(ApplicationId id, String path) { return getPath(id, path, false); }
/** * Output 404 with appropriate message. * @param resp the http response. * @param message the message to include on the page. * @throws IOException on any error. */ private static void notFound(HttpServletResponse resp, String message) throws IOException { ProxyUtils.notFound(resp, message); }
@Override public synchronized void serviceInit(Configuration conf) throws Exception { proxy = new WebAppProxyForTest(); addService(proxy); super.serviceInit(conf); }
@Override protected final void doPut(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { methodAction(req, resp, HTTP.PUT); }
private FetchedAppReport getDefaultApplicationReport(ApplicationId appId) { return getDefaultApplicationReport(appId, true); } }
private FetchedAppReport getApplicationReport(ApplicationId id) throws IOException, YarnException { return ((AppReportFetcher) getServletContext() .getAttribute(WebAppProxy.FETCHER_ATTRIBUTE)).getApplicationReport(id); }
/** * Output 404 with appropriate message. * @param resp the http response. * @param message the message to include on the page. * @throws IOException on any error. */ private static void notFound(HttpServletResponse resp, String message) throws IOException { ProxyUtils.notFound(resp, message); }
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { methodAction(req, resp, HTTP.GET); }
private FetchedAppReport getApplicationReport(ApplicationId id) throws IOException, YarnException { return ((AppReportFetcher) getServletContext() .getAttribute(WebAppProxy.FETCHER_ATTRIBUTE)).getApplicationReport(id); }
/** * Output 404 with appropriate message. * @param resp the http response. * @param message the message to include on the page. * @throws IOException on any error. */ private static void notFound(HttpServletResponse resp, String message) throws IOException { ProxyUtils.notFound(resp, message); }
@Override protected final void doPut(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { methodAction(req, resp, HTTP.PUT); }