Click or drag to resize

JobBuilder.Generate<T> Method (Int32, Action<RecordWriter<T>>)

Generates records using a task that takes no input.

Namespace:  Ookii.Jumbo.Jet.Jobs.Builder
Assembly:  Ookii.Jumbo.Jet (in Ookii.Jumbo.Jet.dll) Version: 2.0.0
Syntax
public StageOperation Generate<T>(
	int taskCount,
	Action<RecordWriter<T>> generator
)

Parameters

taskCount
Type: System.Int32
The task count.
generator
Type: System.Action<RecordWriter<T>>
The generator function.

Type Parameters

T
The type of the records.

Return Value

Type: StageOperation
A StageOperation instance that can be used to further customize the operation.
Remarks

This method generates a class implementing ITask<TInput, TOutput> which calls the target method of the generator delegate from the Run(RecordReader<TInput> , RecordWriter<TOutput> ) method.

Note Note
The task method will be called from a completely different process than the one that is using JobBuilder, so it should not really on any external state.

If the target method is a publicstatic method, it will be called directly by the generated task class. Otherwise, the supplied delegate will be serialized to the task settings and used to call the method. If the target method is an instance method, the instance it belongs to will be serialized as well (this class must have the SerializableAttribute attribute).

See Also