Search in sources :

Example 1 with SystemStreamPartitionGrouperFactory

use of org.apache.samza.container.grouper.stream.SystemStreamPartitionGrouperFactory in project samza by apache.

the class JobModelCalculator method getSystemStreamPartitionGrouper.

/**
 * Finds the {@see SystemStreamPartitionGrouperFactory} from the {@param config}. Instantiates the
 * {@see SystemStreamPartitionGrouper} object through the factory.
 * @param config the configuration of the samza job.
 * @return the instantiated {@see SystemStreamPartitionGrouper}.
 */
private static SystemStreamPartitionGrouper getSystemStreamPartitionGrouper(Config config) {
    String factoryString = new JobConfig(config).getSystemStreamPartitionGrouperFactory();
    SystemStreamPartitionGrouperFactory factory = ReflectionUtil.getObj(factoryString, SystemStreamPartitionGrouperFactory.class);
    return factory.getSystemStreamPartitionGrouper(config);
}
Also used : SystemStreamPartitionGrouperFactory(org.apache.samza.container.grouper.stream.SystemStreamPartitionGrouperFactory) JobConfig(org.apache.samza.config.JobConfig)

Aggregations

JobConfig (org.apache.samza.config.JobConfig)1 SystemStreamPartitionGrouperFactory (org.apache.samza.container.grouper.stream.SystemStreamPartitionGrouperFactory)1