YARN-6146. Add Builder methods for TimelineEntityFilters (Haibo Chen via Varun Saxena)
This commit is contained in:
parent
44999aabc2
commit
b87b72b40a
|
@ -660,7 +660,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
int cfgCnt = 0;
|
int cfgCnt = 0;
|
||||||
|
@ -697,8 +697,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, 1425016502000L, 1425016502040L, null,
|
new TimelineEntityFilters.Builder().createdTimeBegin(1425016502000L)
|
||||||
null, null, null, null, null),
|
.createTimeEnd(1425016502040L).build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
for (TimelineEntity entity : entities) {
|
for (TimelineEntity entity : entities) {
|
||||||
|
@ -714,8 +714,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, 1425016502015L, null, null, null, null,
|
new TimelineEntityFilters.Builder().createdTimeBegin(1425016502015L)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
for (TimelineEntity entity : entities) {
|
for (TimelineEntity entity : entities) {
|
||||||
|
@ -729,8 +729,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, 1425016502015L, null, null, null,
|
new TimelineEntityFilters.Builder().createTimeEnd(1425016502015L)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
for (TimelineEntity entity : entities) {
|
for (TimelineEntity entity : entities) {
|
||||||
|
@ -757,7 +757,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(3, es1.size());
|
assertEquals(3, es1.size());
|
||||||
for (TimelineEntity e : es1) {
|
for (TimelineEntity e : es1) {
|
||||||
|
@ -783,7 +783,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(
|
new TimelineDataToRetrieve(
|
||||||
null, null, EnumSet.of(Field.IS_RELATED_TO, Field.METRICS), null));
|
null, null, EnumSet.of(Field.IS_RELATED_TO, Field.METRICS), null));
|
||||||
assertEquals(3, es1.size());
|
assertEquals(3, es1.size());
|
||||||
|
@ -813,8 +813,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt, null, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
int isRelatedToCnt = 0;
|
int isRelatedToCnt = 0;
|
||||||
|
@ -839,8 +838,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt1, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt1).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
isRelatedToCnt = 0;
|
isRelatedToCnt = 0;
|
||||||
|
@ -863,8 +861,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt2, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt2).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
isRelatedToCnt = 0;
|
isRelatedToCnt = 0;
|
||||||
|
@ -886,8 +883,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt3, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt3).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
isRelatedToCnt = 0;
|
isRelatedToCnt = 0;
|
||||||
|
@ -910,8 +906,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt4, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt4).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -923,8 +918,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt5, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt5).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -944,8 +938,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt6, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt6).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
isRelatedToCnt = 0;
|
isRelatedToCnt = 0;
|
||||||
|
@ -972,8 +965,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, rt, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
int relatesToCnt = 0;
|
int relatesToCnt = 0;
|
||||||
|
@ -998,8 +990,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, rt1, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt1).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -1022,8 +1013,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, rt2, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt2).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -1045,8 +1035,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, rt3, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt3).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -1069,8 +1058,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, rt4, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt4).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1082,8 +1070,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, rt5, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt5).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1103,8 +1090,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, rt6, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt6).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -1140,8 +1126,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, rt7, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt7).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -1178,8 +1163,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, relatesTo, isRelatedTo,
|
new TimelineEntityFilters.Builder().relatesTo(relatesTo)
|
||||||
null, null, null, eventFilter),
|
.isRelatedTo(isRelatedTo).eventFilters(eventFilter).build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
int eventCnt = 0;
|
int eventCnt = 0;
|
||||||
|
@ -1216,8 +1201,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList)
|
||||||
confFilterList, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
|
@ -1231,8 +1216,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList)
|
||||||
confFilterList, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
cfgCnt = 0;
|
cfgCnt = 0;
|
||||||
|
@ -1248,8 +1233,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList1)
|
||||||
confFilterList1, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
|
@ -1268,8 +1253,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList2)
|
||||||
confFilterList2, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1281,8 +1266,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList3)
|
||||||
confFilterList3, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1294,8 +1279,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList4)
|
||||||
confFilterList4, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1307,8 +1292,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList5)
|
||||||
confFilterList5, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
|
@ -1325,8 +1310,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef).build(),
|
||||||
null, ef),
|
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
int eventCnt = 0;
|
int eventCnt = 0;
|
||||||
|
@ -1347,8 +1331,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef1).build(),
|
||||||
null, ef1), new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
eventCnt = 0;
|
eventCnt = 0;
|
||||||
for (TimelineEntity timelineEntity : entities) {
|
for (TimelineEntity timelineEntity : entities) {
|
||||||
|
@ -1366,8 +1350,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef2).build(),
|
||||||
null, ef2),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
eventCnt = 0;
|
eventCnt = 0;
|
||||||
|
@ -1390,8 +1373,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef3).build(),
|
||||||
null, ef3),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1408,8 +1390,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef4).build(),
|
||||||
null, ef4),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
eventCnt = 0;
|
eventCnt = 0;
|
||||||
|
@ -1430,8 +1411,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef5).build(),
|
||||||
null, ef5),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
eventCnt = 0;
|
eventCnt = 0;
|
||||||
|
@ -1460,7 +1440,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null) ,
|
null) ,
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(list, null, null, null));
|
new TimelineDataToRetrieve(list, null, null, null));
|
||||||
int cfgCnt = 0;
|
int cfgCnt = 0;
|
||||||
for (TimelineEntity entity : es1) {
|
for (TimelineEntity entity : es1) {
|
||||||
|
@ -1485,8 +1465,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList)
|
||||||
confFilterList, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(list, null, null, null));
|
new TimelineDataToRetrieve(list, null, null, null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
int cfgCnt = 0;
|
int cfgCnt = 0;
|
||||||
|
@ -1518,8 +1498,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList1)
|
||||||
confFilterList1, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(confsToRetrieve, null, null, null));
|
new TimelineDataToRetrieve(confsToRetrieve, null, null, null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
cfgCnt = 0;
|
cfgCnt = 0;
|
||||||
|
@ -1549,8 +1529,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList)
|
||||||
metricFilterList, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
|
@ -1564,8 +1544,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList)
|
||||||
metricFilterList, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
metricCnt = 0;
|
metricCnt = 0;
|
||||||
|
@ -1583,8 +1563,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList1)
|
||||||
metricFilterList1, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
|
@ -1603,8 +1583,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList2)
|
||||||
metricFilterList2, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1616,8 +1596,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList3)
|
||||||
metricFilterList3, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1629,8 +1609,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList4)
|
||||||
metricFilterList4, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1642,8 +1622,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList5)
|
||||||
metricFilterList5, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
|
@ -1665,7 +1645,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(null, list, null, null));
|
new TimelineDataToRetrieve(null, list, null, null));
|
||||||
int metricCnt = 0;
|
int metricCnt = 0;
|
||||||
for (TimelineEntity entity : es1) {
|
for (TimelineEntity entity : es1) {
|
||||||
|
@ -1690,8 +1670,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList)
|
||||||
metricFilterList, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, list, null, null));
|
new TimelineDataToRetrieve(null, list, null, null));
|
||||||
int metricCnt = 0;
|
int metricCnt = 0;
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
|
@ -1716,8 +1696,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList1)
|
||||||
metricFilterList1, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, metricsToRetrieve, null, null));
|
new TimelineDataToRetrieve(null, metricsToRetrieve, null, null));
|
||||||
metricCnt = 0;
|
metricCnt = 0;
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
|
@ -1733,8 +1713,9 @@ public class TestHBaseTimelineStorageApps {
|
||||||
entities = reader.getEntities(new TimelineReaderContext("cluster1", "user1",
|
entities = reader.getEntities(new TimelineReaderContext("cluster1", "user1",
|
||||||
"some_flow_name", 1002345678919L, null,
|
"some_flow_name", 1002345678919L, null,
|
||||||
TimelineEntityType.YARN_APPLICATION.toString(), null),
|
TimelineEntityType.YARN_APPLICATION.toString(), null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList1)
|
||||||
metricFilterList1, null), new TimelineDataToRetrieve(null,
|
.build(),
|
||||||
|
new TimelineDataToRetrieve(null,
|
||||||
metricsToRetrieve, EnumSet.of(Field.METRICS), Integer.MAX_VALUE));
|
metricsToRetrieve, EnumSet.of(Field.METRICS), Integer.MAX_VALUE));
|
||||||
metricCnt = 0;
|
metricCnt = 0;
|
||||||
int metricValCnt = 0;
|
int metricValCnt = 0;
|
||||||
|
@ -1769,8 +1750,7 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList).build(),
|
||||||
null, null, null),
|
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
int infoCnt = 0;
|
int infoCnt = 0;
|
||||||
|
@ -1786,8 +1766,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList1,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList1)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
infoCnt = 0;
|
infoCnt = 0;
|
||||||
|
@ -1805,8 +1785,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList2,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList2)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1817,8 +1797,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList3,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList3)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1829,8 +1809,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList4,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList4)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1841,8 +1821,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
1002345678919L, null, TimelineEntityType.YARN_APPLICATION.toString(),
|
||||||
null),
|
null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList5,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList5)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,7 +300,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> es1 = reader.getEntities(
|
Set<TimelineEntity> es1 = reader.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, runid, appName,
|
new TimelineReaderContext(cluster, user, flow, runid, appName,
|
||||||
entity.getType(), null),
|
entity.getType(), null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL),
|
||||||
Integer.MAX_VALUE));
|
Integer.MAX_VALUE));
|
||||||
assertNotNull(e1);
|
assertNotNull(e1);
|
||||||
|
@ -455,7 +455,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> es1 = reader.getEntities(
|
Set<TimelineEntity> es1 = reader.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, runid, appName,
|
new TimelineReaderContext(cluster, user, flow, runid, appName,
|
||||||
entity.getType(), null),
|
entity.getType(), null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertNotNull(e1);
|
assertNotNull(e1);
|
||||||
assertEquals(1, es1.size());
|
assertEquals(1, es1.size());
|
||||||
|
@ -553,7 +553,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world",
|
1002345678919L, "application_1231111111_1111", "world",
|
||||||
null), new TimelineEntityFilters(),
|
null), new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
int cfgCnt = 0;
|
int cfgCnt = 0;
|
||||||
|
@ -589,8 +589,9 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, 1425016502000L, 1425016502040L, null,
|
new TimelineEntityFilters.Builder().createdTimeBegin(1425016502000L)
|
||||||
null, null, null, null, null), new TimelineDataToRetrieve());
|
.createTimeEnd(1425016502040L).build(),
|
||||||
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
for (TimelineEntity entity : entities) {
|
for (TimelineEntity entity : entities) {
|
||||||
if (!entity.getId().equals("hello") && !entity.getId().equals("hello1") &&
|
if (!entity.getId().equals("hello") && !entity.getId().equals("hello1") &&
|
||||||
|
@ -602,8 +603,9 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, 1425016502015L, null, null, null, null,
|
new TimelineEntityFilters.Builder().createdTimeBegin(1425016502015L)
|
||||||
null, null, null), new TimelineDataToRetrieve());
|
.build(),
|
||||||
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
for (TimelineEntity entity : entities) {
|
for (TimelineEntity entity : entities) {
|
||||||
if (!entity.getId().equals("hello1") &&
|
if (!entity.getId().equals("hello1") &&
|
||||||
|
@ -614,8 +616,9 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, 1425016502015L, null, null, null,
|
new TimelineEntityFilters.Builder().createTimeEnd(1425016502015L)
|
||||||
null, null, null), new TimelineDataToRetrieve());
|
.build(),
|
||||||
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
for (TimelineEntity entity : entities) {
|
for (TimelineEntity entity : entities) {
|
||||||
if (!entity.getId().equals("hello")) {
|
if (!entity.getId().equals("hello")) {
|
||||||
|
@ -647,8 +650,9 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, relatesTo, isRelatedTo,
|
new TimelineEntityFilters.Builder().relatesTo(relatesTo)
|
||||||
null, null, null, eventFilter), new TimelineDataToRetrieve());
|
.isRelatedTo(isRelatedTo).eventFilters(eventFilter).build(),
|
||||||
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
int eventCnt = 0;
|
int eventCnt = 0;
|
||||||
int isRelatedToCnt = 0;
|
int isRelatedToCnt = 0;
|
||||||
|
@ -676,8 +680,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef).build(),
|
||||||
null, ef),
|
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
int eventCnt = 0;
|
int eventCnt = 0;
|
||||||
|
@ -697,8 +700,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef1).build(),
|
||||||
null, ef1),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
eventCnt = 0;
|
eventCnt = 0;
|
||||||
|
@ -716,8 +718,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef2).build(),
|
||||||
null, ef2),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
eventCnt = 0;
|
eventCnt = 0;
|
||||||
|
@ -738,8 +739,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef3).build(),
|
||||||
null, ef3),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -755,8 +755,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef4).build(),
|
||||||
null, ef4),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
eventCnt = 0;
|
eventCnt = 0;
|
||||||
|
@ -776,8 +775,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(ef5).build(),
|
||||||
null, ef5),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
eventCnt = 0;
|
eventCnt = 0;
|
||||||
|
@ -802,8 +800,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt, null, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
int isRelatedToCnt = 0;
|
int isRelatedToCnt = 0;
|
||||||
|
@ -826,8 +823,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt1, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt1).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
isRelatedToCnt = 0;
|
isRelatedToCnt = 0;
|
||||||
|
@ -849,8 +845,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt2, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt2).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
isRelatedToCnt = 0;
|
isRelatedToCnt = 0;
|
||||||
|
@ -870,8 +865,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt3, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt3).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
isRelatedToCnt = 0;
|
isRelatedToCnt = 0;
|
||||||
|
@ -893,8 +887,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt4, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt4).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -905,8 +898,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt5, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt5).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -925,8 +917,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, irt6, null, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(irt6).build(),
|
||||||
null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
isRelatedToCnt = 0;
|
isRelatedToCnt = 0;
|
||||||
|
@ -951,8 +942,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, rt, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
int relatesToCnt = 0;
|
int relatesToCnt = 0;
|
||||||
|
@ -975,8 +965,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, rt1, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt1).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -998,8 +987,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, rt2, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt2).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -1019,8 +1007,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, rt3, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt3).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -1042,8 +1029,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, rt4, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt4).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1054,8 +1040,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, rt5, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt5).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1074,8 +1059,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, rt6, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt6).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -1110,8 +1094,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, rt7, null, null, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(rt7).build(),
|
||||||
null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
relatesToCnt = 0;
|
relatesToCnt = 0;
|
||||||
|
@ -1138,7 +1121,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> es1 = reader.getEntities(
|
Set<TimelineEntity> es1 = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(3, es1.size());
|
assertEquals(3, es1.size());
|
||||||
for (TimelineEntity e : es1) {
|
for (TimelineEntity e : es1) {
|
||||||
|
@ -1162,7 +1145,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> es1 = reader.getEntities(
|
Set<TimelineEntity> es1 = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(
|
new TimelineDataToRetrieve(
|
||||||
null, null, EnumSet.of(Field.IS_RELATED_TO, Field.METRICS), null));
|
null, null, EnumSet.of(Field.IS_RELATED_TO, Field.METRICS), null));
|
||||||
assertEquals(3, es1.size());
|
assertEquals(3, es1.size());
|
||||||
|
@ -1193,7 +1176,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> es1 = reader.getEntities(
|
Set<TimelineEntity> es1 = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(list, null, null, null));
|
new TimelineDataToRetrieve(list, null, null, null));
|
||||||
int cfgCnt = 0;
|
int cfgCnt = 0;
|
||||||
for (TimelineEntity entity : es1) {
|
for (TimelineEntity entity : es1) {
|
||||||
|
@ -1223,8 +1206,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList)
|
||||||
confFilterList, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
|
@ -1237,8 +1220,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList)
|
||||||
confFilterList, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
cfgCnt = 0;
|
cfgCnt = 0;
|
||||||
|
@ -1253,8 +1236,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList1)
|
||||||
confFilterList1, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
|
@ -1272,8 +1255,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList2)
|
||||||
confFilterList2, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1284,8 +1267,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList3)
|
||||||
confFilterList3, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1296,8 +1279,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList4)
|
||||||
confFilterList4, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1308,8 +1291,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList5)
|
||||||
confFilterList5, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.CONFIGS),
|
||||||
null));
|
null));
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
|
@ -1326,8 +1309,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList)
|
||||||
confFilterList, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(list, null, null, null));
|
new TimelineDataToRetrieve(list, null, null, null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
int cfgCnt = 0;
|
int cfgCnt = 0;
|
||||||
|
@ -1357,8 +1340,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList1)
|
||||||
confFilterList1, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(confsToRetrieve, null, null, null));
|
new TimelineDataToRetrieve(confsToRetrieve, null, null, null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
cfgCnt = 0;
|
cfgCnt = 0;
|
||||||
|
@ -1386,7 +1369,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> es1 = reader.getEntities(
|
Set<TimelineEntity> es1 = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(null, list, null, null));
|
new TimelineDataToRetrieve(null, list, null, null));
|
||||||
int metricCnt = 0;
|
int metricCnt = 0;
|
||||||
for (TimelineEntity entity : es1) {
|
for (TimelineEntity entity : es1) {
|
||||||
|
@ -1414,8 +1397,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList)
|
||||||
metricFilterList, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
|
@ -1428,8 +1411,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList)
|
||||||
metricFilterList, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
metricCnt = 0;
|
metricCnt = 0;
|
||||||
|
@ -1446,8 +1429,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList1)
|
||||||
metricFilterList1, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
|
@ -1465,8 +1448,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList2)
|
||||||
metricFilterList2, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1477,8 +1460,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList3)
|
||||||
metricFilterList3, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1489,8 +1472,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList4)
|
||||||
metricFilterList4, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
@ -1501,8 +1484,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList5)
|
||||||
metricFilterList5, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.METRICS),
|
||||||
null));
|
null));
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
|
@ -1519,8 +1502,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList)
|
||||||
metricFilterList, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, list, null, null));
|
new TimelineDataToRetrieve(null, list, null, null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
int metricCnt = 0;
|
int metricCnt = 0;
|
||||||
|
@ -1548,8 +1531,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList1)
|
||||||
metricFilterList1, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(
|
new TimelineDataToRetrieve(
|
||||||
null, metricsToRetrieve, EnumSet.of(Field.METRICS), null));
|
null, metricsToRetrieve, EnumSet.of(Field.METRICS), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
|
@ -1567,8 +1550,10 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
|
|
||||||
entities = reader.getEntities(new TimelineReaderContext("cluster1", "user1",
|
entities = reader.getEntities(new TimelineReaderContext("cluster1", "user1",
|
||||||
"some_flow_name", 1002345678919L, "application_1231111111_1111",
|
"some_flow_name", 1002345678919L, "application_1231111111_1111",
|
||||||
"world", null), new TimelineEntityFilters(null, null, null, null, null,
|
"world", null),
|
||||||
null, null, metricFilterList1, null), new TimelineDataToRetrieve(null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList1)
|
||||||
|
.build(),
|
||||||
|
new TimelineDataToRetrieve(null,
|
||||||
metricsToRetrieve, EnumSet.of(Field.METRICS), Integer.MAX_VALUE));
|
metricsToRetrieve, EnumSet.of(Field.METRICS), Integer.MAX_VALUE));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
metricCnt = 0;
|
metricCnt = 0;
|
||||||
|
@ -1602,8 +1587,7 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
Set<TimelineEntity> entities = reader.getEntities(
|
Set<TimelineEntity> entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList).build(),
|
||||||
null, null, null),
|
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
int infoCnt = 0;
|
int infoCnt = 0;
|
||||||
|
@ -1618,8 +1602,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList1,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList1)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
infoCnt = 0;
|
infoCnt = 0;
|
||||||
|
@ -1636,8 +1620,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList2,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList2)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1647,8 +1631,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList3,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList3)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1658,8 +1642,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList4,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList4)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1669,8 +1653,8 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
entities = reader.getEntities(
|
entities = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
new TimelineReaderContext("cluster1", "user1", "some_flow_name",
|
||||||
1002345678919L, "application_1231111111_1111", "world", null),
|
1002345678919L, "application_1231111111_1111", "world", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList5,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList5)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.INFO), null));
|
||||||
assertEquals(3, entities.size());
|
assertEquals(3, entities.size());
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,8 +184,7 @@ public class TestHBaseStorageFlowActivity {
|
||||||
Set<TimelineEntity> entities = hbr.getEntities(
|
Set<TimelineEntity> entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, null, null, null, null,
|
new TimelineReaderContext(cluster, null, null, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_ACTIVITY.toString(), null),
|
TimelineEntityType.YARN_FLOW_ACTIVITY.toString(), null),
|
||||||
new TimelineEntityFilters(10L, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().entityLimit(10L).build(),
|
||||||
null, null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
for (TimelineEntity e : entities) {
|
for (TimelineEntity e : entities) {
|
||||||
|
@ -249,8 +248,7 @@ public class TestHBaseStorageFlowActivity {
|
||||||
Set<TimelineEntity> entities = hbr.getEntities(
|
Set<TimelineEntity> entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, null, null,
|
new TimelineReaderContext(cluster, user, flow, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_ACTIVITY.toString(), null),
|
TimelineEntityType.YARN_FLOW_ACTIVITY.toString(), null),
|
||||||
new TimelineEntityFilters(10L, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().entityLimit(10L).build(),
|
||||||
null, null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
for (TimelineEntity e : entities) {
|
for (TimelineEntity e : entities) {
|
||||||
|
@ -377,8 +375,7 @@ public class TestHBaseStorageFlowActivity {
|
||||||
Set<TimelineEntity> entities = hbr.getEntities(
|
Set<TimelineEntity> entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, null, null, null, null,
|
new TimelineReaderContext(cluster, null, null, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_ACTIVITY.toString(), null),
|
TimelineEntityType.YARN_FLOW_ACTIVITY.toString(), null),
|
||||||
new TimelineEntityFilters(10L, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().entityLimit(10L).build(),
|
||||||
null, null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
for (TimelineEntity e : entities) {
|
for (TimelineEntity e : entities) {
|
||||||
|
|
|
@ -608,7 +608,7 @@ public class TestHBaseStorageFlowRun {
|
||||||
Set<TimelineEntity> entities = hbr.getEntities(
|
Set<TimelineEntity> entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, null, null,
|
new TimelineReaderContext(cluster, user, flow, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(null, metricsToRetrieve, null, null));
|
new TimelineDataToRetrieve(null, metricsToRetrieve, null, null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
int metricCnt = 0;
|
int metricCnt = 0;
|
||||||
|
@ -669,7 +669,7 @@ public class TestHBaseStorageFlowRun {
|
||||||
Set<TimelineEntity> entities = hbr.getEntities(
|
Set<TimelineEntity> entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, runid, null,
|
new TimelineReaderContext(cluster, user, flow, runid, null,
|
||||||
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(),
|
new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
for (TimelineEntity timelineEntity : entities) {
|
for (TimelineEntity timelineEntity : entities) {
|
||||||
|
@ -679,7 +679,8 @@ public class TestHBaseStorageFlowRun {
|
||||||
entities = hbr.getEntities(
|
entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, runid, null,
|
new TimelineReaderContext(cluster, user, flow, runid, null,
|
||||||
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(), new TimelineDataToRetrieve(null, null,
|
new TimelineEntityFilters.Builder().build(),
|
||||||
|
new TimelineDataToRetrieve(null, null,
|
||||||
EnumSet.of(Field.METRICS), null));
|
EnumSet.of(Field.METRICS), null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
for (TimelineEntity timelineEntity : entities) {
|
for (TimelineEntity timelineEntity : entities) {
|
||||||
|
@ -850,8 +851,9 @@ public class TestHBaseStorageFlowRun {
|
||||||
Set<TimelineEntity> entities = hbr.getEntities(
|
Set<TimelineEntity> entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow,
|
new TimelineReaderContext(cluster, user, flow,
|
||||||
null, null, TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
null, null, TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(null, 1425016501000L, 1425016502001L, null,
|
new TimelineEntityFilters.Builder().createdTimeBegin(1425016501000L)
|
||||||
null, null, null, null, null), new TimelineDataToRetrieve());
|
.createTimeEnd(1425016502001L).build(),
|
||||||
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
for (TimelineEntity entity : entities) {
|
for (TimelineEntity entity : entities) {
|
||||||
if (!entity.getId().equals("user2@flow_name2/1002345678918") &&
|
if (!entity.getId().equals("user2@flow_name2/1002345678918") &&
|
||||||
|
@ -863,8 +865,9 @@ public class TestHBaseStorageFlowRun {
|
||||||
entities = hbr.getEntities(
|
entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, null, null,
|
new TimelineReaderContext(cluster, user, flow, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(null, 1425016501050L, null, null, null,
|
new TimelineEntityFilters.Builder().createdTimeBegin(1425016501050L)
|
||||||
null, null, null, null), new TimelineDataToRetrieve());
|
.build(),
|
||||||
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
for (TimelineEntity entity : entities) {
|
for (TimelineEntity entity : entities) {
|
||||||
if (!entity.getId().equals("user2@flow_name2/1002345678918")) {
|
if (!entity.getId().equals("user2@flow_name2/1002345678918")) {
|
||||||
|
@ -874,8 +877,9 @@ public class TestHBaseStorageFlowRun {
|
||||||
entities = hbr.getEntities(
|
entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, null, null,
|
new TimelineReaderContext(cluster, user, flow, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(null, null, 1425016501050L, null, null,
|
new TimelineEntityFilters.Builder().createTimeEnd(1425016501050L)
|
||||||
null, null, null, null), new TimelineDataToRetrieve());
|
.build(),
|
||||||
|
new TimelineDataToRetrieve());
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
for (TimelineEntity entity : entities) {
|
for (TimelineEntity entity : entities) {
|
||||||
if (!entity.getId().equals("user2@flow_name2/1002345678919")) {
|
if (!entity.getId().equals("user2@flow_name2/1002345678919")) {
|
||||||
|
@ -941,8 +945,9 @@ public class TestHBaseStorageFlowRun {
|
||||||
Set<TimelineEntity> entities = hbr.getEntities(
|
Set<TimelineEntity> entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, null,
|
new TimelineReaderContext(cluster, user, flow, null,
|
||||||
null, TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
null, TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList)
|
||||||
metricFilterList, null), new TimelineDataToRetrieve(null, null,
|
.build(),
|
||||||
|
new TimelineDataToRetrieve(null, null,
|
||||||
EnumSet.of(Field.METRICS), null));
|
EnumSet.of(Field.METRICS), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
int metricCnt = 0;
|
int metricCnt = 0;
|
||||||
|
@ -958,8 +963,9 @@ public class TestHBaseStorageFlowRun {
|
||||||
entities = hbr.getEntities(
|
entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, null, null,
|
new TimelineReaderContext(cluster, user, flow, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList1)
|
||||||
metricFilterList1, null), new TimelineDataToRetrieve(null, null,
|
.build(),
|
||||||
|
new TimelineDataToRetrieve(null, null,
|
||||||
EnumSet.of(Field.METRICS), null));
|
EnumSet.of(Field.METRICS), null));
|
||||||
assertEquals(1, entities.size());
|
assertEquals(1, entities.size());
|
||||||
metricCnt = 0;
|
metricCnt = 0;
|
||||||
|
@ -974,8 +980,9 @@ public class TestHBaseStorageFlowRun {
|
||||||
entities = hbr.getEntities(
|
entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, null, null,
|
new TimelineReaderContext(cluster, user, flow, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList2)
|
||||||
metricFilterList2, null), new TimelineDataToRetrieve(null, null,
|
.build(),
|
||||||
|
new TimelineDataToRetrieve(null, null,
|
||||||
EnumSet.of(Field.METRICS), null));
|
EnumSet.of(Field.METRICS), null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -984,8 +991,9 @@ public class TestHBaseStorageFlowRun {
|
||||||
entities = hbr.getEntities(
|
entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, null, null,
|
new TimelineReaderContext(cluster, user, flow, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList3)
|
||||||
metricFilterList3, null), new TimelineDataToRetrieve(null, null,
|
.build(),
|
||||||
|
new TimelineDataToRetrieve(null, null,
|
||||||
EnumSet.of(Field.METRICS), null));
|
EnumSet.of(Field.METRICS), null));
|
||||||
assertEquals(0, entities.size());
|
assertEquals(0, entities.size());
|
||||||
|
|
||||||
|
@ -1005,8 +1013,8 @@ public class TestHBaseStorageFlowRun {
|
||||||
entities = hbr.getEntities(
|
entities = hbr.getEntities(
|
||||||
new TimelineReaderContext(cluster, user, flow, null, null,
|
new TimelineReaderContext(cluster, user, flow, null, null,
|
||||||
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList4)
|
||||||
metricFilterList4, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve(null, metricsToRetrieve,
|
new TimelineDataToRetrieve(null, metricsToRetrieve,
|
||||||
EnumSet.of(Field.ALL), null));
|
EnumSet.of(Field.ALL), null));
|
||||||
assertEquals(2, entities.size());
|
assertEquals(2, entities.size());
|
||||||
|
|
|
@ -186,7 +186,7 @@ public abstract class TimelineEntityReader extends
|
||||||
*/
|
*/
|
||||||
protected void createFiltersIfNull() {
|
protected void createFiltersIfNull() {
|
||||||
if (filters == null) {
|
if (filters == null) {
|
||||||
filters = new TimelineEntityFilters();
|
filters = new TimelineEntityFilters.Builder().build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,17 +107,17 @@ import org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineKeyVa
|
||||||
*/
|
*/
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public class TimelineEntityFilters {
|
public final class TimelineEntityFilters {
|
||||||
private long limit;
|
private final long limit;
|
||||||
private long createdTimeBegin;
|
private long createdTimeBegin;
|
||||||
private long createdTimeEnd;
|
private long createdTimeEnd;
|
||||||
private TimelineFilterList relatesTo;
|
private final TimelineFilterList relatesTo;
|
||||||
private TimelineFilterList isRelatedTo;
|
private final TimelineFilterList isRelatedTo;
|
||||||
private TimelineFilterList infoFilters;
|
private final TimelineFilterList infoFilters;
|
||||||
private TimelineFilterList configFilters;
|
private final TimelineFilterList configFilters;
|
||||||
private TimelineFilterList metricFilters;
|
private final TimelineFilterList metricFilters;
|
||||||
private TimelineFilterList eventFilters;
|
private final TimelineFilterList eventFilters;
|
||||||
private String fromId;
|
private final String fromId;
|
||||||
private static final long DEFAULT_BEGIN_TIME = 0L;
|
private static final long DEFAULT_BEGIN_TIME = 0L;
|
||||||
private static final long DEFAULT_END_TIME = Long.MAX_VALUE;
|
private static final long DEFAULT_END_TIME = Long.MAX_VALUE;
|
||||||
|
|
||||||
|
@ -127,30 +127,14 @@ public class TimelineEntityFilters {
|
||||||
*/
|
*/
|
||||||
public static final long DEFAULT_LIMIT = 100;
|
public static final long DEFAULT_LIMIT = 100;
|
||||||
|
|
||||||
public TimelineEntityFilters() {
|
private TimelineEntityFilters(
|
||||||
this(null, null, null, null, null, null, null, null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimelineEntityFilters(Long entityLimit, Long timeBegin, Long timeEnd,
|
|
||||||
TimelineFilterList entityRelatesTo, TimelineFilterList entityIsRelatedTo,
|
|
||||||
TimelineFilterList entityInfoFilters,
|
|
||||||
TimelineFilterList entityConfigFilters,
|
|
||||||
TimelineFilterList entityMetricFilters,
|
|
||||||
TimelineFilterList entityEventFilters, String fromid) {
|
|
||||||
this(entityLimit, timeBegin, timeEnd, entityRelatesTo, entityIsRelatedTo,
|
|
||||||
entityInfoFilters, entityConfigFilters, entityMetricFilters,
|
|
||||||
entityEventFilters);
|
|
||||||
this.fromId = fromid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimelineEntityFilters(
|
|
||||||
Long entityLimit, Long timeBegin, Long timeEnd,
|
Long entityLimit, Long timeBegin, Long timeEnd,
|
||||||
TimelineFilterList entityRelatesTo,
|
TimelineFilterList entityRelatesTo,
|
||||||
TimelineFilterList entityIsRelatedTo,
|
TimelineFilterList entityIsRelatedTo,
|
||||||
TimelineFilterList entityInfoFilters,
|
TimelineFilterList entityInfoFilters,
|
||||||
TimelineFilterList entityConfigFilters,
|
TimelineFilterList entityConfigFilters,
|
||||||
TimelineFilterList entityMetricFilters,
|
TimelineFilterList entityMetricFilters,
|
||||||
TimelineFilterList entityEventFilters) {
|
TimelineFilterList entityEventFilters, String fromId) {
|
||||||
if (entityLimit == null || entityLimit < 0) {
|
if (entityLimit == null || entityLimit < 0) {
|
||||||
this.limit = DEFAULT_LIMIT;
|
this.limit = DEFAULT_LIMIT;
|
||||||
} else {
|
} else {
|
||||||
|
@ -172,97 +156,119 @@ public class TimelineEntityFilters {
|
||||||
this.configFilters = entityConfigFilters;
|
this.configFilters = entityConfigFilters;
|
||||||
this.metricFilters = entityMetricFilters;
|
this.metricFilters = entityMetricFilters;
|
||||||
this.eventFilters = entityEventFilters;
|
this.eventFilters = entityEventFilters;
|
||||||
|
this.fromId = fromId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getLimit() {
|
public long getLimit() {
|
||||||
return limit;
|
return limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLimit(Long entityLimit) {
|
|
||||||
if (entityLimit == null || entityLimit < 0) {
|
|
||||||
this.limit = DEFAULT_LIMIT;
|
|
||||||
} else {
|
|
||||||
this.limit = entityLimit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getCreatedTimeBegin() {
|
public long getCreatedTimeBegin() {
|
||||||
return createdTimeBegin;
|
return createdTimeBegin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatedTimeBegin(Long timeBegin) {
|
|
||||||
if (timeBegin == null || timeBegin < 0) {
|
|
||||||
this.createdTimeBegin = DEFAULT_BEGIN_TIME;
|
|
||||||
} else {
|
|
||||||
this.createdTimeBegin = timeBegin;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getCreatedTimeEnd() {
|
public long getCreatedTimeEnd() {
|
||||||
return createdTimeEnd;
|
return createdTimeEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatedTimeEnd(Long timeEnd) {
|
|
||||||
if (timeEnd == null || timeEnd < 0) {
|
|
||||||
this.createdTimeEnd = DEFAULT_END_TIME;
|
|
||||||
} else {
|
|
||||||
this.createdTimeEnd = timeEnd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimelineFilterList getRelatesTo() {
|
public TimelineFilterList getRelatesTo() {
|
||||||
return relatesTo;
|
return relatesTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRelatesTo(TimelineFilterList relations) {
|
|
||||||
this.relatesTo = relations;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimelineFilterList getIsRelatedTo() {
|
public TimelineFilterList getIsRelatedTo() {
|
||||||
return isRelatedTo;
|
return isRelatedTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsRelatedTo(TimelineFilterList relations) {
|
|
||||||
this.isRelatedTo = relations;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimelineFilterList getInfoFilters() {
|
public TimelineFilterList getInfoFilters() {
|
||||||
return infoFilters;
|
return infoFilters;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInfoFilters(TimelineFilterList filters) {
|
|
||||||
this.infoFilters = filters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimelineFilterList getConfigFilters() {
|
public TimelineFilterList getConfigFilters() {
|
||||||
return configFilters;
|
return configFilters;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConfigFilters(TimelineFilterList filters) {
|
|
||||||
this.configFilters = filters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimelineFilterList getMetricFilters() {
|
public TimelineFilterList getMetricFilters() {
|
||||||
return metricFilters;
|
return metricFilters;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMetricFilters(TimelineFilterList filters) {
|
|
||||||
this.metricFilters = filters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimelineFilterList getEventFilters() {
|
public TimelineFilterList getEventFilters() {
|
||||||
return eventFilters;
|
return eventFilters;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEventFilters(TimelineFilterList filters) {
|
|
||||||
this.eventFilters = filters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFromId() {
|
public String getFromId() {
|
||||||
return fromId;
|
return fromId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFromId(String fromId) {
|
/**
|
||||||
this.fromId = fromId;
|
* A builder class to build an instance of TimelineEntityFilters.
|
||||||
|
*/
|
||||||
|
public static class Builder {
|
||||||
|
private Long entityLimit;
|
||||||
|
private Long createdTimeBegin;
|
||||||
|
private Long createdTimeEnd;
|
||||||
|
private TimelineFilterList relatesToFilters;
|
||||||
|
private TimelineFilterList isRelatedToFilters;
|
||||||
|
private TimelineFilterList entityInfoFilters;
|
||||||
|
private TimelineFilterList entityConfigFilters;
|
||||||
|
private TimelineFilterList entityMetricFilters;
|
||||||
|
private TimelineFilterList entityEventFilters;
|
||||||
|
private String entityFromId;
|
||||||
|
|
||||||
|
public Builder entityLimit(Long limit) {
|
||||||
|
this.entityLimit = limit;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder createdTimeBegin(Long timeBegin) {
|
||||||
|
this.createdTimeBegin = timeBegin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder createTimeEnd(Long timeEnd) {
|
||||||
|
this.createdTimeEnd = timeEnd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder relatesTo(TimelineFilterList relatesTo) {
|
||||||
|
this.relatesToFilters = relatesTo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder isRelatedTo(TimelineFilterList isRelatedTo) {
|
||||||
|
this.isRelatedToFilters = isRelatedTo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder infoFilters(TimelineFilterList infoFilters) {
|
||||||
|
this.entityInfoFilters = infoFilters;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder configFilters(TimelineFilterList configFilters) {
|
||||||
|
this.entityConfigFilters = configFilters;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder metricFilters(TimelineFilterList metricFilters) {
|
||||||
|
this.entityMetricFilters = metricFilters;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder eventFilters(TimelineFilterList eventFilters) {
|
||||||
|
this.entityEventFilters = eventFilters;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder fromId(String fromId) {
|
||||||
|
this.entityFromId = fromId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimelineEntityFilters build() {
|
||||||
|
return new TimelineEntityFilters(entityLimit, createdTimeBegin,
|
||||||
|
createdTimeEnd, relatesToFilters, isRelatedToFilters,
|
||||||
|
entityInfoFilters, entityConfigFilters, entityMetricFilters,
|
||||||
|
entityEventFilters, entityFromId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1393,10 +1393,8 @@ public class TimelineReaderWebServices {
|
||||||
DateRange range = parseDateRange(dateRange);
|
DateRange range = parseDateRange(dateRange);
|
||||||
TimelineEntityFilters entityFilters =
|
TimelineEntityFilters entityFilters =
|
||||||
TimelineReaderWebServicesUtils.createTimelineEntityFilters(
|
TimelineReaderWebServicesUtils.createTimelineEntityFilters(
|
||||||
limit, null, null, null, null, null, null, null, null,
|
limit, range.dateStart, range.dateEnd,
|
||||||
fromId);
|
null, null, null, null, null, null, fromId);
|
||||||
entityFilters.setCreatedTimeBegin(range.dateStart);
|
|
||||||
entityFilters.setCreatedTimeEnd(range.dateEnd);
|
|
||||||
entities = timelineReaderManager.getEntities(
|
entities = timelineReaderManager.getEntities(
|
||||||
TimelineReaderWebServicesUtils.createTimelineReaderContext(
|
TimelineReaderWebServicesUtils.createTimelineReaderContext(
|
||||||
clusterId, null, null, null, null,
|
clusterId, null, null, null, null,
|
||||||
|
|
|
@ -76,12 +76,44 @@ final class TimelineReaderWebServicesUtils {
|
||||||
String isRelatedTo, String infofilters, String conffilters,
|
String isRelatedTo, String infofilters, String conffilters,
|
||||||
String metricfilters, String eventfilters,
|
String metricfilters, String eventfilters,
|
||||||
String fromid) throws TimelineParseException {
|
String fromid) throws TimelineParseException {
|
||||||
return new TimelineEntityFilters(parseLongStr(limit),
|
return createTimelineEntityFilters(
|
||||||
parseLongStr(createdTimeStart), parseLongStr(createdTimeEnd),
|
limit, parseLongStr(createdTimeStart),
|
||||||
parseRelationFilters(relatesTo), parseRelationFilters(isRelatedTo),
|
parseLongStr(createdTimeEnd),
|
||||||
parseKVFilters(infofilters, false), parseKVFilters(conffilters, true),
|
relatesTo, isRelatedTo, infofilters,
|
||||||
parseMetricFilters(metricfilters), parseEventFilters(eventfilters),
|
conffilters, metricfilters, eventfilters, fromid);
|
||||||
parseStr(fromid));
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse the passed filters represented as strings and convert them into a
|
||||||
|
* {@link TimelineEntityFilters} object.
|
||||||
|
* @param limit Limit to number of entities to return.
|
||||||
|
* @param createdTimeStart Created time start for the entities to return.
|
||||||
|
* @param createdTimeEnd Created time end for the entities to return.
|
||||||
|
* @param relatesTo Entities to return must match relatesTo.
|
||||||
|
* @param isRelatedTo Entities to return must match isRelatedTo.
|
||||||
|
* @param infofilters Entities to return must match these info filters.
|
||||||
|
* @param conffilters Entities to return must match these metric filters.
|
||||||
|
* @param metricfilters Entities to return must match these metric filters.
|
||||||
|
* @param eventfilters Entities to return must match these event filters.
|
||||||
|
* @return a {@link TimelineEntityFilters} object.
|
||||||
|
* @throws TimelineParseException if any problem occurs during parsing.
|
||||||
|
*/
|
||||||
|
static TimelineEntityFilters createTimelineEntityFilters(String limit,
|
||||||
|
Long createdTimeStart, Long createdTimeEnd, String relatesTo,
|
||||||
|
String isRelatedTo, String infofilters, String conffilters,
|
||||||
|
String metricfilters, String eventfilters,
|
||||||
|
String fromid) throws TimelineParseException {
|
||||||
|
return new TimelineEntityFilters.Builder()
|
||||||
|
.entityLimit(parseLongStr(limit))
|
||||||
|
.createdTimeBegin(createdTimeStart)
|
||||||
|
.createTimeEnd(createdTimeEnd)
|
||||||
|
.relatesTo(parseRelationFilters(relatesTo))
|
||||||
|
.isRelatedTo(parseRelationFilters(isRelatedTo))
|
||||||
|
.infoFilters(parseKVFilters(infofilters, false))
|
||||||
|
.configFilters(parseKVFilters(conffilters, true))
|
||||||
|
.metricFilters(parseMetricFilters(metricfilters))
|
||||||
|
.eventFilters(parseEventFilters(eventfilters))
|
||||||
|
.fromId(parseStr(fromid)).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -398,7 +398,7 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
public void testGetAllEntities() throws Exception {
|
public void testGetAllEntities() throws Exception {
|
||||||
Set<TimelineEntity> result = reader.getEntities(
|
Set<TimelineEntity> result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null), new TimelineEntityFilters(),
|
"app", null), new TimelineEntityFilters.Builder().build(),
|
||||||
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
new TimelineDataToRetrieve(null, null, EnumSet.of(Field.ALL), null));
|
||||||
// All 4 entities will be returned
|
// All 4 entities will be returned
|
||||||
Assert.assertEquals(4, result.size());
|
Assert.assertEquals(4, result.size());
|
||||||
|
@ -409,8 +409,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
Set<TimelineEntity> result = reader.getEntities(
|
Set<TimelineEntity> result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(2L, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().entityLimit(2L).build(),
|
||||||
null, null), new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(2, result.size());
|
Assert.assertEquals(2, result.size());
|
||||||
// Needs to be rewritten once hashcode and equals for
|
// Needs to be rewritten once hashcode and equals for
|
||||||
// TimelineEntity is implemented
|
// TimelineEntity is implemented
|
||||||
|
@ -424,8 +424,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(3L, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().entityLimit(3L).build(),
|
||||||
null, null), new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
// Even though 2 entities out of 4 have same created time, one entity
|
// Even though 2 entities out of 4 have same created time, one entity
|
||||||
// is left out due to limit
|
// is left out due to limit
|
||||||
Assert.assertEquals(3, result.size());
|
Assert.assertEquals(3, result.size());
|
||||||
|
@ -437,8 +437,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
Set<TimelineEntity> result = reader.getEntities(
|
Set<TimelineEntity> result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, 1425016502030L, 1425016502060L, null,
|
new TimelineEntityFilters.Builder().createdTimeBegin(1425016502030L)
|
||||||
null, null, null, null, null),
|
.createTimeEnd(1425016502060L).build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
// Only one entity with ID id_4 should be returned.
|
// Only one entity with ID id_4 should be returned.
|
||||||
|
@ -452,8 +452,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, 1425016502010L, null, null,
|
new TimelineEntityFilters.Builder().createTimeEnd(1425016502010L)
|
||||||
null, null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(3, result.size());
|
Assert.assertEquals(3, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -466,8 +466,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, 1425016502010L, null, null, null,
|
new TimelineEntityFilters.Builder().createdTimeBegin(1425016502010L)
|
||||||
null, null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -486,8 +486,7 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
Set<TimelineEntity> result = reader.getEntities(
|
Set<TimelineEntity> result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList).build(),
|
||||||
null, null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
// Only one entity with ID id_3 should be returned.
|
// Only one entity with ID id_3 should be returned.
|
||||||
|
@ -506,8 +505,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList)
|
||||||
confFilterList, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -525,8 +524,7 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().eventFilters(eventFilters).build(),
|
||||||
null, eventFilters),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -542,8 +540,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList)
|
||||||
metricFilterList, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(2, result.size());
|
Assert.assertEquals(2, result.size());
|
||||||
// Two entities with IDs' id_1 and id_2 should be returned.
|
// Two entities with IDs' id_1 and id_2 should be returned.
|
||||||
|
@ -569,8 +567,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList1)
|
||||||
confFilterList1, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(2, result.size());
|
Assert.assertEquals(2, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -592,8 +590,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList2)
|
||||||
confFilterList2, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(2, result.size());
|
Assert.assertEquals(2, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -610,8 +608,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList3)
|
||||||
confFilterList3, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
for(TimelineEntity entity : result) {
|
for(TimelineEntity entity : result) {
|
||||||
|
@ -628,8 +626,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList4)
|
||||||
confFilterList4, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(0, result.size());
|
Assert.assertEquals(0, result.size());
|
||||||
|
|
||||||
|
@ -641,8 +639,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().configFilters(confFilterList5)
|
||||||
confFilterList5, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -665,8 +663,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList1)
|
||||||
metricFilterList1, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(2, result.size());
|
Assert.assertEquals(2, result.size());
|
||||||
// Two entities with IDs' id_2 and id_3 should be returned.
|
// Two entities with IDs' id_2 and id_3 should be returned.
|
||||||
|
@ -684,8 +682,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList2)
|
||||||
metricFilterList2, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -702,8 +700,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList3)
|
||||||
metricFilterList3, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(0, result.size());
|
Assert.assertEquals(0, result.size());
|
||||||
|
|
||||||
|
@ -715,8 +713,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList4)
|
||||||
metricFilterList4, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(2, result.size());
|
Assert.assertEquals(2, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -731,8 +729,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, null, null,
|
new TimelineEntityFilters.Builder().metricFilters(metricFilterList5)
|
||||||
metricFilterList5, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(2, result.size());
|
Assert.assertEquals(2, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -749,8 +747,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList1,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList1)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(0, result.size());
|
Assert.assertEquals(0, result.size());
|
||||||
|
|
||||||
|
@ -762,8 +760,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList2,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList2)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(2, result.size());
|
Assert.assertEquals(2, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -780,8 +778,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList3,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList3)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(0, result.size());
|
Assert.assertEquals(0, result.size());
|
||||||
|
|
||||||
|
@ -793,8 +791,8 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, null, infoFilterList4,
|
new TimelineEntityFilters.Builder().infoFilters(infoFilterList4)
|
||||||
null, null, null),
|
.build(),
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
for (TimelineEntity entity : result) {
|
for (TimelineEntity entity : result) {
|
||||||
|
@ -815,8 +813,7 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
Set<TimelineEntity> result = reader.getEntities(
|
Set<TimelineEntity> result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, relatesTo, null, null,
|
new TimelineEntityFilters.Builder().relatesTo(relatesTo).build(),
|
||||||
null, null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(1, result.size());
|
Assert.assertEquals(1, result.size());
|
||||||
// Only one entity with ID id_1 should be returned.
|
// Only one entity with ID id_1 should be returned.
|
||||||
|
@ -835,8 +832,7 @@ public class TestFileSystemTimelineReaderImpl {
|
||||||
result = reader.getEntities(
|
result = reader.getEntities(
|
||||||
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
|
||||||
"app", null),
|
"app", null),
|
||||||
new TimelineEntityFilters(null, null, null, null, isRelatedTo, null,
|
new TimelineEntityFilters.Builder().isRelatedTo(isRelatedTo).build(),
|
||||||
null, null, null),
|
|
||||||
new TimelineDataToRetrieve());
|
new TimelineDataToRetrieve());
|
||||||
Assert.assertEquals(2, result.size());
|
Assert.assertEquals(2, result.size());
|
||||||
// Two entities with IDs' id_1 and id_3 should be returned.
|
// Two entities with IDs' id_1 and id_3 should be returned.
|
||||||
|
|
Loading…
Reference in New Issue