/** * A naive implementation of edge identity calculation. * @return */ public static String calculateEdgeIdentity(ServiceNode sourceNode, ServiceNode targetNode, SpecExecutor specExecutorInstance){ return sourceNode.getNodeName() + "-" + specExecutorInstance.getUri() + "-" + targetNode.getNodeName(); }
public FSSpecStore(GobblinInstanceEnvironment env, SpecSerDe specSerDe, Optional<Logger> log) throws IOException { this(env.getSysConfig().getConfig(), specSerDe, log); }
private void submitTrackingEvent(Spec spec, String operType) { submitTrackingEvent(spec.getUri(), spec.getVersion(), operType); }
/** * {@inheritDoc} * * NOTE: For this callback only conditions on the URI and version will be used. * */ @Override public void onDeleteJob(URI deletedJobURI, String deletedJobVersion) { JobSpec fakeJobSpec = JobSpec.builder(deletedJobURI).withVersion(deletedJobVersion).build(); if (this.filter.apply(fakeJobSpec)) { this.delegate.onDeleteJob(deletedJobURI, deletedJobVersion); } }
private void submitTrackingEvent(JobSpec job, String operType) { submitTrackingEvent(job.getUri(), job.getVersion(), operType); }
@Override public void onJobLaunch(JobExecutionDriver jobDriver) { if (this.filter.apply(jobDriver.getJobExecutionState().getJobSpec())) { this.delegate.onJobLaunch(jobDriver); } }
/** {@inheritDoc} */ @Override public void remove(URI uri) { ((MutableJobCatalog)_fallback).remove(uri); }
/** {@inheritDoc} */ @Override public Config getConfig() { return _instanceConf.getConfig(); }
@Override public Void apply(JobCatalogListener listener) { listener.onDeleteJob(_deletedJobURI, _deletedJobVersion); return null; } }
@Override public Void apply(JobSpecSchedulerListener listener) { listener.onJobUnscheduled(_jobSchedule); return null; } }
@Override public Void apply(JobExecutionStateListener input) { input.onStatusChange(this.state, this.previousStatus, this.newStatus); return null; } }
@Override public Void apply(JobExecutionStateListener input) { input.onMetadataChange(state, key, oldValue, newValue); return null; }
@Override public Void apply(JobCatalogListener listener) { listener.onAddJob(_addedJob); return null; } }
@Override public Void apply(JobCatalogListener listener) { listener.onUpdateJob(_updatedJob); return null; } }
@Override public Void apply(JobSpecSchedulerListener listener) { listener.onJobTriggered(_jobSpec); return null; } }
@Override public Void apply(JobExecutionStateListener input) { input.onStageTransition(this.state, this.previousStage, this.newStage); return null; } }
public void awaitForState(final RunningState targetState, long timeoutMs) throws InterruptedException, TimeoutException { awaitForStatePredicate(new Predicate<JobExecutionState>() { @Override public boolean apply(JobExecutionState state) { return null != state.getRunningState() && state.getRunningState().equals(targetState); } @Override public String toString() { return "runningState == " + targetState; } }, timeoutMs); }
@Override public Void apply(SpecCatalogListener listener) { listener.onUpdateSpec(_updatedSpec); return null; } }
/** {@inheritDoc} */ @Override public Properties getConfigAsProperties() { return _instanceConf.getConfigAsProperties(); }
@Override public Void apply(SpecCatalogListener listener) { listener.onAddSpec(_addedSpec); return null; } }