Search in sources :

Example 1 with KubernetesWatch

use of org.apache.flink.kubernetes.kubeclient.resources.KubernetesWatch in project flink by apache.

the class KubernetesResourceManagerDriver method terminate.

@Override
public void terminate() throws Exception {
    if (!running) {
        return;
    }
    running = false;
    // shut down all components
    Exception exception = null;
    try {
        podsWatchOpt.ifPresent(KubernetesWatch::close);
    } catch (Exception e) {
        exception = e;
    }
    try {
        flinkKubeClient.close();
    } catch (Exception e) {
        exception = ExceptionUtils.firstOrSuppressed(e, exception);
    }
    if (exception != null) {
        throw exception;
    }
}
Also used : KubernetesWatch(org.apache.flink.kubernetes.kubeclient.resources.KubernetesWatch) FlinkException(org.apache.flink.util.FlinkException) ResourceManagerException(org.apache.flink.runtime.resourcemanager.exceptions.ResourceManagerException) KubernetesTooOldResourceVersionException(org.apache.flink.kubernetes.kubeclient.resources.KubernetesTooOldResourceVersionException)

Aggregations

KubernetesTooOldResourceVersionException (org.apache.flink.kubernetes.kubeclient.resources.KubernetesTooOldResourceVersionException)1 KubernetesWatch (org.apache.flink.kubernetes.kubeclient.resources.KubernetesWatch)1 ResourceManagerException (org.apache.flink.runtime.resourcemanager.exceptions.ResourceManagerException)1 FlinkException (org.apache.flink.util.FlinkException)1