umustafi commented on code in PR #3841:
URL: https://github.com/apache/gobblin/pull/3841#discussion_r1414779425
##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java:
##########
@@ -107,6 +115,37 @@ protected void assignTopicPartitions() {
return;
}
+ /**
+ * Load all actions from the DagActionStore to process any missed actions
during service startup
+ */
+ private void initializeMonitor() {
+ // TODO: exclude the dag actions that have a lease in the arbiter store if
this is processing too many events
+ Collection<DagActionStore.DagAction> dagActions = null;
+ try {
+ dagActions = dagActionStore.getDagActions();
+ } catch (IOException e) {
+ // TODO: handle this exception
+ throw new RuntimeException(e);
+ }
+ // TODO: make this multi-threaded to add parallelism
+ for (DagActionStore.DagAction action : dagActions) {
+ switch (action.getFlowActionType()) {
+ case KILL:
+ dagManager.handleKillFlowRequest(action.getFlowGroup(),
action.getFlowName(), Long.parseLong(action.getFlowExecutionId()));
+ break;
+ case RESUME:
+ dagManager.handleResumeFlowRequest(action.getFlowGroup(),
action.getFlowName(), Long.parseLong(action.getFlowExecutionId()));
+ break;
+ case LAUNCH:
Review Comment:
No we don't. I guess that is worth doing since we can't compile/add them so
no point repeatedly accumulating and trying them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]