@Override public void run() { log.error("Fatal error occurred on JobManager, cause: {}", cause.getMessage(), cause); try { shutDown(); } catch (Exception e) { cause.addSuppressed(e); } errorHandler.onFatalError(cause); } });
private void shutdownInternally() { synchronized (lock) { shutdown = true; if (leaderElectionService != null) { try { leaderElectionService.stop(); } catch (Throwable t) { log.error("Could not properly shutdown the leader election service", t); } } try { jobManager.shutDown(); } catch (Throwable t) { log.error("Error shutting down JobManager", t); } try { jobManagerServices.shutdown(); } catch (Throwable t) { log.error("Error shutting down JobManager services", t); } // make all registered metrics go away try { jobManagerMetricGroup.close(); } catch (Throwable t) { log.error("Error while unregistering metrics", t); } } }
leaderGatewayFuture.completeExceptionally(new FlinkException("JobMaster has been shut down.")); jobMaster.shutDown(); final CompletableFuture<Void> jobManagerTerminationFuture = jobMaster.getTerminationFuture();
leaderGatewayFuture.completeExceptionally(new FlinkException("JobMaster has been shut down.")); jobMaster.shutDown(); final CompletableFuture<Void> jobManagerTerminationFuture = jobMaster.getTerminationFuture();
leaderGatewayFuture.completeExceptionally(new FlinkException("JobMaster has been shut down.")); jobMaster.shutDown(); final CompletableFuture<Void> jobManagerTerminationFuture = jobMaster.getTerminationFuture();