Changed buffer flush threshold to 100000
Implemented start and stop sampling in the Master node