@Override public JobSpecMonitor forJobCatalog(GobblinInstanceDriver instanceDriver, MutableJobCatalog jobCatalog) throws IOException { Config config = instanceDriver.getSysConfig().getConfig().getConfig(CONFIG_PREFIX).withFallback(DEFAULTS); return forConfig(config, jobCatalog); }
public StandardMetrics(final GobblinInstanceDriver parent) { this.uptimeMs = parent.getMetricContext().newContextAwareGauge(UPTIMEMS_NAME, new Gauge<Long>() { @Override public Long getValue() { return startTimeMs > 0 ? System.currentTimeMillis() - startTimeMs : 0; } }); this.upFlag = parent.getMetricContext().newContextAwareGauge(UPFLAG_NAME, new Gauge<Integer>() { @Override public Integer getValue() { switch (parent.state()) { case RUNNING: return 1; case FAILED: return -1; default: return 0; } } }); this.numUnclassifiedErrors = parent.getMetricContext().contextAwareCounter(NUM_UNCLASSIFIED_ERRORS_NAME); parent.addListener(this, new Executor() { @Override public void execute(Runnable command) { command.run(); } }); }
private void stopGobblinInstanceDriver() { try { driver.stopAsync(); driver.awaitTerminated(EmbeddedGobblin.this.shutdownTimeout.getTimeout(), EmbeddedGobblin.this.shutdownTimeout .getTimeUnit()); } catch (TimeoutException te) { log.error("Failed to shutdown Gobblin instance driver."); } } });
driver.registerJobLifecycleListener(listener); driver.startAsync(); driver.stopAsync(); driver.awaitTerminated(this.shutdownTimeout.getTimeout(), this.shutdownTimeout.getTimeUnit()); throw new TimeoutException("Timeout waiting for job to start.");
/** {@inheritDoc} */ @Override protected void shutDown() throws Exception { instance.getLog().info("Plugin shutdown: " + this); }
@Override public Integer getValue() { switch (parent.state()) { case RUNNING: return 1; case FAILED: return -1; default: return 0; } } });
@Override protected void startUp() throws Exception { instance.registerJobLifecycleListener(new EmailNotificationListerner()); LOGGER.info("Started Email Notification Plugin"); }
public ResolvedJobSpec(JobSpec other, GobblinInstanceDriver driver) throws SpecNotFoundException, JobTemplate.TemplateException { this(other, driver.getJobCatalog()); }
public GobblinMetricsPlugin(GobblinInstanceDriver instance) { super(instance); this.metrics = GobblinMetrics.get(getInstance().getInstanceName()); }
driver.registerJobLifecycleListener(listener); driver.startAsync(); driver.stopAsync(); driver.awaitTerminated(this.shutdownTimeout.getTimeout(), this.shutdownTimeout.getTimeUnit()); throw new TimeoutException("Timeout waiting for job to start.");
/** {@inheritDoc} */ @Override protected void shutDown() throws Exception { instance.getLog().info("Plugin shutdown: " + this); }
@Override public Integer getValue() { switch (parent.state()) { case RUNNING: return 1; case FAILED: return -1; default: return 0; } } });
@Override protected void startUp() throws Exception { instance.registerJobLifecycleListener(new EmailNotificationListerner()); LOGGER.info("Started Email Notification Plugin"); }
public ResolvedJobSpec(JobSpec other, GobblinInstanceDriver driver) throws SpecNotFoundException, JobTemplate.TemplateException { this(other, driver.getJobCatalog()); }
public GobblinMetricsPlugin(GobblinInstanceDriver instance) { super(instance); this.metrics = GobblinMetrics.get(getInstance().getInstanceName()); }
@Override public JobSpecMonitor forJobCatalog(GobblinInstanceDriver instanceDriver, MutableJobCatalog jobCatalog) throws IOException { Config config = instanceDriver.getSysConfig().getConfig().getConfig(CONFIG_PREFIX).withFallback(DEFAULTS); return forConfig(config, jobCatalog); }
private void stopGobblinInstanceDriver() { try { driver.stopAsync(); driver.awaitTerminated(EmbeddedGobblin.this.shutdownTimeout.getTimeout(), EmbeddedGobblin.this.shutdownTimeout .getTimeUnit()); } catch (TimeoutException te) { log.error("Failed to shutdown Gobblin instance driver."); } } });
public StandardMetrics(final GobblinInstanceDriver parent) { this.uptimeMs = parent.getMetricContext().newContextAwareGauge(UPTIMEMS_NAME, new Gauge<Long>() { @Override public Long getValue() { return startTimeMs > 0 ? System.currentTimeMillis() - startTimeMs : 0; } }); this.upFlag = parent.getMetricContext().newContextAwareGauge(UPFLAG_NAME, new Gauge<Integer>() { @Override public Integer getValue() { switch (parent.state()) { case RUNNING: return 1; case FAILED: return -1; default: return 0; } } }); this.numUnclassifiedErrors = parent.getMetricContext().contextAwareCounter(NUM_UNCLASSIFIED_ERRORS_NAME); parent.addListener(this, new Executor() { @Override public void execute(Runnable command) { command.run(); } }); }
@Override public GobblinInstancePlugin createPlugin(GobblinInstanceDriver instance) { return new HadoopKerberosKeytabAuthenticationPlugin(instance.getSysConfig().getConfig(), _loginUser, _loginUserKeytabFile); } }
@Override public GobblinInstancePlugin createPlugin(GobblinInstanceDriver instance) { return createPlugin(instance.getSysConfig().getConfig()); }