diff --git a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MysqlDagActionStore.java b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MysqlDagActionStore.java index f5b8aa277ab..0e4d10940ce 100644 --- a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MysqlDagActionStore.java +++ b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MysqlDagActionStore.java @@ -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); diff --git a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/task/DagProcessingEngineMetrics.java b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/task/DagProcessingEngineMetrics.java index bcc366c5176..d8900ac8bea 100644 --- a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/task/DagProcessingEngineMetrics.java +++ b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/task/DagProcessingEngineMetrics.java @@ -59,7 +59,6 @@ public class DagProcessingEngineMetrics { private final HashMap dagActionsActSucceededMeterByDagActionType = new HashMap<>(); private final HashMap dagActionsConcludeFailedMeterByDagActionType = new HashMap<>(); private final HashMap dagActionsConcludeSucceededMeterByDagActionType = new HashMap<>(); - // TODO: mark these metrics private final HashMap dagActionsDeleteFailedMeterByDagActionType = new HashMap<>(); private final HashMap dagActionsDeleteSucceededMeterByDagActionType = new HashMap<>(); private final HashMap dagActionsAverageProcessingDelayMillisMeterByDagActionType = new HashMap<>(); @@ -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);