agam-99 opened a new pull request, #4209: URL: https://github.com/apache/gobblin/pull/4209
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 - [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title: - https://issues.apache.org/jira/browse/GOBBLIN-XXXX ### Description - [x] Here are some details about my PR, including screenshots (if applicable): `GaaSJobObservabilityEvent.datasetsMetrics[]` (`DatasetMetric`) only models writes: `bytesWritten`, `entitiesWritten`, `successfullyCommitted`, `dataQualityStatus`, and, since GOBBLIN-2269, `snapshotsCommitted` / `partitionsCommitted`. Data-retention (deletion) jobs have no way to report per-dataset work through this channel. A job that removes aged-out dataset versions can already emit one `datasetTaskSummaries` entry per dataset root, but the deletion counts are dropped when GaaS parses them into `DatasetTaskSummary`. This PR adds three optional, retention-only counts and threads them through. It follows the same pattern as GOBBLIN-2269 (#4206). - **`GaaSJobObservabilityEvent.avsc`**: `DatasetMetric` gains three fields, each `["null","long"]` with `default: null`: - `versionsTotal`: versions considered under the dataset root (deletable + retained); - `versionsDeleted`: versions deleted, or on a dry run, those that would be; - `directoriesPruned`: now-empty parent directories pruned after the deletes. Because they are nullable with null defaults, the schema change is backward compatible, and every existing producer and consumer is unaffected. - **`DatasetTaskSummary`**: adds the three fields as nullable `Long`, intentionally **not** `@NonNull`. That keeps the 5-arg `@RequiredArgsConstructor` used by `AbstractJobLauncher` and `CommitActivityImpl` intact. The fields are populated by Gson during deserialization of events that carry them. `toDatasetMetric` maps them through, and they stay `null` for write jobs. The first producer is the ddm-executor retention run (linkedin-multiproduct/ddm-executor#507). It emits one row per dataset root in a single `JobSummaryTimer` event, rather than one event per dataset, which would collide on the job-execution identity. Each row carries `recordsWritten = bytesWritten = 0` plus these counts. ### Tests - [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason: New `DatasetTaskSummaryTest`: - `testToDatasetMetricMapsRetentionCountsFromJson`: parses the exact JSON a retention run emits, via `GsonUtils.GSON_WITH_DATE_HANDLING` (the path `GaaSJobObservabilityEventProducer` uses), and asserts the counts reach `DatasetMetric`. - `testToDatasetMetricLeavesRetentionCountsNullForWriteJobs`: the existing 5-arg write-job summary maps the new fields to `null`. The existing `GaaSJobObservabilityProducerTest` still passes, so write-job `datasetsMetrics` are unchanged. ### Commits - [x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)": 1. Subject is separated from body by a blank line 2. Subject is limited to 50 characters 3. Subject does not end with a period 4. Subject uses the imperative mood ("add", not "adding") 5. Body wraps at 72 characters 6. Body explains "what" and "why", not "how" -- 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]
