public CoordinationUtilsFactory getCoordinationUtilsFactory() { // load the class String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName(); return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class); }
public CoordinationUtilsFactory getCoordinationUtilsFactory() { // load the class String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName(); return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class); }
public CoordinationUtilsFactory getCoordinationUtilsFactory() { // load the class String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName(); return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class); }
public CoordinationUtilsFactory getCoordinationUtilsFactory() { // load the class String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName(); return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class); }
public CoordinationUtilsFactory getCoordinationUtilsFactory() { // load the class String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName(); return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class); }
protected static IndexRequestFactory getIndexRequestFactory(ElasticsearchConfig config) { if (config.getIndexRequestFactoryClassName().isPresent()) { return Util.getObj(config.getIndexRequestFactoryClassName().get(), IndexRequestFactory.class); } else { return new DefaultIndexRequestFactory(); } }
public static Monitor instantiateMonitor(String monitorName, MonitorConfig monitorConfig, MetricsRegistry metricsRegistry) throws InstantiationException { String factoryClass = monitorConfig.getMonitorFactoryClass(); try { MonitorFactory monitorFactory = Util.getObj(factoryClass, MonitorFactory.class); return monitorFactory.getMonitorInstance(monitorName, monitorConfig, metricsRegistry); } catch (Exception e) { throw (InstantiationException) new InstantiationException("Unable to instantiate monitor with factory class " + factoryClass).initCause(e); } } }
/** * Gets a SystemStreamPartitionGrouper object from the configuration. */ private SystemStreamPartitionGrouper getSystemStreamPartitionGrouper() { JobConfig jobConfig = new JobConfig(config); String factoryString = jobConfig.getSystemStreamPartitionGrouperFactory(); SystemStreamPartitionGrouper grouper = Util.getObj(factoryString, SystemStreamPartitionGrouperFactory.class) .getSystemStreamPartitionGrouper(jobConfig); return grouper; }
private void addTable(String tableId, Config config) { if (tableContexts.containsKey(tableId)) { throw new SamzaException("Table " + tableId + " already exists"); } JavaTableConfig tableConfig = new JavaTableConfig(config); String providerFactoryClassName = tableConfig.getTableProviderFactory(tableId); TableProviderFactory tableProviderFactory = Util.getObj(providerFactoryClassName, TableProviderFactory.class); TableCtx ctx = new TableCtx(); ctx.tableProvider = tableProviderFactory.getTableProvider(tableId); tableContexts.put(tableId, ctx); }
private JobCoordinator createJobCoordinator() { String jobCoordinatorFactoryClassName = new JobCoordinatorConfig(config).getJobCoordinatorFactoryClassName(); return Util.getObj(jobCoordinatorFactoryClassName, JobCoordinatorFactory.class).getJobCoordinator(processorId, config, metricsRegistry); }
private JobCoordinator createJobCoordinator() { String jobCoordinatorFactoryClassName = new JobCoordinatorConfig(config).getJobCoordinatorFactoryClassName(); return Util.getObj(jobCoordinatorFactoryClassName, JobCoordinatorFactory.class).getJobCoordinator(config); }
private JobCoordinator createJobCoordinator() { String jobCoordinatorFactoryClassName = new JobCoordinatorConfig(config).getJobCoordinatorFactoryClassName(); return Util.getObj(jobCoordinatorFactoryClassName, JobCoordinatorFactory.class).getJobCoordinator(config); }
/** * Creates a instance of {@link SystemStreamPartitionMapper} using the stream partition expansion factory class * defined in the {@param config}. * @param config the configuration of the samza job. * @return the instantiated {@link SystemStreamPartitionMapper} object. */ private SystemStreamPartitionMapper getSystemStreamPartitionMapper(Config config) { JobConfig jobConfig = new JobConfig(config); String systemStreamPartitionMapperClass = jobConfig.getSystemStreamPartitionMapperFactoryName(); SystemStreamPartitionMapperFactory systemStreamPartitionMapperFactory = Util.getObj(systemStreamPartitionMapperClass, SystemStreamPartitionMapperFactory.class); return systemStreamPartitionMapperFactory.getStreamPartitionMapper(config, new MetricsRegistryMap()); }
public PassthroughJobCoordinator(String processorId, Config config, MetricsRegistry metricsRegistry) { this.processorId = processorId; this.config = config; LocationIdProviderFactory locationIdProviderFactory = Util.getObj(new JobConfig(config).getLocationIdProviderFactory(), LocationIdProviderFactory.class); LocationIdProvider locationIdProvider = locationIdProviderFactory.getLocationIdProvider(config); this.locationId = locationIdProvider.getLocationId(); }
public SimpleYarnJobProxy(JobsResourceConfig config) throws Exception { super(config); this.installFinder = new SimpleInstallationFinder(config.getInstallationsPath(), Util.getObj(config.getJobConfigFactory(), ConfigFactory.class)); this.statusProvider = new YarnRestJobStatusProvider(config); }
/** * Returns a command builder with the build environment configured with the containerId. * @param samzaContainerId to configure the builder with. * @return the constructed builder object */ private CommandBuilder getCommandBuilder(String samzaContainerId) { String cmdBuilderClassName = taskConfig.getCommandClass(ShellCommandBuilder.class.getName()); CommandBuilder cmdBuilder = Util.getObj(cmdBuilderClassName, CommandBuilder.class); cmdBuilder.setConfig(config).setId(samzaContainerId).setUrl(state.jobModelManager.server().getUrl()); return cmdBuilder; } /**
/** * Returns a command builder with the build environment configured with the containerId. * @param samzaContainerId to configure the builder with. * @return the constructed builder object */ private CommandBuilder getCommandBuilder(String samzaContainerId) { String cmdBuilderClassName = taskConfig.getCommandClass(ShellCommandBuilder.class.getName()); CommandBuilder cmdBuilder = Util.getObj(cmdBuilderClassName, CommandBuilder.class); cmdBuilder.setConfig(config).setId(samzaContainerId).setUrl(state.jobModelManager.server().getUrl()); return cmdBuilder; } /**
/** * Returns a command builder with the build environment configured with the containerId. * @param samzaContainerId to configure the builder with. * @return the constructed builder object */ private CommandBuilder getCommandBuilder(String samzaContainerId) { String cmdBuilderClassName = taskConfig.getCommandClass(ShellCommandBuilder.class.getName()); CommandBuilder cmdBuilder = Util.getObj(cmdBuilderClassName, CommandBuilder.class); cmdBuilder.setConfig(config).setId(samzaContainerId).setUrl(state.jobModelManager.server().getUrl()); return cmdBuilder; } /**
/** * Returns a command builder with the build environment configured with the containerId. * @param samzaContainerId to configure the builder with. * @return the constructed builder object */ private CommandBuilder getCommandBuilder(String samzaContainerId) { String cmdBuilderClassName = taskConfig.getCommandClass(ShellCommandBuilder.class.getName()); CommandBuilder cmdBuilder = Util.getObj(cmdBuilderClassName, CommandBuilder.class); cmdBuilder.setConfig(config).setId(samzaContainerId).setUrl(state.jobModelManager.server().getUrl()); return cmdBuilder; } /**
/** * Returns a command builder with the build environment configured with the containerId. * @param samzaContainerId to configure the builder with. * @return the constructed builder object */ private CommandBuilder getCommandBuilder(String samzaContainerId) { String cmdBuilderClassName = taskConfig.getCommandClass(ShellCommandBuilder.class.getName()); CommandBuilder cmdBuilder = Util.getObj(cmdBuilderClassName, CommandBuilder.class); cmdBuilder.setConfig(config).setId(samzaContainerId).setUrl(state.jobModelManager.server().getUrl()); return cmdBuilder; } /**