JobLauncherFactory.JobLauncherType.MAPREDUCE.toString());
return new MRJobLauncher(JobConfigurationUtils.combineSysAndJobProperties(sysProps, jobProps), instanceBroker, metadataTags); default: throw new RuntimeException("Unsupported job launcher type: " + launcherType.get().name());
JobLauncherFactory.JobLauncherType.MAPREDUCE.toString());
return new MRJobLauncher(JobConfigurationUtils.combineSysAndJobProperties(sysProps, jobProps), instanceBroker, metadataTags); default: throw new RuntimeException("Unsupported job launcher type: " + launcherType.get().name());
Optional.of(jobLauncherType.get().toString()) : Optional.<String>absent(), instanceBroker); JobListenerToJobStateBridge bridge = new JobListenerToJobStateBridge(actualLog, jobState, instrumentationEnabled, launcherMetrics);
/** * Create a new {@link JobLauncher}. * * <p> * This method will never return a {@code null}. * </p> * * @param sysProps system configuration properties * @param jobProps job configuration properties * @param instanceBroker * @param metadataTags * @return newly created {@link JobLauncher} */ public static @Nonnull JobLauncher newJobLauncher(Properties sysProps, Properties jobProps, SharedResourcesBroker<GobblinScopeTypes> instanceBroker, List<? extends Tag<?>> metadataTags) throws Exception { String launcherTypeValue = sysProps.getProperty(ConfigurationKeys.JOB_LAUNCHER_TYPE_KEY, JobLauncherType.LOCAL.name()); return newJobLauncher(sysProps, jobProps, launcherTypeValue, instanceBroker, metadataTags); }
/** * Specify job should run in MR mode. */ public EmbeddedGobblin mrMode() throws IOException { this.sysConfigOverrides.put(ConfigurationKeys.JOB_LAUNCHER_TYPE_KEY, JobLauncherFactory.JobLauncherType.MAPREDUCE.name()); this.builtConfigMap.put(ConfigurationKeys.FS_URI_KEY, FileSystem.get(new Configuration()).getUri().toString()); this.builtConfigMap.put(ConfigurationKeys.MR_JOB_ROOT_DIR_KEY, "/tmp/EmbeddedGobblin_" + System.currentTimeMillis()); this.distributeJarsFunction = new Runnable() { @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())); } }; return this; }
/** * Get the {@link LauncherTypeEnum} for this {@link JobState}. */ public LauncherTypeEnum getLauncherType() { return Enums.getIfPresent(LauncherTypeEnum.class, this.getProp(ConfigurationKeys.JOB_LAUNCHER_TYPE_KEY, JobLauncherFactory.JobLauncherType.LOCAL.name())) .or(LauncherTypeEnum.LOCAL); }
Optional.of(jobLauncherType.get().toString()) : Optional.<String>absent(), instanceBroker); JobListenerToJobStateBridge bridge = new JobListenerToJobStateBridge(actualLog, jobState, instrumentationEnabled, launcherMetrics);
/** * Create a new {@link JobLauncher}. * * <p> * This method will never return a {@code null}. * </p> * * @param sysProps system configuration properties * @param jobProps job configuration properties * @param instanceBroker * @param metadataTags * @return newly created {@link JobLauncher} */ public static @Nonnull JobLauncher newJobLauncher(Properties sysProps, Properties jobProps, SharedResourcesBroker<GobblinScopeTypes> instanceBroker, List<? extends Tag<?>> metadataTags) throws Exception { String launcherTypeValue = sysProps.getProperty(ConfigurationKeys.JOB_LAUNCHER_TYPE_KEY, JobLauncherType.LOCAL.name()); return newJobLauncher(sysProps, jobProps, launcherTypeValue, instanceBroker, metadataTags); }
/** * Specify job should run in MR mode. */ public EmbeddedGobblin mrMode() throws IOException { this.sysConfigOverrides.put(ConfigurationKeys.JOB_LAUNCHER_TYPE_KEY, JobLauncherFactory.JobLauncherType.MAPREDUCE.name()); this.builtConfigMap.put(ConfigurationKeys.FS_URI_KEY, FileSystem.get(new Configuration()).getUri().toString()); this.builtConfigMap.put(ConfigurationKeys.MR_JOB_ROOT_DIR_KEY, "/tmp/EmbeddedGobblin_" + System.currentTimeMillis()); this.distributeJarsFunction = new Runnable() { @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())); } }; return this; }
/** * Get the {@link LauncherTypeEnum} for this {@link JobState}. */ public LauncherTypeEnum getLauncherType() { return Enums.getIfPresent(LauncherTypeEnum.class, this.getProp(ConfigurationKeys.JOB_LAUNCHER_TYPE_KEY, JobLauncherFactory.JobLauncherType.LOCAL.name())) .or(LauncherTypeEnum.LOCAL); }