[jira] [Commented] (MESOS-3339) Implement filtering mechanism for (Scheduler API Events) Testing
[ https://issues.apache.org/jira/browse/MESOS-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15095406#comment-15095406 ] Kapil Arya commented on MESOS-3339: --- [~anandmazumdar]: Shall we push it to 0.28.0? > Implement filtering mechanism for (Scheduler API Events) Testing > > > Key: MESOS-3339 > URL: https://issues.apache.org/jira/browse/MESOS-3339 > Project: Mesos > Issue Type: Task > Components: test >Reporter: Anand Mazumdar >Assignee: Anand Mazumdar > Labels: mesosphere > > Currently, our testing infrastructure does not have a mechanism of > filtering/dropping HTTP events of a particular type from the Scheduler API > response stream. We need a {{DROP_HTTP_CALLS}} abstraction that can help us > to filter a particular event type. > {code} > // Enqueues all received events into a libprocess queue. > ACTION_P(Enqueue, queue) > { > std::queue events = arg0; > while (!events.empty()) { > // Note that we currently drop HEARTBEATs because most of these tests > // are not designed to deal with heartbeats. > // TODO(vinod): Implement DROP_HTTP_CALLS that can filter heartbeats. > if (events.front().type() == Event::HEARTBEAT) { > VLOG(1) << "Ignoring HEARTBEAT event"; > } else { > queue->put(events.front()); > } > events.pop(); > } > } > {code} > This helper code is duplicated in at least two places currently, Scheduler > Library/Maintenance Primitives tests. > - The solution can be as trivial as moving this helper function to a common > test-header. > - Implement a {{DROP_HTTP_CALLS}} similar to what we do for other protobufs > via {{DROP_CALLS}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3339) Implement filtering mechanism for (Scheduler API Events) Testing
[ https://issues.apache.org/jira/browse/MESOS-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14993480#comment-14993480 ] Till Toenshoff commented on MESOS-3339: --- [~anandmazumdar] we are preparing to tag the 0.26.0 release. The posted RR seems to be work-in-progress. Shall we push this one to 0.27.0? > Implement filtering mechanism for (Scheduler API Events) Testing > > > Key: MESOS-3339 > URL: https://issues.apache.org/jira/browse/MESOS-3339 > Project: Mesos > Issue Type: Task > Components: test >Reporter: Anand Mazumdar >Assignee: Anand Mazumdar > Labels: mesosphere > > Currently, our testing infrastructure does not have a mechanism of > filtering/dropping HTTP events of a particular type from the Scheduler API > response stream. We need a {{DROP_HTTP_CALLS}} abstraction that can help us > to filter a particular event type. > {code} > // Enqueues all received events into a libprocess queue. > ACTION_P(Enqueue, queue) > { > std::queue events = arg0; > while (!events.empty()) { > // Note that we currently drop HEARTBEATs because most of these tests > // are not designed to deal with heartbeats. > // TODO(vinod): Implement DROP_HTTP_CALLS that can filter heartbeats. > if (events.front().type() == Event::HEARTBEAT) { > VLOG(1) << "Ignoring HEARTBEAT event"; > } else { > queue->put(events.front()); > } > events.pop(); > } > } > {code} > This helper code is duplicated in at least two places currently, Scheduler > Library/Maintenance Primitives tests. > - The solution can be as trivial as moving this helper function to a common > test-header. > - Implement a {{DROP_HTTP_CALLS}} similar to what we do for other protobufs > via {{DROP_CALLS}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3339) Implement filtering mechanism for (Scheduler API Events) Testing
[ https://issues.apache.org/jira/browse/MESOS-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14993492#comment-14993492 ] Anand Mazumdar commented on MESOS-3339: --- Yep, Sure. > Implement filtering mechanism for (Scheduler API Events) Testing > > > Key: MESOS-3339 > URL: https://issues.apache.org/jira/browse/MESOS-3339 > Project: Mesos > Issue Type: Task > Components: test >Reporter: Anand Mazumdar >Assignee: Anand Mazumdar > Labels: mesosphere > > Currently, our testing infrastructure does not have a mechanism of > filtering/dropping HTTP events of a particular type from the Scheduler API > response stream. We need a {{DROP_HTTP_CALLS}} abstraction that can help us > to filter a particular event type. > {code} > // Enqueues all received events into a libprocess queue. > ACTION_P(Enqueue, queue) > { > std::queue events = arg0; > while (!events.empty()) { > // Note that we currently drop HEARTBEATs because most of these tests > // are not designed to deal with heartbeats. > // TODO(vinod): Implement DROP_HTTP_CALLS that can filter heartbeats. > if (events.front().type() == Event::HEARTBEAT) { > VLOG(1) << "Ignoring HEARTBEAT event"; > } else { > queue->put(events.front()); > } > events.pop(); > } > } > {code} > This helper code is duplicated in at least two places currently, Scheduler > Library/Maintenance Primitives tests. > - The solution can be as trivial as moving this helper function to a common > test-header. > - Implement a {{DROP_HTTP_CALLS}} similar to what we do for other protobufs > via {{DROP_CALLS}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3339) Implement filtering mechanism for (Scheduler API Events) Testing
[ https://issues.apache.org/jira/browse/MESOS-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14723765#comment-14723765 ] Vinod Kone commented on MESOS-3339: --- Why not implement DROP_HTTP_CALLS much like what we did for DROP_CALLS? > Implement filtering mechanism for (Scheduler API Events) Testing > > > Key: MESOS-3339 > URL: https://issues.apache.org/jira/browse/MESOS-3339 > Project: Mesos > Issue Type: Task > Components: test >Reporter: Anand Mazumdar > > Currently, our testing infrastructure does not have a mechanism of > filtering/dropping HTTP events of a particular type from the Scheduler API > response stream. We need a {{DROP_HTTP_CALLS}} abstraction that can help us > to filter a particular event type. > {code} > // Enqueues all received events into a libprocess queue. > ACTION_P(Enqueue, queue) > { > std::queue events = arg0; > while (!events.empty()) { > // Note that we currently drop HEARTBEATs because most of these tests > // are not designed to deal with heartbeats. > // TODO(vinod): Implement DROP_HTTP_CALLS that can filter heartbeats. > if (events.front().type() == Event::HEARTBEAT) { > VLOG(1) << "Ignoring HEARTBEAT event"; > } else { > queue->put(events.front()); > } > events.pop(); > } > } > {code} > This helper code is duplicated in at least two places currently, Scheduler > Library/Maintenance Primitives tests. The solution can be as trivial as > moving this helper function to a common test-header or implement a decorator > reader class over {{RecordIOReader}} having the functionality of filtering > events. There might be other alternative approaches too. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3339) Implement filtering mechanism for (Scheduler API Events) Testing
[ https://issues.apache.org/jira/browse/MESOS-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14723789#comment-14723789 ] Anand Mazumdar commented on MESOS-3339: --- Modified description to list it as a possible approach. I wasn't immediately sure if this could be done similar to the DROP_CALLS abstraction and hence had not specified it before. > Implement filtering mechanism for (Scheduler API Events) Testing > > > Key: MESOS-3339 > URL: https://issues.apache.org/jira/browse/MESOS-3339 > Project: Mesos > Issue Type: Task > Components: test >Reporter: Anand Mazumdar > > Currently, our testing infrastructure does not have a mechanism of > filtering/dropping HTTP events of a particular type from the Scheduler API > response stream. We need a {{DROP_HTTP_CALLS}} abstraction that can help us > to filter a particular event type. > {code} > // Enqueues all received events into a libprocess queue. > ACTION_P(Enqueue, queue) > { > std::queue events = arg0; > while (!events.empty()) { > // Note that we currently drop HEARTBEATs because most of these tests > // are not designed to deal with heartbeats. > // TODO(vinod): Implement DROP_HTTP_CALLS that can filter heartbeats. > if (events.front().type() == Event::HEARTBEAT) { > VLOG(1) << "Ignoring HEARTBEAT event"; > } else { > queue->put(events.front()); > } > events.pop(); > } > } > {code} > This helper code is duplicated in at least two places currently, Scheduler > Library/Maintenance Primitives tests. > - The solution can be as trivial as moving this helper function to a common > test-header > - Implement a decorator reader class over {{RecordIOReader}} having the > functionality of filtering events. > - Implement a {{DROP_HTTP_CALLS}} similar to what we do for other protobufs > via {{DROP_CALLS}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)