attilapiros commented on pull request #32221: URL: https://github.com/apache/spark/pull/32221#issuecomment-822000621
Reading that K8s client PR about `onClose()` I think we have to be careful which one is to chose when implementing one: as there is one without any argument and there is another with one argument (WatcherException): > The interface now provides a dedicated default argument-less onClose() method. This method should always be called upon Watcher completion. Implementations should override this method in case operations (e.g. cleanup) should be performed once the Watcher is closed. > > The previous onClose(WatcherException cause) is kept and only invoked whenever an exception occurs during the Watcher life-cycle (once the watch connection is open and established). For example here I think the argumentless version should be used instead: https://github.com/apache/spark/blob/a902250e4a6cc88d20097ab356884bc2813edba3/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsWatchSnapshotSource.scala#L61-L65 WDYT? -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
