Skip to content

Conversation

@Blazer-007
Copy link
Member

@Blazer-007 Blazer-007 commented Nov 19, 2025

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, including screenshots (if applicable):
    In Gobblin-on-Temporal, GTE can be emitted from any container in case of more than 1 containers if event queue has very less GTE those are flushed while closing only and sometimes due to early SIGKILL sent from Yarn NM GTE couldn't be flushed properly.
    Have introduced pushMessagesSync in Pusher.java interface with default implementation to call async only for backward compatibility

Tests

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

Commits

  • 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":
    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"

@Blazer-007 Blazer-007 changed the title [GOBBLIN-2239] introduce pushMessagesSync for sync GTE emission [GOBBLIN-2239] Introduce pushMessagesSync for sync GTE emission Nov 19, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces synchronous GTE (Gobblin Tracking Event) emission to prevent event loss when containers are terminated early by Yarn NodeManager with SIGKILL. The implementation adds a new pushMessagesSync method to the Pusher interface with backward-compatible default implementation, and enables synchronous event reporting through the existing reporter chain.

Key changes:

  • Added pushMessagesSync() method to Pusher interface and reportEventQueueSynchronously() to EventReporter class with default implementations for backward compatibility
  • Implemented synchronous event reporting in KafkaEventKeyValueReporter and added getScheduledReporter() method to GobblinMetrics for retrieving specific reporter instances
  • Modified SubmitGTEActivityImpl to trigger synchronous GTE flushing after event submission using container metrics configuration

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/metrics/kafka/Pusher.java Adds pushMessagesSync() method with default implementation delegating to async method
gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/reporter/EventReporter.java Adds reportSynchronously() and reportEventQueueSynchronously() methods for synchronous event reporting
gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java Adds getScheduledReporter() method to retrieve specific reporter instances by class
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/metrics/kafka/KafkaEventKeyValueReporter.java Refactors event queue processing into shared helper and implements synchronous reporting variant
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/GobblinTemporalConfigurationKeys.java Defines configuration keys for container metrics application name and task runner ID
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/cluster/GobblinTemporalTaskRunner.java Persists container metrics configuration to enable later retrieval
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/workflows/metrics/SubmitGTEActivityImpl.java Implements synchronous GTE flushing by retrieving container metrics and triggering synchronous reporter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Blazer-007 Blazer-007 merged commit 00d0ab9 into apache:master Nov 20, 2025
6 checks passed
@Blazer-007 Blazer-007 deleted the virai_emit_gte_sync branch November 20, 2025 06:40
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.

2 participants