....Continue from Part 2.....
Runtime behavior of SCAN
SCAN perform following operation for each group of records:
1. Performing Input selection:
- If you have defined the input_select function, SCAN filters the input records accordingly.
- However if you have not defined the input_select function in your transform, SCAN processes all records.
2. Performing Key change (for sorted input only):
- For every record except the first, SCAN checks whether a key change has occurred:
- SCAN compares the current record’s key value to the previous record’s key value, unless the key_change function is defined.
- If the key_change function is defined, SCAN calls that function to check for a key change.
3. Performing Temporary initialization:
- SCAN passes the first record in each group to the initialize transform function.
4. Performing Computation:
- SCAN calls the scan transform function for each record in a group, including the first, using the input record and the temporary record for the group to which the input record belongs. The scan transform function returns a new temporary record.
5. Finalizing the output:
- SCAN calls the finalize transform function once for every input record. SCAN passes the input record and the temporary record that the scan function returned to the finalize transform function. The finalize transform function produces an output record for each input record.
- SCAN stops execution of the graph when the number of reject events exceeds the result of the following formula:
limit+(ramp* number_of_records_processed_so_far)
6. Output selection:
- If you have defined the output_select transform function, SCAN filters the output records.
No comments:
Post a Comment