henrib commented on code in PR #5882: URL: https://github.com/apache/hive/pull/5882#discussion_r2175597392
########## standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogFactory.java: ########## @@ -35,19 +38,33 @@ * Catalog & servlet factory. */ public class HMSCatalogFactory { - private static final String SERVLET_ID_KEY = "metastore.in.test.iceberg.catalog.servlet.id"; + private static final String SERVLET_ID_KEY = "metastore.in.test.iceberg.catalog.servlet.id"; - private final Configuration configuration; - private final int port; - private final String path; + /** + * Convenience soft reference to last catalog. + */ + protected static final AtomicReference<Reference<Catalog>> catalogRef = new AtomicReference<>(); Review Comment: This is the only way I found to pass the catalog instance to the event listener. This is a partial solution (non HA); the HA version would require polling from the notifications through a thread and there would still be a propagation delay and potential stale entries in 'distributed' caches; a performance trade-off... Shall I close this ? No point in continuing if you've already reached hard '-1'. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org