-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-4731] Shutdown CloudWatch reporter when query completes #6468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,6 +53,7 @@ | |
| import org.apache.hudi.exception.HoodieIOException; | ||
| import org.apache.hudi.exception.HoodieUpsertException; | ||
| import org.apache.hudi.hive.HiveSyncTool; | ||
| import org.apache.hudi.metrics.Metrics; | ||
| import org.apache.hudi.utilities.HiveIncrementalPuller; | ||
| import org.apache.hudi.utilities.IdentitySplitter; | ||
| import org.apache.hudi.utilities.UtilHelpers; | ||
|
|
@@ -208,6 +209,7 @@ public void sync() throws Exception { | |
| throw ex; | ||
| } finally { | ||
| deltaSyncService.ifPresent(DeltaSyncService::close); | ||
| Metrics.shutdown(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this only works with sync once mode. can we also hook it up with continuous-mode's shutdown callback as well?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Metric's reporter already has a shutdown hook of its own, that should run when jvm exits. That should suffice the continuous mode case right ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please correct me if I'm wrong. It seems like the DeltaStreamer continuous mode does not have this issue.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. functionality-wise, it should be ok. i think it's a question of where is the single place we can clean up all resources. |
||
| LOG.info("Shut down delta streamer"); | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@junyuc25 Since we already have a shutdown hook to close the metric, is explicitly shutdown metric here still necessary?
I found an issue that if the metric server experiences problems such as high load, it fails to respond quickly, causing queries to be blocked until the timeout, the
Metrics.shutdownhere could block the query to finish until the timeout.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch ~, can you fire a fix then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let me fix it