YARN-3207. Secondary filter matches entites which do not have the key
being filtered for. Contributed by Zhijie Shen (cherry picked from commit 57db50cbe3ce42618ad6d6869ae337d15b261f4e) (cherry picked from commit ba18adbb27c37a8fa92223a412ce65eaa462d18b) (cherry picked from commit 9fd18e94849600ec66832df5ae424eeb0116330c)
This commit is contained in:
parent
28160a0bd6
commit
95edb6e64f
@ -79,6 +79,9 @@ Release 2.6.1 - UNRELEASED
|
||||
http(s)://proxy addr:port/proxy/<appId> to avoid duplicate sections. (Devaraj
|
||||
K via zjshen)
|
||||
|
||||
YARN-3207. Secondary filter matches entites which do not have the key being
|
||||
filtered for. (Zhijie Shen via xgong)
|
||||
|
||||
Release 2.6.0 - 2014-11-18
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -772,7 +772,7 @@ private TimelineEntities getEntityByTime(byte[] base,
|
||||
if (v == null) {
|
||||
Set<Object> vs = entity.getPrimaryFilters()
|
||||
.get(filter.getName());
|
||||
if (vs != null && !vs.contains(filter.getValue())) {
|
||||
if (vs == null || !vs.contains(filter.getValue())) {
|
||||
filterPassed = false;
|
||||
break;
|
||||
}
|
||||
|
@ -767,6 +767,9 @@ public void testGetEntitiesWithSecondaryFilters() throws IOException {
|
||||
|
||||
entities = getEntitiesWithFilters("type_1", userFilter, badTestingFilters);
|
||||
assertEquals(0, entities.size());
|
||||
|
||||
entities = getEntitiesWithFilters("type_5", null, badTestingFilters);
|
||||
assertEquals(0, entities.size());
|
||||
}
|
||||
|
||||
public void testGetEvents() throws IOException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user