Skip to content

[GOBBLIN-XXXX] Surface snapshot/partition copy metrics in observability#4206

Open
pratapaditya04 wants to merge 1 commit into
apache:masterfrom
pratapaditya04:adityasi/ddm-copy-metrics-observability
Open

[GOBBLIN-XXXX] Surface snapshot/partition copy metrics in observability#4206
pratapaditya04 wants to merge 1 commit into
apache:masterfrom
pratapaditya04:adityasi/ddm-copy-metrics-observability

Conversation

@pratapaditya04

Copy link
Copy Markdown
Contributor

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

Description

  • Here are some details about my PR:

Adds per-dataset snapshotsCommitted and partitionsCommitted counts to the observability surfaces so file/blob movement jobs (e.g. Iceberg snapshot replication) can report the number of table snapshots and partitions committed in a run.

GaaSJobObservabilityEvent

  • GaaSJobObservabilityEvent.avsc: add snapshotsCommitted + partitionsCommitted to the DatasetMetric record (long, default -1 = unsupported/unknown).
  • DatasetTaskSummary: carry the two counts as non-@NonNull long fields so the existing 5-arg @RequiredArgsConstructor (used by AbstractJobLauncher) is preserved; they populate via JSON deserialization for events that supply them. toDatasetMetric maps them onto the regenerated DatasetMetric.

Job-status REST API

  • JobStatistics.pdl (executionStatistics): add optional bytesWritten, recordsWritten, filesCommitted, snapshotsCommitted, partitionsCommitted.
  • JobStatusRetriever: read them from the flat per-dataset copy-metric keys the JobSummary event persists into the job state (-1 = absent/unsupported).
  • FlowExecutionResource: set each on JobStatistics only when reported (>= 0), so jobs that do not emit them are unchanged.

Backward compatible: all new fields default to -1/absent; native Gobblin call sites are unchanged.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Schema/plumbing change validated by codegen + compilation: generateAvro regenerates DatasetMetric (7-arg ctor + fields); generateDataTemplate regenerates JobStatistics setters; :gobblin-runtime:compileJava and the flow-config-service-server module compile pass. End-to-end population is exercised by the companion producer-side change and its unit tests.

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue.

Add per-dataset snapshotsCommitted and partitionsCommitted counts to both the
GaaSJobObservabilityEvent DatasetMetric and the job-status JobStatistics REST
surface, so file/blob movement jobs (e.g. DDM Iceberg snapshot replication) can
report table snapshots and partitions committed.

DatasetMetric (GaaSJobObservabilityEvent.avsc) gains snapshotsCommitted and
partitionsCommitted (long, default -1 = unsupported/unknown). DatasetTaskSummary
carries the two counts as non-@nonnull fields so the existing 5-arg
RequiredArgsConstructor used by AbstractJobLauncher is preserved; they populate
via JSON deserialization for events that supply them, and toDatasetMetric maps
them through.

JobStatistics (executionStatistics) gains optional bytesWritten, recordsWritten,
filesCommitted, snapshotsCommitted and partitionsCommitted. JobStatusRetriever
reads them from the flat ddm.* copy-metric keys the JobSummary event persists
into the job state, and FlowExecutionResource sets each only when reported, so
jobs that do not emit them are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant