@Test public void testGetRawMetrics() throws IOException { MetricsCollector collector = new MetricsCollector(null, jsondb, null); Map<String,RawMetrics> metrics = jsondbRM.getRawMetrics("intId1"); assertThat(metrics.size()).isEqualTo(3); assertThat(metrics.keySet()).contains("HISTORY1"); Set<String> livePodIds = new HashSet<>(Arrays.asList("pod1")); jsondbRM.curate("intId1", metrics, livePodIds); Map<String,RawMetrics> metrics2 = jsondbRM.getRawMetrics("intId1"); assertThat(metrics2.size()).isEqualTo(2); assertThat(metrics2.keySet()).contains("HISTORY1"); collector.close(); }
@Override public void close() throws IOException { LOGGER.info("Stopping metrics collector."); close(scheduler); close(executor); }
MetricsCollector implements Runnable, Closeable { @Override public void close() throws IOException { LOGGER.info("Stopping metrics collector."); close(scheduler); close(executor); } }
MetricsCollector implements Runnable, Closeable { @Override public void close() throws IOException { LOGGER.info("Stopping metrics collector."); close(scheduler); close(executor); } @Autowired  MetricsCollector(DataManager dataManager, JsonDB jsonDB, KubernetesClient kubernetes); }
MetricsCollector implements Runnable, Closeable { @Override public void close() throws IOException { LOGGER.info("Stopping metrics collector."); close(scheduler); close(executor); } @Autowired  MetricsCollector(DataManager dataManager, JsonDB jsonDB, KubernetesClient kubernetes); @PostConstruct @SuppressWarnings("FutureReturnValueIgnored") void open(); @Override void close(); @Override void run(); }
MetricsCollector implements Runnable, Closeable { @Override public void close() throws IOException { LOGGER.info("Stopping metrics collector."); close(scheduler); close(executor); } @Autowired  MetricsCollector(DataManager dataManager, JsonDB jsonDB, KubernetesClient kubernetes); @PostConstruct @SuppressWarnings("FutureReturnValueIgnored") void open(); @Override void close(); @Override void run();  }