voonhous commented on code in PR #19575:
URL: https://github.com/apache/hudi/pull/19575#discussion_r3863491594
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/metrics/DistributedRegistry.java:
##########
@@ -48,9 +51,17 @@ public String getName() {
public void register(JavaSparkContext jsc) {
if (!isRegistered()) {
jsc.sc().register(this);
+ // Only when this call actually registers: stamping unconditionally
would re-brand an accumulator
+ // bound to a dead context and mask the staleness this field exists to
detect.
+ this.registeredAppId = jsc.sc().applicationId();
}
}
+ /** False when bound to a different (typically stopped) context, meaning it
must be recreated. */
+ public boolean isRegisteredWith(JavaSparkContext jsc) {
Review Comment:
Fine to land it together now that the rest has converged; noted on #19063
that gaps 2/7/8 arrive via this PR, with `ee961488` as the extractable fallback
if it stalls. Resolving.
--
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]