org.apache.samza.util.Util.getObj()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(8.7k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中org.apache.samza.util.Util.getObj()方法的一些代码示例,展示了Util.getObj()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getObj()方法的具体详情如下:
包路径:org.apache.samza.util.Util
类名称:Util
方法名:getObj

Util.getObj介绍

暂无

代码示例

代码示例来源:origin: apache/samza

public CoordinationUtilsFactory getCoordinationUtilsFactory() {
 // load the class
 String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName();
 return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class);
}

代码示例来源:origin: org.apache.samza/samza-core

public CoordinationUtilsFactory getCoordinationUtilsFactory() {
 // load the class
 String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName();
 return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class);
}

代码示例来源:origin: org.apache.samza/samza-core_2.11

public CoordinationUtilsFactory getCoordinationUtilsFactory() {
 // load the class
 String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName();
 return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class);
}

代码示例来源:origin: org.apache.samza/samza-core_2.10

public CoordinationUtilsFactory getCoordinationUtilsFactory() {
 // load the class
 String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName();
 return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class);
}

代码示例来源:origin: org.apache.samza/samza-core_2.12

public CoordinationUtilsFactory getCoordinationUtilsFactory() {
 // load the class
 String coordinationUtilsFactoryClass = getJobCoordinationUtilsFactoryClassName();
 return Util.getObj(coordinationUtilsFactoryClass, CoordinationUtilsFactory.class);
}

代码示例来源:origin: apache/samza

protected static IndexRequestFactory getIndexRequestFactory(ElasticsearchConfig config) {
 if (config.getIndexRequestFactoryClassName().isPresent()) {
  return Util.getObj(config.getIndexRequestFactoryClassName().get(), IndexRequestFactory.class);
 } else {
  return new DefaultIndexRequestFactory();
 }
}

代码示例来源:origin: apache/samza

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);
   }
 }
}

代码示例来源:origin: apache/samza

/**
 * 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;
}

代码示例来源:origin: apache/samza

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);
}

代码示例来源:origin: apache/samza

private JobCoordinator createJobCoordinator() {
 String jobCoordinatorFactoryClassName = new JobCoordinatorConfig(config).getJobCoordinatorFactoryClassName();
 return Util.getObj(jobCoordinatorFactoryClassName, JobCoordinatorFactory.class).getJobCoordinator(processorId, config, metricsRegistry);
}

代码示例来源:origin: org.apache.samza/samza-core_2.11

private JobCoordinator createJobCoordinator() {
 String jobCoordinatorFactoryClassName = new JobCoordinatorConfig(config).getJobCoordinatorFactoryClassName();
 return Util.getObj(jobCoordinatorFactoryClassName, JobCoordinatorFactory.class).getJobCoordinator(config);
}

代码示例来源:origin: org.apache.samza/samza-core_2.10

private JobCoordinator createJobCoordinator() {
 String jobCoordinatorFactoryClassName = new JobCoordinatorConfig(config).getJobCoordinatorFactoryClassName();
 return Util.getObj(jobCoordinatorFactoryClassName, JobCoordinatorFactory.class).getJobCoordinator(config);
}

代码示例来源:origin: apache/samza

/**
 * 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());
}

代码示例来源:origin: apache/samza

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();
}

代码示例来源:origin: apache/samza

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);
}

代码示例来源:origin: apache/samza

/**
 * 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;
}
/**

代码示例来源:origin: org.apache.samza/samza-core

/**
 * 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;
}
/**

代码示例来源:origin: org.apache.samza/samza-core_2.12

/**
 * 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;
}
/**

代码示例来源:origin: org.apache.samza/samza-core_2.10

/**
 * 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;
}
/**

代码示例来源:origin: org.apache.samza/samza-core_2.11

/**
 * 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;
}
/**

相关文章