Thanks for reviewing this patch.
Uploaded kafka-373-v2.patch and here are the changes:
1. In "initialize" function, added code to find the location of the zk & kafka log4j log files.
2. In "cleanup" function, added code to remove the zk & kafka log4j log files
3. The header of the script is now removed and the description are in README
4. Use getopt to process command line arguments
5. Consolidated the following functions:
6. The file to notify producer to stop:
The producer is sent to the background to run in a while-loop. If a file is used to notify the producer process in the background, the producer will exit properly inside the while loop.
7. The following check is required for each of the source, target and mirror maker. It is because the following 2 lines are needed for:
- Line 1: find out if the $bounce_source_id is a char in the string $svr_to_bounce
- Line 2: check to see if $num_iterations is already reached and if $svr_idx > 0 (meaning this server needs to be bounced)
- Line 1: svr_idx=`expr index $svr_to_bounce $bounce_source_id`
- Line 2: if [[ $num_iterations -ge $iter && $svr_idx -gt 0 ]]; then