Skip to content

Commit

Permalink
Mark dagActionsDeleted metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Urmi Mustafi committed Jul 22, 2024
1 parent 776068b commit 6f15319
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ public boolean deleteDagAction(DagAction dagAction) throws IOException {
try {
fillPreparedStatement(dagAction.getFlowGroup(), dagAction.getFlowName(), dagAction.getFlowExecutionId(),
dagAction.getJobName(), dagAction.getDagActionType(), deleteStatement);
this.dagProcessingEngineMetrics.markDagActionsDeleted(dagAction.getDagActionType(), true);
return deleteStatement.executeUpdate() != 0;
} catch (SQLException e) {
this.dagProcessingEngineMetrics.markDagActionsDeleted(dagAction.getDagActionType(), false);
throw new IOException(String.format("Failure deleting action for DagAction: %s in table %s", dagAction,
tableName), e);
}}, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public class DagProcessingEngineMetrics {
private final HashMap<DagActionStore.DagActionType, ContextAwareMeter> dagActionsActSucceededMeterByDagActionType = new HashMap<>();
private final HashMap<DagActionStore.DagActionType, ContextAwareMeter> dagActionsConcludeFailedMeterByDagActionType = new HashMap<>();
private final HashMap<DagActionStore.DagActionType, ContextAwareMeter> dagActionsConcludeSucceededMeterByDagActionType = new HashMap<>();
// TODO: mark these metrics
private final HashMap<DagActionStore.DagActionType, ContextAwareMeter> dagActionsDeleteFailedMeterByDagActionType = new HashMap<>();
private final HashMap<DagActionStore.DagActionType, ContextAwareMeter> dagActionsDeleteSucceededMeterByDagActionType = new HashMap<>();
private final HashMap<DagActionStore.DagActionType, ContextAwareMeter> dagActionsAverageProcessingDelayMillisMeterByDagActionType = new HashMap<>();
Expand Down Expand Up @@ -163,8 +162,7 @@ public void markDagActionsConclude(DagActionStore.DagActionType dagActionType, b
updateMetricForDagActionType(this.dagActionsConcludeFailedMeterByDagActionType, dagActionType);
}
}

// TODO: mark this metric when deleted

public void markDagActionsDeleted(DagActionStore.DagActionType dagActionType, boolean succeeded) {
if (succeeded) {
updateMetricForDagActionType(this.dagActionsDeleteSucceededMeterByDagActionType, dagActionType);
Expand Down

0 comments on commit 6f15319

Please sign in to comment.