implementation of DPM on spark platform