You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/18 14:48:28 UTC

[GitHub] [spark] attilapiros edited a comment on pull request #32221: [SPARK-35125][K8S] Upgrade K8s client to 5.3.0 to support K8s 1.20

attilapiros edited a comment 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 chosen to be implemented: 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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org