Distributed sequential method for analyzing massive data