Tabnine Logo
org.apache.gobblin.runtime
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.gobblin.runtime

Best Java code snippets using org.apache.gobblin.runtime (Showing top 20 results out of 315)

origin: apache/incubator-gobblin

/**
 * Subclasses can override this method to do whatever processing on the {@link JobState} and its
 * associated {@link TaskState}s, e.g., aggregate task-level metrics into job-level metrics.
 */
protected void postProcessJobState(JobState jobState) {
 postProcessTaskStates(jobState.getTaskStates());
}
origin: apache/incubator-gobblin

public TaskIFaceWrapper(TaskIFace underlyingTask, TaskContext taskContext, CountDownLatch countDownLatch,
  TaskStateTracker taskStateTracker) {
 super();
 this.underlyingTask = underlyingTask;
 this.taskContext = taskContext;
 this.jobId = taskContext.getTaskState().getJobId();
 this.taskId = taskContext.getTaskState().getTaskId();
 this.countDownLatch = countDownLatch;
 this.taskStateTracker = taskStateTracker;
}
origin: apache/incubator-gobblin

 @Override
 public void onJobCancellation(JobContext jobContext) {
  this.jobExecutionEventSubmitter.submitJobExecutionEvents(jobContext.getJobState());
 }
}
origin: apache/incubator-gobblin

 protected void updateTaskMetrics() {
  if (GobblinMetrics.isEnabled(this.task.getTaskState().getWorkunit())) {
   this.task.updateRecordMetrics();
   this.task.updateByteMetrics();
  }
 }
}
origin: apache/incubator-gobblin

@Override
public WorkUnitState.WorkingState getWorkingState() {
 return getTaskState().getWorkingState();
}
origin: apache/incubator-gobblin

public SleepingTask(TaskContext taskContext) {
 super(taskContext);
 sleepTime = taskContext.getTaskState().getPropAsLong("data.publisher.sleep.time.in.seconds", 10L);
}
origin: apache/incubator-gobblin

private String createDatasetUrn(Map<String, DatasetState> datasetStatesByUrns, TaskState taskState) {
 String datasetUrn = taskState.getProp(ConfigurationKeys.DATASET_URN_KEY, ConfigurationKeys.DEFAULT_DATASET_URN);
 if (!datasetStatesByUrns.containsKey(datasetUrn)) {
  DatasetState datasetState = newDatasetState(false);
  datasetState.setDatasetUrn(datasetUrn);
  datasetStatesByUrns.put(datasetUrn, datasetState);
 }
 return datasetUrn;
}
origin: apache/incubator-gobblin

public JobState(State properties,String jobName, String jobId) {
 super(properties);
 this.jobName = jobName;
 this.jobId = jobId;
 this.setId(jobId);
}
origin: apache/incubator-gobblin

/**
 * Get the number of records written by all the writers
 * @return Sum of the writer records written count across all tasks
 */
public static long getProcessedCount(List<TaskState> taskStates) {
 long value = 0;
 for (TaskState taskState : taskStates) {
  value += taskState.getPropAsLong(ConfigurationKeys.WRITER_RECORDS_WRITTEN, 0);
 }
 return value;
}
origin: apache/incubator-gobblin

/**
 * Submits metadata about a given {@link JobState} and each of its {@link TaskState}s. This method will submit a
 * single event for the {@link JobState} called {@link #JOB_STATE_EVENT}. It will submit an event for each
 * {@link TaskState} called {@link #TASK_STATE_EVENT}.
 *
 * @param jobState is the {@link JobState} to emit events for
 */
public void submitJobExecutionEvents(JobState jobState) {
 submitJobStateEvent(jobState);
 submitTaskStateEvents(jobState);
}
origin: apache/incubator-gobblin

 @Override
 public StreamEntity<T> buildClone() {
  return new BasicTestControlMessage(this.id);
 }
}
origin: apache/incubator-gobblin

/**
 * Get a pre-fork {@link RowLevelPolicyChecker} for executing row-level
 * {@link org.apache.gobblin.qualitychecker.row.RowLevelPolicy}.
 *
 * @return a {@link RowLevelPolicyChecker}
 */
public RowLevelPolicyChecker getRowLevelPolicyChecker() throws Exception {
 return getRowLevelPolicyChecker(-1);
}
origin: apache/incubator-gobblin

@Override
public void write(DataOutput out)
  throws IOException {
 write(out, true, true);
}
origin: apache/incubator-gobblin

/**
 * Get the list of pre-fork {@link RecordStreamProcessor}s.
 *
 * @return list (possibly empty) of {@link RecordStreamProcessor}s
 */
public List<RecordStreamProcessor<?, ?, ?, ?>> getRecordStreamProcessors() {
 return getRecordStreamProcessors(-1, this.taskState);
}
origin: apache/incubator-gobblin

/**
 * Get a new {@link BoundedBlockingRecordQueue.Builder}.
 *
 * @param <T> record type
 * @return a new {@link BoundedBlockingRecordQueue.Builder}
 */
public static <T> Builder<T> newBuilder() {
 return new Builder<>();
}
origin: apache/incubator-gobblin

public void addSkippedTaskStates(Collection<TaskState> taskStates) {
 for (TaskState taskState : taskStates) {
  addSkippedTaskState(taskState);
 }
}
origin: apache/incubator-gobblin

/**
 * Write a single {@link JobState} to json document.
 *
 * @param jsonWriter {@link com.google.gson.stream.JsonWriter}
 * @param jobState {@link JobState} to write to json document
 * @throws IOException
 */
private void writeJobState(JsonWriter jsonWriter, JobState jobState) throws IOException {
 jobState.toJson(jsonWriter, this.keepConfig);
}
origin: apache/incubator-gobblin

/**
 * Sets the {@link ConfigurationKeys#TASK_FAILURE_EXCEPTION_KEY} for each given {@link TaskState} to the given
 * {@link Throwable}.
 *
 * Make this method public as this exception catching routine can be reusable in other occasions as well.
 */
public static void setTaskFailureException(Collection<? extends WorkUnitState> taskStates, Throwable t) {
 for (WorkUnitState taskState : taskStates) {
  ((TaskState) taskState).setTaskFailureException(t);
 }
}
origin: apache/incubator-gobblin

 @Override
 public DataWriter<Integer> build() throws IOException {
  return new DummyDataWriter();
 }
}
origin: apache/incubator-gobblin

@Override
public void onJobCompletion(JobContext jobContext) {
 this.jobExecutionEventSubmitter.submitJobExecutionEvents(jobContext.getJobState());
}
org.apache.gobblin.runtime

Most used classes

  • JobSpec
  • ServiceBasedAppLauncher
    An implementation of ApplicationLauncher that defines an application as a set of Services that shoul
  • TaskState
    An extension to WorkUnitState with run-time task state information.
  • JobSpec$Builder
    Builder for JobSpecs. Defaults/conventions: * Default jobCatalogURI is #DEFAULT_JOB_CATALOG_SCHEME:
  • JobState
    A class for tracking job state information.
  • CliObjectOption,
  • CliObjectSupport,
  • FlowSpec,
  • JobTemplate,
  • Spec,
  • FlowCatalog,
  • TaskUtils,
  • JobLauncher,
  • JobLauncherFactory,
  • JobState$DatasetState,
  • FlowSpec$Builder,
  • MutableJobCatalog,
  • SpecExecutor$Verb,
  • ResourceBasedJobTemplate
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now