HADOOP-15411. AuthenticationFilter should use Configuration.getPropsWithPrefix instead of iterator. (Suma Shivaprasad via wangda)

Change-Id: Ia19458a43aceb4ffdb1e8eccc519655235d92ba9
This commit is contained in:
Wangda Tan 2018-04-25 22:09:37 -07:00 committed by Owen O'Malley
parent a8e428b2dc
commit 13d389bf51

View File

@ -69,14 +69,10 @@ public static Map<String, String> getFilterConfigMap(Configuration conf,
//setting the cookie path to root '/' so it is used for all resources.
filterConfig.put(AuthenticationFilter.COOKIE_PATH, "/");
Map<String, String> propsWithPrefix = conf.getPropsWithPrefix(prefix);
for (Map.Entry<String, String> entry : conf) {
String name = entry.getKey();
if (name.startsWith(prefix)) {
String value = conf.get(name);
name = name.substring(prefix.length());
filterConfig.put(name, value);
}
for (Map.Entry<String, String> entry : propsWithPrefix.entrySet()) {
filterConfig.put(entry.getKey(), entry.getValue());
}
//Resolve _HOST into bind address