Search in sources :

Example 1 with TaskInstanceExceptionHandler

use of org.apache.samza.container.TaskInstanceExceptionHandler in project samza by apache.

the class TestAsyncRunLoop method createTaskInstance.

TaskInstance createTaskInstance(AsyncStreamTask task, TaskName taskName, SystemStreamPartition ssp, OffsetManager manager, SystemConsumers consumers) {
    TaskInstanceMetrics taskInstanceMetrics = new TaskInstanceMetrics("task", new MetricsRegistryMap());
    scala.collection.immutable.Set<SystemStreamPartition> sspSet = JavaConverters.asScalaSetConverter(Collections.singleton(ssp)).asScala().toSet();
    return new TaskInstance(task, taskName, mock(Config.class), taskInstanceMetrics, null, consumers, mock(TaskInstanceCollector.class), mock(SamzaContainerContext.class), manager, null, null, sspSet, new TaskInstanceExceptionHandler(taskInstanceMetrics, new scala.collection.immutable.HashSet<String>()));
}
Also used : TaskInstance(org.apache.samza.container.TaskInstance) SamzaContainerContext(org.apache.samza.container.SamzaContainerContext) Config(org.apache.samza.config.Config) TaskInstanceMetrics(org.apache.samza.container.TaskInstanceMetrics) TaskInstanceExceptionHandler(org.apache.samza.container.TaskInstanceExceptionHandler) MetricsRegistryMap(org.apache.samza.metrics.MetricsRegistryMap) SystemStreamPartition(org.apache.samza.system.SystemStreamPartition) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 Config (org.apache.samza.config.Config)1 SamzaContainerContext (org.apache.samza.container.SamzaContainerContext)1 TaskInstance (org.apache.samza.container.TaskInstance)1 TaskInstanceExceptionHandler (org.apache.samza.container.TaskInstanceExceptionHandler)1 TaskInstanceMetrics (org.apache.samza.container.TaskInstanceMetrics)1 MetricsRegistryMap (org.apache.samza.metrics.MetricsRegistryMap)1 SystemStreamPartition (org.apache.samza.system.SystemStreamPartition)1