@Override protected void shutDown() throws Exception { GobblinMetrics.get(this.appId).stopMetricsReporting(); } }
@Override protected void shutDown() throws Exception { this.metrics.stopMetricsReporting(); super.shutDown(); } }
} finally { if (this.gobblinMetrics.isPresent()) { this.gobblinMetrics.get().stopMetricsReporting();
@Override public void compact() throws IOException { try { copyDependencyJarsToHdfs(); processDatasets(); throwExceptionsIfAnyDatasetCompactionFailed(); onCompactionCompletion(); } catch (Throwable t) { // This throwable is logged here before propagated. Otherwise, if another throwable is thrown // in the finally-block, this throwable may be suppressed. LOG.error("Caught throwable during compaction", t); throw Throwables.propagate(t); } finally { try { shutdownExecutors(); this.closer.close(); } finally { deleteDependencyJars(); this.gobblinMetrics.stopMetricsReporting(); } } }
/** * Test the {@link GobblinMetrics} instance is removed from {@link GobblinMetricsRegistry} when * it stops metrics reporting */ public void testStopReportingMetrics() { String id = getClass().getSimpleName() + "-" + System.currentTimeMillis(); GobblinMetrics gobblinMetrics = GobblinMetrics.get(id); gobblinMetrics.startMetricReporting(new Properties()); Assert.assertEquals(GobblinMetricsRegistry.getInstance().get(id).get(), gobblinMetrics); gobblinMetrics.stopMetricsReporting(); Assert.assertFalse(GobblinMetricsRegistry.getInstance().get(id).isPresent()); } }
@Override protected void shutDown() throws Exception { GobblinMetrics.get(this.appId).stopMetricsReporting(); } }
@Override protected void shutDown() throws Exception { this.metrics.stopMetricsReporting(); super.shutDown(); } }
} finally { if (this.gobblinMetrics.isPresent()) { this.gobblinMetrics.get().stopMetricsReporting();
@Override public void compact() throws IOException { try { copyDependencyJarsToHdfs(); processDatasets(); throwExceptionsIfAnyDatasetCompactionFailed(); onCompactionCompletion(); } catch (Throwable t) { // This throwable is logged here before propagated. Otherwise, if another throwable is thrown // in the finally-block, this throwable may be suppressed. LOG.error("Caught throwable during compaction", t); throw Throwables.propagate(t); } finally { try { shutdownExecutors(); this.closer.close(); } finally { deleteDependencyJars(); this.gobblinMetrics.stopMetricsReporting(); } } }