Codota Logo
EmbeddedGobblin
Code IndexAdd Codota to your IDE (free)

How to use
EmbeddedGobblin
in
gobblin.runtime.embedded

Best Java code snippets using gobblin.runtime.embedded.EmbeddedGobblin (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: voldemort/voldemort

private void runDistcp(Path from, Path to) throws Exception {
  info("sourcePath: " + from + ", destinationPath: " + to);
  EmbeddedGobblin embeddedGobblin = new EmbeddedGobblinDistcp(from, to).mrMode();
  // Used for global throttling"
  embeddedGobblin.distributeJar("lib/*");
  for (Map.Entry<String, String> entry : this.props.entrySet()) {
    if (entry.getKey() != null && (entry.getKey()).startsWith(ATTR_PREFIX)) {
      String key = (entry.getKey()).substring(ATTR_PREFIX.length());
      embeddedGobblin.setConfiguration(key, entry.getValue());
    }
  }
  JobExecutionResult result =  embeddedGobblin.run();
  if (!result.isSuccessful()) {
    throw new RuntimeException("Distcp job failed!", result.getErrorCause());
  }
}
origin: com.linkedin.gobblin/gobblin-data-management

 @Override
 @NotOnCli
 public EmbeddedGobblin setTemplate(String templateURI)
   throws URISyntaxException, SpecNotFoundException, JobTemplate.TemplateException {
  return super.setTemplate(templateURI);
 }
}
origin: com.linkedin.gobblin/gobblin-runtime

/**
 * Enable state store.
 */
public EmbeddedGobblin useStateStore(String rootDir) {
 this.setConfiguration(ConfigurationKeys.STATE_STORE_ENABLED, "true");
 this.setConfiguration(ConfigurationKeys.STATE_STORE_ROOT_DIR_KEY, rootDir);
 return this;
}
origin: com.linkedin.gobblin/gobblin-runtime

@CliObjectSupport(argumentNames = {"jobName"})
public EmbeddedGobblin(String name) {
 HadoopUtils.addGobblinSite();
 this.specBuilder = new JobSpec.Builder(name);
 this.userConfigMap = Maps.newHashMap();
 this.builtConfigMap = Maps.newHashMap();
 this.sysConfigOverrides = Maps.newHashMap();
 this.defaultSysConfig = getDefaultSysConfig();
 this.distributedJars = Maps.newHashMap();
 loadCoreGobblinJarsToDistributedJars();
 this.distributeJarsFunction = new Runnable() {
  @Override
  public void run() {
   // NOOP
  }
 };
}
origin: com.linkedin.gobblin/gobblin-runtime

 embeddedGobblin.run();
} catch (InterruptedException | TimeoutException | ExecutionException exc) {
 throw new RuntimeException("Failed to run Gobblin job.", exc);
origin: com.linkedin.gobblin/gobblin-runtime

/**
 * Specify that the input jar should be added to workers' classpath on distributed mode.
 */
public EmbeddedGobblin distributeJar(String jarPath) {
 return distributeJarWithPriority(jarPath, 0);
}
origin: com.linkedin.gobblin/gobblin-runtime

distributeJarByClassWithPriority(State.class, 0);
distributeJarByClassWithPriority(ConstructState.class, 0);
distributeJarByClassWithPriority(InstrumentedExtractorBase.class, 0);
distributeJarByClassWithPriority(MetricContext.class, 0);
distributeJarByClassWithPriority(GobblinMetrics.class, 0);
distributeJarByClassWithPriority(FsStateStore.class, 0);
distributeJarByClassWithPriority(Task.class, 0);
distributeJarByClassWithPriority(PathUtils.class, 0);
distributeJarByClassWithPriority(ReadableInstant.class, 0);
distributeJarByClassWithPriority(Escaper.class, -10); // Escaper was added in guava 15, so we use it to identify correct jar
distributeJarByClassWithPriority(MetricFilter.class, 0);
distributeJarByClassWithPriority(DataTemplate.class, 0);
distributeJarByClassWithPriority(ClassUtils.class, 0);
distributeJarByClassWithPriority(SchemaBuilder.class, 0);
distributeJarByClassWithPriority(RetryListener.class, 0);
origin: com.linkedin.gobblin/gobblin-runtime

 @Override
 public void run() {
  // Add jars needed at runtime to the sys config so MR job launcher will add them to distributed cache.
  EmbeddedGobblin.this.sysConfigOverrides.put(ConfigurationKeys.JOB_JAR_FILES_KEY,
    Joiner.on(",").join(getPrioritizedDistributedJars()));
 }
};
origin: com.linkedin.gobblin/gobblin-runtime

new SimpleGobblinInstanceEnvironment("EmbeddedGobblinInstance", this.useLog, getSysConfig());
origin: com.linkedin.gobblin/gobblin-runtime

/**
 * Set a {@link JobTemplate} to use.
 */
public EmbeddedGobblin setTemplate(String templateURI) throws URISyntaxException, SpecNotFoundException,
                           JobTemplate.TemplateException {
 return setTemplate(new PackagedTemplatesJobCatalogDecorator().getTemplate(new URI(templateURI)));
}
origin: com.linkedin.gobblin/gobblin-runtime

/**
 * Manually set a key-value pair in the job configuration. Input is of the form <key>:<value>
 */
public EmbeddedGobblin setConfiguration(String keyValue) {
 List<String> split = KEY_VALUE_SPLITTER.splitToList(keyValue);
 if (split.size() != 2) {
  throw new RuntimeException("Cannot parse " + keyValue + ". Expected <key>:<value>.");
 }
 return setConfiguration(split.get(0), split.get(1));
}
origin: com.linkedin.gobblin/gobblin-runtime

/**
 * Specify that the input jar should be added to workers' classpath on distributed mode. Jars with lower priority value
 * will appear first in the classpath. Default priority is 0.
 */
public EmbeddedGobblin distributeJarByClassWithPriority(Class<?> klazz, int priority) {
 return distributeJarWithPriority(ClassUtil.findContainingJar(klazz), priority);
}
gobblin.runtime.embeddedEmbeddedGobblin

Javadoc

A class used to run an embedded version of Gobblin. This class is only intended for running a single Gobblin job. If a large number of Gobblin jobs will be launched, use a GobblinInstanceDriver instead. Usage: new EmbeddedGobblin("jobName").setTemplate(myTemplate).setConfiguration("key","value").run();

Most used methods

  • run
    Run the Gobblin job. This call will block until the job is done.
  • setConfiguration
    Manually set a key-value pair in the job configuration.
  • setTemplate
    Set a JobTemplate to use.
  • distributeJar
    Specify that the input jar should be added to workers' classpath on distributed mode.
  • distributeJarByClassWithPriority
    Specify that the input jar should be added to workers' classpath on distributed mode. Jars with lowe
  • distributeJarWithPriority
    Specify that the input jar should be added to workers' classpath on distributed mode. Jars with lowe
  • getDefaultSysConfig
    This is the base Config used for the job, containing all default configurations. Subclasses can over
  • getPrioritizedDistributedJars
  • getSysConfig
  • loadCoreGobblinJarsToDistributedJars
    This returns the set of jars required by a basic Gobblin ingestion job. In general, these need to be
  • runAsync
    Launch the Gobblin job asynchronously. This method will return when the Gobblin job has started.
  • setJobTimeout
    Set the timeout for the Gobblin job execution from ISO-style period.
  • runAsync,
  • setJobTimeout,
  • setLaunchTimeout,
  • setShutdownTimeout,
  • sysConfig,
  • usePlugin

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JFileChooser (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now