highAvailabilityServices, metricRegistry, webMonitor == null ? Option.empty() : Option.apply(webMonitor.getRestAddress()), new Some<>(JobMaster.JOB_MANAGER_NAME), Option.<String>empty(), getArchivistClass())._1(); final String webMonitorURL = webMonitor == null ? null : webMonitor.getRestAddress(); webMonitor.stop(); } catch (Throwable ignored) { LOG.warn("Failed to stop the web frontend", t); webMonitor.stop(); } catch (Throwable t) { LOG.error("Failed to stop the web frontend", t);
monitor.start();
@Override public void handleError(Exception exception) { LOG.error("Received error from LeaderRetrievalService.", exception); try { // stop associated webMonitor webMonitor.stop(); } catch (Exception e) { LOG.error("Error while stopping the web server due to a LeaderRetrievalService error.", e); } } }
private void startLegacyMiniCluster() throws Exception { final Configuration configuration = new Configuration(miniClusterResourceConfiguration.getConfiguration()); configuration.setInteger(ConfigConstants.LOCAL_NUMBER_TASK_MANAGER, miniClusterResourceConfiguration.getNumberTaskManagers()); configuration.setInteger(TaskManagerOptions.NUM_TASK_SLOTS, miniClusterResourceConfiguration.getNumberSlotsPerTaskManager()); configuration.setString(CoreOptions.TMP_DIRS, temporaryFolder.newFolder().getAbsolutePath()); final LocalFlinkMiniCluster flinkMiniCluster = TestBaseUtils.startCluster( configuration, !enableClusterClient); // the cluster client only works if separate actor systems are used jobExecutorService = flinkMiniCluster; if (enableClusterClient) { clusterClient = new StandaloneClusterClient(configuration, flinkMiniCluster.highAvailabilityServices(), true); } Configuration restClientConfig = new Configuration(); restClientConfig.setInteger(JobManagerOptions.PORT, flinkMiniCluster.getLeaderRPCPort()); this.restClusterClientConfig = new UnmodifiableConfiguration(restClientConfig); if (flinkMiniCluster.webMonitor().isDefined()) { webUIPort = flinkMiniCluster.webMonitor().get().getServerPort(); } }
monitor.start();
highAvailabilityServices, metricRegistry, webMonitor == null ? Option.empty() : Option.apply(webMonitor.getRestAddress()), new Some<>(JobMaster.JOB_MANAGER_NAME), Option.<String>empty(), getArchivistClass())._1(); final String webMonitorURL = webMonitor == null ? null : webMonitor.getRestAddress(); webMonitor.stop(); } catch (Throwable ignored) { LOG.warn("Failed to stop the web frontend", t); webMonitor.stop(); } catch (Throwable t) { LOG.error("Failed to stop the web frontend", t);
highAvailabilityServices, metricRegistry, webMonitor == null ? Option.empty() : Option.apply(webMonitor.getRestAddress()), new Some<>(JobMaster.JOB_MANAGER_NAME), Option.<String>empty(), getArchivistClass())._1(); final String webMonitorURL = webMonitor == null ? null : webMonitor.getRestAddress(); webMonitor.stop(); } catch (Throwable ignored) { LOG.warn("Failed to stop the web frontend", t); webMonitor.stop(); } catch (Throwable t) { LOG.error("Failed to stop the web frontend", t);
monitor.start(jobManagerAkkaURL);