List of usage examples for org.apache.hadoop.http FilterContainer addFilter
void addFilter(String name, String classname, Map<String, String> parameters);
From source file:com.datatorrent.stram.security.StramWSFilterInitializer.java
License:Apache License
@Override public void initFilter(FilterContainer container, Configuration conf) { Map<String, String> params = new HashMap<String, String>(); String proxy = WebAppUtils.getProxyHostAndPort(conf); String[] parts = proxy.split(":"); params.put(StramWSFilter.PROXY_HOST, parts[0]); params.put(StramWSFilter.PROXY_URI_BASE, ConfigUtils.getSchemePrefix(new YarnConfiguration()) + proxy + System.getenv(ApplicationConstants.APPLICATION_WEB_PROXY_BASE_ENV)); container.addFilter(FILTER_NAME, FILTER_CLASS, params); }
From source file:org.apache.slider.server.appmaster.web.rest.InsecureAmFilterInitializer.java
License:Apache License
@Override public void initFilter(FilterContainer container, Configuration conf) { configuration = conf;/*www . ja v a 2 s. c om*/ Map<String, String> params = new HashMap<String, String>(); String proxy = WebAppUtils.getProxyHostAndPort(conf); String[] parts = proxy.split(":"); params.put(InsecureAmFilter.PROXY_HOST, parts[0]); // todo: eventually call WebAppUtils.getHttpSchemePrefix params.put(InsecureAmFilter.PROXY_URI_BASE, getHttpSchemePrefix() + proxy + getApplicationWebProxyBase()); params.put(InsecureAmFilter.WS_CONTEXT_ROOT, RestPaths.WS_CONTEXT_ROOT); container.addFilter(FILTER_NAME, FILTER_CLASS, params); }
From source file:org.apache.slider.server.appmaster.web.SliderAmFilterInitializer.java
License:Apache License
@Override public void initFilter(FilterContainer container, Configuration conf) { configuration = conf;//ww w . ja v a 2 s . co m Map<String, String> params = new HashMap<String, String>(); String proxy = WebAppUtils.getProxyHostAndPort(conf); String[] parts = proxy.split(":"); params.put(SliderAmIpFilter.PROXY_HOST, parts[0]); // todo: eventually call WebAppUtils.getHttpSchemePrefix params.put(SliderAmIpFilter.PROXY_URI_BASE, getHttpSchemePrefix() + proxy + getApplicationWebProxyBase()); params.put(SliderAmIpFilter.WS_CONTEXT_ROOT, conf.get(SliderAmIpFilter.WS_CONTEXT_ROOT)); container.addFilter(FILTER_NAME, FILTER_CLASS, params); }